com.centrasite.resourceaccess.resources
Interface CentraSiteGroup

All Superinterfaces:
ResourceAccessType

public interface CentraSiteGroup
extends ResourceAccessType

Represents a CentraSite Group.


Field Summary
static java.lang.String GROUP_USER_ASSOC_EXPORT
          The association established from a group object to a user at export (e.g. group --> user)
 
Method Summary
 void addOrganization(javax.xml.registry.infomodel.Organization organization)
          Add organization to this group related organizations.
 void addRoles(java.util.Collection<CentraSiteRole> roles)
          Add specified roles to this group.
 void addUsers(java.util.Collection<CentraSiteUser> users)
          Adds specified users to this group.
 java.util.Collection<javax.xml.registry.infomodel.RegistryObject> adjustImported()
          Adjust this group after import.
 java.util.Collection<CentraSiteUser> getExternalGroupMembers()
          This method is used to get the users from the unsaved external group for displaying in the UI for Import Group Members functionality
 java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations()
          Get all organizations this group is related to.
 java.util.Collection<CentraSiteRole> getRoles()
          Returns all roles this group has.
 java.util.Collection<CentraSiteUser> getUsers()
          Get all users of this Group.
 boolean hasFull(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
          Check whether the group has full permission on the given registry object.
 boolean hasModify(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
          Check whether the group has modify permission on the given registry object.
 boolean hasView(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
          Check whether the group has view permission on the given registry object.
 boolean isRegistered()
          Check if this group is associated with External Group.
 boolean isSystemDefined()
          Check whether this Group is system defined i.e. immutable.
 boolean isUserDefined()
          Check whether this Group is user defined i.e. mutable.
 void prepareForExport()
          Prepare this group for export e.g. add JAXR associations for all users that are members of the group.
 void register()
          Associate this group with external group.
 void removeOrganization(javax.xml.registry.infomodel.Organization organization)
          Remove single organization from this group's related organizations.
 void removeRoles(java.util.Collection<CentraSiteRole> roles)
          Remove specified roles from this group.
 void removeUsers(java.util.Collection<CentraSiteUser> users)
          Removes specified users from this group.
 void save()
          Persist the group.
 void setSystemDefined(boolean isSystemDefined)
          Set whether the Group is system defined and immutable or not.
 void setUserDefined(boolean isUserDefined)
          Set whether the Group is user defined and mutable or not.
 void unregister()
          Unregister this group.
 
Methods inherited from interface com.centrasite.resourceaccess.resources.ResourceAccessType
addAssociations, addClassifications, addExternalLinks, addSlots, getAssociations, getClassifications, getDescription, getDisplayName, getExternalLinks, getExternalProperties, getId, getProperties, getSlots, preDelete, preSave, removeAssociations, removeClassifications, removeExternalLinks, removeProperties, removeSlots, setDescription, setDisplayName, setProperties, synchronizeProperties
 

Field Detail

GROUP_USER_ASSOC_EXPORT

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

See Also:
Constant Field Values
Method Detail

removeOrganization

void removeOrganization(javax.xml.registry.infomodel.Organization organization)
Remove single organization from this group's related organizations.

Parameters:
organization - The organization to be removed.

addOrganization

void addOrganization(javax.xml.registry.infomodel.Organization organization)
                     throws javax.xml.registry.JAXRException
Add organization to this group related organizations.

Parameters:
organization - The organization to add.
Throws:
javax.xml.registry.JAXRException

getOrganizations

java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations()
                                                                                 throws javax.xml.registry.JAXRException
Get all organizations this group is related to.

Returns:
Collection of Organization instances.
Throws:
javax.xml.registry.JAXRException

addRoles

void addRoles(java.util.Collection<CentraSiteRole> roles)
              throws javax.xml.registry.JAXRException,
                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Add specified roles to this group.

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

removeRoles

void removeRoles(java.util.Collection<CentraSiteRole> roles)
                 throws javax.xml.registry.JAXRException,
                        com.softwareag.security.jaas.principals.SagGeneralSecurityException
Remove specified roles from this group.

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()
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Returns all roles this group has.

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

getUsers

java.util.Collection<CentraSiteUser> getUsers()
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get all users of this Group.

Returns:
Collection of CentraSiteUser objects;
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

getExternalGroupMembers

java.util.Collection<CentraSiteUser> getExternalGroupMembers()
                                                             throws javax.xml.registry.JAXRException,
                                                                    com.softwareag.security.jaas.principals.SagGeneralSecurityException
This method is used to get the users from the unsaved external group for displaying in the UI for Import Group Members functionality

Returns:
Collection of CentraSiteUser objects;
Throws:
javax.xml.registry.JAXRException
com.softwareag.security.jaas.principals.SagGeneralSecurityException

addUsers

void addUsers(java.util.Collection<CentraSiteUser> users)
              throws javax.xml.registry.JAXRException,
                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Adds specified users to this group. NOTE: By design, It is possible to add only Registered Users to Local Groups.

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

removeUsers

void removeUsers(java.util.Collection<CentraSiteUser> users)
                 throws javax.xml.registry.JAXRException,
                        com.softwareag.security.jaas.principals.SagGeneralSecurityException
Removes specified users from this group.

Parameters:
users - The users to be removed.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

isRegistered

boolean isRegistered()
                     throws javax.xml.registry.JAXRException,
                            com.softwareag.security.jaas.principals.SagGeneralSecurityException
Check if this group is associated with External Group.

Returns:
true if registered, false otherwise
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

register

void register()
              throws javax.xml.registry.JAXRException,
                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Associate this group with external group. Prior to registering the group GroupManager.addAssociation(CentraSiteGroup, CentraSiteGroup); should be called.

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

unregister

void unregister()
                throws javax.xml.registry.JAXRException,
                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Unregister this group.

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

save

void save()
          throws javax.xml.registry.JAXRException,
                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Persist the group. Either persists freshly created group or updates existing one.

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

isSystemDefined

boolean isSystemDefined()
                        throws javax.xml.registry.JAXRException
Check whether this Group is system defined i.e. immutable.

Returns:
true or false.
Throws:
javax.xml.registry.JAXRException

setSystemDefined

void setSystemDefined(boolean isSystemDefined)
Set whether the Group is system defined and immutable or not.

Parameters:
isSystemDefined - true or false.

isUserDefined

boolean isUserDefined()
                      throws javax.xml.registry.JAXRException
Check whether this Group is user defined i.e. mutable.

Returns:
true or false.
Throws:
javax.xml.registry.JAXRException

setUserDefined

void setUserDefined(boolean isUserDefined)
Set whether the Group is user defined and mutable or not.

Parameters:
isUserDefined - true or false.

prepareForExport

void prepareForExport()
                      throws javax.xml.registry.JAXRException,
                             com.softwareag.security.jaas.principals.SagGeneralSecurityException
Prepare this group for export e.g. add JAXR associations for all users that are members of the group. The direction is: group (source) >--association type--> (target) user Note that this method will not perform any saving it will just add the right association. Also note that this operation must be performed on a persisted group i.e. groupManager.createGroup().prepareForExport() will do nothing.

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

adjustImported

java.util.Collection<javax.xml.registry.infomodel.RegistryObject> adjustImported()
                                                                                 throws javax.xml.registry.JAXRException,
                                                                                        com.softwareag.security.jaas.principals.SagGeneralSecurityException
Adjust this group after import. This method will remove the temporary associations created during the export operation. The method should be called right after the import operation. Note that this method will not perform any saving it will just remove the temporary associations.

Returns:
the collection of modified group objects.
Throws:
javax.xml.registry.JAXRException - if JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

hasView

boolean hasView(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
                throws javax.xml.registry.JAXRException
Check whether the group has view permission on the given registry object.

Parameters:
ro -
Returns:
true or false
Throws:
javax.xml.registry.JAXRException

hasModify

boolean hasModify(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
                  throws javax.xml.registry.JAXRException
Check whether the group has modify permission on the given registry object.

Parameters:
ro -
Returns:
true or false
Throws:
javax.xml.registry.JAXRException

hasFull

boolean hasFull(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
                throws javax.xml.registry.JAXRException
Check whether the group has full permission on the given registry object.

Parameters:
ro -
Returns:
true or false
Throws:
javax.xml.registry.JAXRException