Package org.opencastproject.security.api
Class JaxbRole
java.lang.Object
org.opencastproject.security.api.JaxbRole
- All Implemented Interfaces:
Role
A simple user model.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencastproject.security.api.Role
Role.Target, Role.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe descriptionprotected StringThe role nameprotected JaxbOrganizationprotected Stringprotected Role.Type -
Constructor Summary
ConstructorsConstructorDescriptionJaxbRole()No-arg constructor needed by JAXBConstructs a role with the specified name, organization identifier, description, and persistence settings.JaxbRole(String name, JaxbOrganization organization) Constructs a role with the specified name and organization.JaxbRole(String name, JaxbOrganization organization, String description) Constructs a role with the specified name, organization and description.JaxbRole(String name, JaxbOrganization organization, String description, Role.Type type) Constructs a role with the specified name, organization, description, and persistence settings. -
Method Summary
-
Field Details
-
name
The role name -
description
The description -
organization
-
organizationId
-
type
-
-
Constructor Details
-
JaxbRole
public JaxbRole()No-arg constructor needed by JAXB -
JaxbRole
Constructs a role with the specified name and organization.- Parameters:
name- the nameorganization- the organization- Throws:
IllegalArgumentException
-
JaxbRole
public JaxbRole(String name, JaxbOrganization organization, String description) throws IllegalArgumentException Constructs a role with the specified name, organization and description.- Parameters:
name- the nameorganization- the organizationdescription- the description- Throws:
IllegalArgumentException
-
JaxbRole
public JaxbRole(String name, JaxbOrganization organization, String description, Role.Type type) throws IllegalArgumentException Constructs a role with the specified name, organization, description, and persistence settings.- Parameters:
name- the nameorganization- the organizationdescription- the descriptiontype- the roletype- Throws:
IllegalArgumentException
-
JaxbRole
public JaxbRole(String name, String organizationId, String description, Role.Type type) throws IllegalArgumentException Constructs a role with the specified name, organization identifier, description, and persistence settings.- Parameters:
name- the nameorganizationId- the organization identifierdescription- the descriptiontype- the roletype- Throws:
IllegalArgumentException
-
-
Method Details
-
fromRole
-
getName
Gets the role name -
getDescription
Gets the role description- Specified by:
getDescriptionin interfaceRole- Returns:
- the role description
- See Also:
-
getOrganizationId
Returns the role's organization identifier.- Specified by:
getOrganizationIdin interfaceRole- Returns:
- the organization identifier
-
getType
Returns the role'sRole.Type -
hashCode
public int hashCode() -
equals
-
toString
-