com.centrasite.resourceaccess.managers
Interface UserManager

All Superinterfaces:
ResourceManager

public interface UserManager
extends ResourceManager

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


Method Summary
 void addAssociation(CentraSiteUser localUser, CentraSiteUser unregisteredUser)
          Associates unregistered user with local user thus the unregistered user becomes registered user.
 CentraSiteUser createUnknownUser(java.lang.String fqn)
          Used for creation of Users not known to the currently effective external user repository.
 CentraSiteUser createUser()
          Create a new instance of CentraSiteUser.
 void deleteUser(CentraSiteUser user)
          Delete specified user.
 java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations(CentraSiteUser user)
          Get the organizations that the specified user is a member of.
 java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations(CentraSiteUser user, CentraSitePermission permission)
          Get the organizations that the specified user has the specified permission for.
 CentraSiteUser getPrimaryContact(javax.xml.registry.infomodel.Organization organization)
          Get the primary contact of the given organization.
 java.util.Collection<CentraSiteUser> getRegisteredUsers()
          Get all users registered in CentraSite.
 java.util.Collection<CentraSiteUser> getRegisteredUsers(java.lang.String filter)
          Using filleter to get the registered users in CentraSite.
 java.util.Collection<CentraSiteUser> getRegisteredUsersEx()
          Get all users registered in CentraSite.
 java.util.Collection<CentraSiteUser> getRegisteredUsersEx(java.lang.String filter)
          Using filleter to get the registered users in CentraSite.
 java.util.Collection<CentraSiteUser> getUnregisteredUsers(java.lang.String filter)
          Get the external users that are not known to CentraSite using the specified search filter.
 CentraSiteUser getUser(javax.xml.registry.infomodel.User user)
          Utility method to obtain CentraSiteUser instance of User
 java.util.Collection<CentraSiteUser> getUsers(javax.xml.registry.infomodel.Organization organization)
          get the users that are members of the specified organization
 java.util.Collection<CentraSiteUser> getUsers(java.lang.String filter)
          Get the users using the specified search filter.
 java.util.Collection<CentraSiteUser> getUsersEx(javax.xml.registry.infomodel.Organization organization)
          get the users that are members of the specified organization The returned collection will support repeated iterations.
 java.util.Collection<CentraSiteUser> getUsersEx(java.lang.String filter)
          Get the users using the specified search filter.
 void setPrimaryContact(CentraSiteUser user, javax.xml.registry.infomodel.Organization organization)
          Set the given user as primary contact for the given organization.
 
Methods inherited from interface com.centrasite.resourceaccess.managers.ResourceManager
delete, save
 

Method Detail

createUser

CentraSiteUser createUser()
                          throws javax.xml.registry.JAXRException,
                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Create a new instance of CentraSiteUser.

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

createUnknownUser

CentraSiteUser createUnknownUser(java.lang.String fqn)
                                 throws com.softwareag.security.jaas.principals.SagGeneralSecurityException,
                                        javax.xml.registry.JAXRException
Used for creation of Users not known to the currently effective external user repository. For example when CentraSite authentication configuration is about to be changed.

Parameters:
fqn - The fully qualified name of the user e.g. "DOMAIN\username"
Returns:
CentraSiteUser instance representing the unknown user.
Throws:
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
javax.xml.registry.JAXRException - if a JAXR error occurs

deleteUser

void deleteUser(CentraSiteUser user)
                throws javax.xml.registry.JAXRException,
                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Delete specified user.

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(java.lang.String filter)
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the users using the specified search filter.

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

getUsersEx

java.util.Collection<CentraSiteUser> getUsersEx(java.lang.String filter)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the users 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:
users (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(javax.xml.registry.infomodel.Organization organization)
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
get the users that are members of the specified organization

Parameters:
organization - The Organization we are searching the members of
Returns:
Collection of CentraSiteUser (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

getUsersEx

java.util.Collection<CentraSiteUser> getUsersEx(javax.xml.registry.infomodel.Organization organization)
                                                throws javax.xml.registry.JAXRException,
                                                       com.softwareag.security.jaas.principals.SagGeneralSecurityException
get the users that are members of the specified organization The returned collection will support repeated iterations. It must be closed when finished with.

Parameters:
organization - The Organization we are searching the members of
Returns:
Collection of CentraSiteUser (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

getOrganizations

java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations(CentraSiteUser user,
                                                                                 CentraSitePermission permission)
                                                                                 throws javax.xml.registry.JAXRException,
                                                                                        com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the organizations that the specified user has the specified permission for. If the given permission is system level and the user has it -> return all organizations. If the given permission is system level but the user doesn't have it -> check if the user has organization level permission that corresponds to the given system level permission and get the organizations for it. If the given permission is not system level -> get the organizations for the given permission.

Returns:
organization IDs (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

getOrganizations

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

Returns:
organization IDs (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

getUnregisteredUsers

java.util.Collection<CentraSiteUser> getUnregisteredUsers(java.lang.String filter)
                                                          throws javax.xml.registry.JAXRException,
                                                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the external users that are not known to CentraSite using the specified search filter.

Parameters:
filter - search filter - if filter is empty string then no filtering occurs. Filter is in format as declared by SSX. See com.softwareag.security.jaas.repository.ssx.SSXRepositoryManager for details.
Returns:
users (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

getRegisteredUsers

java.util.Collection<CentraSiteUser> getRegisteredUsers()
                                                        throws javax.xml.registry.JAXRException,
                                                               com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get all users registered in CentraSite. This means external users that are known to CentraSite (login users)

Returns:
Collection of CentraSiteUser (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

getRegisteredUsersEx

java.util.Collection<CentraSiteUser> getRegisteredUsersEx()
                                                          throws javax.xml.registry.JAXRException,
                                                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get all users registered in CentraSite. This means external users that are known to CentraSite (login users) The returned collection will support repeated iterations. It must be closed when finished with.

Returns:
Collection of CentraSiteUser (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

getRegisteredUsers

java.util.Collection<CentraSiteUser> getRegisteredUsers(java.lang.String filter)
                                                        throws javax.xml.registry.JAXRException,
                                                               com.softwareag.security.jaas.principals.SagGeneralSecurityException
Using filleter to get the registered users in CentraSite. This means external users that are known to CentraSite (login users & not active user) The returned collection will support repeated iterations. It must be closed when finished with.

Returns:
Collection of CentraSiteUser (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

getRegisteredUsersEx

java.util.Collection<CentraSiteUser> getRegisteredUsersEx(java.lang.String filter)
                                                          throws javax.xml.registry.JAXRException,
                                                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Using filleter to get the registered users in CentraSite. This means external users that are known to CentraSite (login users & not active user)

Returns:
Collection of CentraSiteUser (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

getUser

CentraSiteUser getUser(javax.xml.registry.infomodel.User user)
                       throws javax.xml.registry.JAXRException,
                              com.softwareag.security.jaas.principals.SagGeneralSecurityException
Utility method to obtain CentraSiteUser instance of User

Parameters:
user - The User registry object.
Returns:
The CentraSiteUser instance;
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

addAssociation

void addAssociation(CentraSiteUser localUser,
                    CentraSiteUser unregisteredUser)
                    throws javax.xml.registry.JAXRException,
                           com.softwareag.security.jaas.principals.SagGeneralSecurityException
Associates unregistered user with local user thus the unregistered user becomes registered user. NOTE: save() must be called on the unregistered user instance in order the registration to occur.

Parameters:
localUser - the local user
unregisteredUser - the external unregistered user
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

setPrimaryContact

void setPrimaryContact(CentraSiteUser user,
                       javax.xml.registry.infomodel.Organization organization)
                       throws javax.xml.registry.JAXRException
Set the given user as primary contact for the given organization. NOTE: The organization will not be saved.

Parameters:
user - The CentraSiteUser to be set as primary contact.
organization - The Organization to set primary contact to.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs

getPrimaryContact

CentraSiteUser getPrimaryContact(javax.xml.registry.infomodel.Organization organization)
                                 throws javax.xml.registry.JAXRException,
                                        com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get the primary contact of the given organization.

Parameters:
organization -
Returns:
The primary contact user or null if not available.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs