com.centrasite.resourceaccess.managers
Interface GroupManager

All Superinterfaces:
ResourceManager

public interface GroupManager
extends ResourceManager

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


Method Summary
 void addAssociation(CentraSiteGroup localGroup, CentraSiteGroup unregisteredGroup)
          Associates Unregistered Group with Local Group thus the unregistered Group becomes Registered Group.
 CentraSiteGroup createGroup()
          Create a new instance of CentraSiteGroup; By default a Local Group instance created.
 void deleteGroup(CentraSiteGroup group)
          Delete specified group.
 CentraSiteGroup getGroup(javax.xml.registry.infomodel.RegistryObject groupRegistryObject)
          Utility method to obtain CentraSiteGroup instance of RegistryObject of type "Group".
 CentraSiteGroup getGroup(java.lang.String id)
          Get group by Id.
 java.util.Collection<CentraSiteGroup> getGroups(CentraSiteUser user)
          Get the groups that the specified user is a member of.
 java.util.Collection<CentraSiteGroup> getGroups(CentraSiteUser user, CentraSitePermission permission)
          Get the groups that the specified user has the specified permission for.
 java.util.Collection<CentraSiteGroup> getGroups(javax.xml.registry.infomodel.Organization organization)
          Get the groups that are related to the specified organization
 java.util.Collection<CentraSiteGroup> getGroups(java.lang.String filter)
          Get the groups using the specified search filter.
 java.util.Collection<CentraSiteGroup> getGroupsEx(CentraSiteUser user)
          Get the groups that the specified user is a member of.
 java.util.Collection<CentraSiteGroup> getGroupsEx(javax.xml.registry.infomodel.Organization organization)
          Get the groups that are related to the specified organization The returned collection will support repeated iterations.
 java.util.Collection<CentraSiteGroup> getGroupsEx(java.lang.String filter)
          Get the groups using the specified search filter.
 java.util.Collection<CentraSiteGroup> getUnregisteredGroups(java.lang.String filter)
          Get unregistered groups using the specified filter.
 
Methods inherited from interface com.centrasite.resourceaccess.managers.ResourceManager
delete, save
 

Method Detail

createGroup

CentraSiteGroup createGroup()
                            throws javax.xml.registry.JAXRException,
                                   com.softwareag.security.jaas.principals.SagGeneralSecurityException
Create a new instance of CentraSiteGroup; By default a Local Group instance created.

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

deleteGroup

void deleteGroup(CentraSiteGroup group)
                 throws javax.xml.registry.JAXRException,
                        com.softwareag.security.jaas.principals.SagGeneralSecurityException
Delete specified group.

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

getGroups

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

Parameters:
filter - search filter - if filter is empty string then no filtering occurs
Returns:
groups (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

getGroupsEx

java.util.Collection<CentraSiteGroup> getGroupsEx(java.lang.String filter)
                                                  throws javax.xml.registry.JAXRException,
                                                         com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the groups 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:
groups (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

getGroups

java.util.Collection<CentraSiteGroup> getGroups(CentraSiteUser user)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the groups that the specified user is a member of.

Returns:
groups (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

getGroupsEx

java.util.Collection<CentraSiteGroup> getGroupsEx(CentraSiteUser user)
                                                  throws javax.xml.registry.JAXRException,
                                                         com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the groups that the specified user is a member of. The returned collection will support repeated iterations. It must be closed when finished with.

Returns:
groups (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

getGroups

java.util.Collection<CentraSiteGroup> getGroups(javax.xml.registry.infomodel.Organization organization)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the groups that are related to the specified organization

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

getGroupsEx

java.util.Collection<CentraSiteGroup> getGroupsEx(javax.xml.registry.infomodel.Organization organization)
                                                  throws javax.xml.registry.JAXRException,
                                                         com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the groups that are 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 CentraSiteGroup
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getGroups

java.util.Collection<CentraSiteGroup> getGroups(CentraSiteUser user,
                                                CentraSitePermission permission)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the groups that the specified user has the specified permission for.

Returns:
groups (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

getUnregisteredGroups

java.util.Collection<CentraSiteGroup> getUnregisteredGroups(java.lang.String filter)
                                                            throws javax.xml.registry.JAXRException,
                                                                   com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get unregistered groups using the specified filter.

Parameters:
filter - search filter - if filter is empty string then no filtering occurs
Returns:
groups (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

addAssociation

void addAssociation(CentraSiteGroup localGroup,
                    CentraSiteGroup unregisteredGroup)
                    throws javax.xml.registry.JAXRException,
                           com.softwareag.security.jaas.principals.SagGeneralSecurityException
Associates Unregistered Group with Local Group thus the unregistered Group becomes Registered Group. NOTE: save() must be called on the Local Group instance

Parameters:
localGroup - Local Group
unregisteredGroup - externally managed group
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getGroup

CentraSiteGroup getGroup(java.lang.String id)
                         throws javax.xml.registry.JAXRException,
                                com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get group by Id.

Parameters:
id - Usually taken from ResourceAccessConstants;
Returns:
The CentraSiteGroup 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

getGroup

CentraSiteGroup getGroup(javax.xml.registry.infomodel.RegistryObject groupRegistryObject)
                         throws javax.xml.registry.JAXRException
Utility method to obtain CentraSiteGroup instance of RegistryObject of type "Group".

Parameters:
groupRegistryObject - The group RegistryObject.
Returns:
The CentraSiteGroup instance
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
java.lang.IllegalArgumentException - If groupRegistryObject is not of Group type.