Class RoleDTO.Builder<S extends RoleDTO.Builder>
java.lang.Object
org.apache.gravitino.dto.authorization.RoleDTO.Builder<S>
- Type Parameters:
S- The type of the builder instance.
- Enclosing class:
- RoleDTO
Builder class for constructing a RoleDTO instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuditDTOThe audit information of the role.protected StringThe name of the role.The properties of the role.protected SecurableObjectDTO[]The securable objects of the role. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of RoleDTO using the builder's properties.Sets the audit information of the role.Sets the name of the role.withProperties(Map<String, String> properties) Sets the properties of the role.withSecurableObjects(SecurableObjectDTO[] securableObjects) Sets the securable objects of the role.
-
Field Details
-
name
The name of the role. -
audit
The audit information of the role. -
properties
The properties of the role. -
securableObjects
The securable objects of the role.
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withName
Sets the name of the role.- Parameters:
name- The name of the role.- Returns:
- The builder instance.
-
withProperties
Sets the properties of the role.- Parameters:
properties- The properties of the role.- Returns:
- The builder instance.
-
withSecurableObjects
Sets the securable objects of the role.- Parameters:
securableObjects- The securable objects of the role.- Returns:
- The builder instance.
-
withAudit
Sets the audit information of the role.- Parameters:
audit- The audit information of the role.- Returns:
- The builder instance.
-
build
Builds an instance of RoleDTO using the builder's properties.- Returns:
- An instance of RoleDTO.
- Throws:
IllegalArgumentException- If the name or audit are not set.
-