S
- The type of the builder instance.public static class GroupDTO.Builder<S extends GroupDTO.Builder>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AuditDTO |
audit
The audit information of the group.
|
protected java.lang.String |
name
The name of the group.
|
protected java.util.List<java.lang.String> |
roles
The roles of the group.
|
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
GroupDTO |
build()
Builds an instance of GroupDTO using the builder's properties.
|
S |
withAudit(AuditDTO audit)
Sets the audit information of the group.
|
S |
withName(java.lang.String name)
Sets the name of the group.
|
S |
withRoles(java.util.List<java.lang.String> roles)
Sets the roles of the group.
|
protected java.lang.String name
protected java.util.List<java.lang.String> roles
protected AuditDTO audit
public S withName(java.lang.String name)
name
- The name of the group.public S withRoles(java.util.List<java.lang.String> roles)
roles
- The roles of the group.public S withAudit(AuditDTO audit)
audit
- The audit information of the group.public GroupDTO build()
java.lang.IllegalArgumentException
- If the name or audit are not set.