public static final class RoleBuilder.Implementation extends Object implements RoleBuilder
RoleBuilder
default implementation.
All methods that are mutating state are synchronized and building a new Role
instances participates
in the connected RoleManager
's locking.RoleBuilder.Implementation
Modifier and Type | Method and Description |
---|---|
Role |
buildUnresetted()
Builds a
Role by creating a new instance of that type, using the assembly data currently available
to the builder instance. |
RoleBuilder |
grant(Permission permission) |
RoleBuilder |
grant(Role role) |
String |
name() |
RoleBuilder |
name(String name) |
Collection<? extends Permission> |
permissions() |
RoleBuilder |
permissions(Collection<? extends Permission> permissions) |
RoleBuilder |
reset()
Resets this
RoleBuilder instance's internal state to default values (effectively "clearing" the state). |
Collection<? extends Role> |
roles() |
RoleBuilder |
roles(Collection<? extends Role> roles) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, New, New
public String name()
name
in interface RoleBuilder
public Collection<? extends Role> roles()
roles
in interface RoleBuilder
public Collection<? extends Permission> permissions()
permissions
in interface RoleBuilder
public RoleBuilder reset()
RoleBuilder
instance's internal state to default values (effectively "clearing" the state).reset
in interface RoleBuilder
public RoleBuilder name(String name)
name
in interface RoleBuilder
public RoleBuilder grant(Role role)
grant
in interface RoleBuilder
public RoleBuilder grant(Permission permission)
grant
in interface RoleBuilder
public RoleBuilder roles(Collection<? extends Role> roles)
roles
in interface RoleBuilder
public RoleBuilder permissions(Collection<? extends Permission> permissions)
permissions
in interface RoleBuilder
public Role buildUnresetted()
Role
by creating a new instance of that type, using the assembly data currently available
to the builder instance. The builder's internal data is NOT resetted after the instantiation is completed.
This is useful if another instance with the exactely or largely the same data and maybe just little changes
shall be created subsequently.buildUnresetted
in interface RoleBuilder
Role
instance built from the available data.RoleBuilder.build()
,
RoleBuilder.reset()