public interface RoleManager extends ResourceManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ROLE_REF_ASSOC_EXPORT
The association established from an object to the role during export (e.g. group --> role)
|
Modifier and Type | Method and Description |
---|---|
CentraSiteRole |
createRole()
Create a new instance of a non-system level role.
|
CentraSiteRole |
createRole(boolean systemLevel)
Create a new instance of system level/non-system level role based on the systemLevel parameter.
|
void |
deleteRole(CentraSiteRole role)
Delete the specified role.
|
CentraSiteRole |
getRole(RegistryObject roleRegistryObject)
Utility method to obtain
CentraSiteRole instance of RegistryObject of type "Role". |
CentraSiteRole |
getRole(java.lang.String id)
Get role by Id.
|
java.util.Collection<CentraSiteRole> |
getRoles(Organization organization)
Get the roles related to the specified organization.
|
java.util.Collection<CentraSiteRole> |
getRoles(java.lang.String filter)
Get the roles using the specified search filter.
|
java.util.Collection<CentraSiteRole> |
getRolesEx(Organization organization)
Get the roles related to the specified organization.
|
java.util.Collection<CentraSiteRole> |
getRolesEx(java.lang.String filter)
Get the roles using the specified search filter.
|
void |
prepareRolesForExport(RegistryObject roleReference,
java.util.Collection<RegistryObject> roles)
Prepare this role's reference (group or user) for export e.g. add JAXR associations for all referenced roles
e.g.: group ------ RelatedTo -----> role
|
delete, save
static final java.lang.String ROLE_REF_ASSOC_EXPORT
CentraSiteRole createRole() throws JAXRException, SagGeneralSecurityException
CentraSiteRole
instanceJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursCentraSiteRole createRole(boolean systemLevel) throws JAXRException, SagGeneralSecurityException
systemLevel
- If true, creates a system level role and if false, creates a non-system level roleCentraSiteRole
instanceJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursvoid deleteRole(CentraSiteRole role) throws JAXRException, SagGeneralSecurityException
role
- The CentraSiteRole
instance which has to be deletedJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursCentraSiteRole getRole(java.lang.String id) throws JAXRException, SagGeneralSecurityException
id
- The UUID for the role. Usually taken from ResourceAccessConstants
;JAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursjava.util.Collection<CentraSiteRole> getRoles(java.lang.String filter) throws JAXRException, SagGeneralSecurityException
filter
- Search filter - if filter is empty string then no filtering occursCollection
of CentraSiteRole
objects matching the given filter (may be empty but not null)JAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursjava.util.Collection<CentraSiteRole> getRolesEx(java.lang.String filter) throws JAXRException, SagGeneralSecurityException
filter
- Search filter - if filter is empty string then no filtering occursCollection
of CentraSiteRole
objects matching the given filter (may be empty but not null)JAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursjava.util.Collection<CentraSiteRole> getRoles(Organization organization) throws JAXRException, SagGeneralSecurityException
organization
- The Organization
from which the roles should be fetchedCollection
of CentraSiteRole
objects which belong to the specified organizationJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursjava.util.Collection<CentraSiteRole> getRolesEx(Organization organization) throws JAXRException, SagGeneralSecurityException
organization
- The Organization
from which the roles should be fetchedCollection
of CentraSiteRole
objects which belong to the specified organizationJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursvoid prepareRolesForExport(RegistryObject roleReference, java.util.Collection<RegistryObject> roles) throws JAXRException, SagGeneralSecurityException
e.g.: group ------ RelatedTo -----> role
roleReference
- The role reference (group/user)roles
- All (system level) roles referencing group/userJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursCentraSiteRole getRole(RegistryObject roleRegistryObject) throws JAXRException, SagGeneralSecurityException
CentraSiteRole
instance of RegistryObject
of type "Role".roleRegistryObject
- The role RegistryObject
.CentraSiteRole
instanceJAXRException
- If a JAXR error occursSagGeneralSecurityException
- If a security error occursjava.lang.IllegalArgumentException
- If roleRegistryObject is not of Role type.