com.centrasite.resourceaccess.managers
Interface RoleManager

All Superinterfaces:
ResourceManager

public interface RoleManager
extends ResourceManager

Interface for managing roles. It can perform creation, deletion and searching of roles.


Field Summary
static java.lang.String ROLE_REF_ASSOC_EXPORT
          The association established from a object to the role at export (e.g. group --> role)
 
Method Summary
 CentraSiteRole createRole()
          Create a new instance of non-system level role.
 CentraSiteRole createRole(boolean systemLevel)
          Create a new instance of system level role.
 void deleteRole(CentraSiteRole role)
          Delete specified role.
 CentraSiteRole getRole(javax.xml.registry.infomodel.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(javax.xml.registry.infomodel.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(javax.xml.registry.infomodel.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(javax.xml.registry.infomodel.RegistryObject roleReference, java.util.Collection<javax.xml.registry.infomodel.RegistryObject> roles)
          Prepare this role reference (group or user) for export e.g. add JAXR associations for all referenced roles e.g.: group ------ RelatedTo -----> role
 
Methods inherited from interface com.centrasite.resourceaccess.managers.ResourceManager
delete, save
 

Field Detail

ROLE_REF_ASSOC_EXPORT

static final java.lang.String ROLE_REF_ASSOC_EXPORT
The association established from a object to the role at export (e.g. group --> role)

See Also:
Constant Field Values
Method Detail

createRole

CentraSiteRole createRole()
                          throws javax.xml.registry.JAXRException,
                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Create a new instance of non-system level role.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

createRole

CentraSiteRole createRole(boolean systemLevel)
                          throws javax.xml.registry.JAXRException,
                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Create a new instance of system level role.

Parameters:
systemLevel - Set to true when creating a system level role.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

deleteRole

void deleteRole(CentraSiteRole role)
                throws javax.xml.registry.JAXRException,
                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Delete specified role.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getRole

CentraSiteRole getRole(java.lang.String id)
                       throws javax.xml.registry.JAXRException,
                              com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get role by Id.

Parameters:
id - Usually taken from ResourceAccessConstants;
Returns:
The CentraSiteRole instance having the specific Id.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getRoles

java.util.Collection<CentraSiteRole> getRoles(java.lang.String filter)
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the roles using the specified search filter.

Parameters:
filter - search filter - if filter is empty string then no filtering occurs
Returns:
roles (may be empty but not null)
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getRolesEx

java.util.Collection<CentraSiteRole> getRolesEx(java.lang.String filter)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the roles using the specified search filter. The returned collection will support repeated iterations. It must be closed when finished with.

Parameters:
filter - search filter - if filter is empty string then no filtering occurs
Returns:
roles (may be empty but not null)
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getRoles

java.util.Collection<CentraSiteRole> getRoles(javax.xml.registry.infomodel.Organization organization)
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the roles related to the specified organization.

Parameters:
organization - to use in search
Returns:
Collection of CentraSiteRole
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getRolesEx

java.util.Collection<CentraSiteRole> getRolesEx(javax.xml.registry.infomodel.Organization organization)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the roles related to the specified organization. The returned collection will support repeated iterations. It must be closed when finished with.

Parameters:
organization - to use in search
Returns:
Collection of CentraSiteRole
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

prepareRolesForExport

void prepareRolesForExport(javax.xml.registry.infomodel.RegistryObject roleReference,
                           java.util.Collection<javax.xml.registry.infomodel.RegistryObject> roles)
                           throws javax.xml.registry.JAXRException,
                                  com.softwareag.security.jaas.principals.SagGeneralSecurityException
Prepare this role reference (group or user) for export e.g. add JAXR associations for all referenced roles
 e.g.:  group ------ RelatedTo -----> role
 

Parameters:
roleReference - the role reference (group/user)
roles - all (system) roles referencing group/user
Throws:
javax.xml.registry.JAXRException
com.softwareag.security.jaas.principals.SagGeneralSecurityException

getRole

CentraSiteRole getRole(javax.xml.registry.infomodel.RegistryObject roleRegistryObject)
                       throws javax.xml.registry.JAXRException,
                              com.softwareag.security.jaas.principals.SagGeneralSecurityException
Utility method to obtain CentraSiteRole instance of RegistryObject of type "Role".

Parameters:
roleRegistryObject - The role RegistryObject.
Returns:
The CentraSiteRole instance
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
java.lang.IllegalArgumentException - If roleRegistryObject is not of Role type.
com.softwareag.security.jaas.principals.SagGeneralSecurityException