S
- The type of the builder instance.public static class RoleDTO.Builder<S extends RoleDTO.Builder>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AuditDTO |
audit
The audit information of the role.
|
protected java.lang.String |
name
The name of the role.
|
protected java.util.List<Privilege> |
privileges
The privileges of the role.
|
protected java.util.Map<java.lang.String,java.lang.String> |
properties
The properties of the role.
|
protected SecurableObjectDTO |
securableObject
The securable object of the role.
|
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RoleDTO |
build()
Builds an instance of RoleDTO using the builder's properties.
|
S |
withAudit(AuditDTO audit)
Sets the audit information of the role.
|
S |
withName(java.lang.String name)
Sets the name of the role.
|
S |
withPrivileges(java.util.List<Privilege> privileges)
Sets the privileges of the role.
|
S |
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties of the role.
|
S |
withSecurableObject(SecurableObjectDTO securableObject)
Sets the securable object of the role.
|
protected java.lang.String name
protected java.util.List<Privilege> privileges
protected AuditDTO audit
protected java.util.Map<java.lang.String,java.lang.String> properties
protected SecurableObjectDTO securableObject
public S withName(java.lang.String name)
name
- The name of the role.public S withPrivileges(java.util.List<Privilege> privileges)
privileges
- The privileges of the role.public S withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- The properties of the role.public S withSecurableObject(SecurableObjectDTO securableObject)
securableObject
- The securableObject of the role.public S withAudit(AuditDTO audit)
audit
- The audit information of the role.public RoleDTO build()
java.lang.IllegalArgumentException
- If the name or audit are not set.