com.centrasite.resourceaccess.resources
Interface CentraSiteUser

All Superinterfaces:
ResourceAccessType

public interface CentraSiteUser
extends ResourceAccessType

Represents a CentraSite User.


Method Summary
 void activate()
          The method activates the User.
 void addOrganization(javax.xml.registry.infomodel.Organization organization)
          Add organization to this user's organizations.
 void addRoles(java.util.Collection<CentraSiteRole> roles)
          Add specified roles to this user.
 java.util.Collection<javax.xml.registry.infomodel.RegistryObject> adjustImported()
          Adjust the user object at import.
 void deactivate()
          The method deactivates the User.
 java.util.Collection<javax.xml.registry.infomodel.EmailAddress> getEmailAddresses()
          Get user's email addresses.
 java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations()
          Get all organizations this user belongs to.
 java.util.Collection<CentraSitePermission> getPermissions()
          Returns the permissions that are applicable to this user.
 javax.xml.registry.infomodel.PersonName getPersonName()
           
 java.util.Collection<javax.xml.registry.infomodel.PostalAddress> getPostalAddresses()
          Get user's postal address.
 java.util.Collection<CentraSiteRole> getRoles()
          Returns all the roles directly assigned to this user as well as all roles assigned through group membership.
 java.util.Collection<CentraSiteRole> getRoles(CentraSitePermission permission)
          Returns all roles that this user has the specified permission for.
 java.util.Collection<javax.xml.registry.infomodel.TelephoneNumber> getTelephoneNumbers(java.lang.String phoneType)
          Get user's telephone numbers.
 java.util.Collection<javax.xml.registry.infomodel.RegistryObject> getUserAssets(java.util.Collection<java.lang.String> findQualifiers)
           
 javax.xml.registry.infomodel.Organization getWorkingOrganization()
          Get the current working Organization of this user.
 boolean hasCorrespondingPermission(CentraSitePermission permission)
          This method verifies if the user a specified permission.
 boolean hasCorrespondingRole(java.lang.String roleId, javax.xml.registry.infomodel.Organization organization)
          This method verifies if the user has a specified role for a specified organization.
 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 hasPermission(CentraSitePermission permission)
          This method verifies if the user has a specified permission.
 boolean hasPermission(CentraSitePermission permission, javax.xml.registry.infomodel.Organization organization)
          This method verifies if the user has a specified permission for a specified organization.
 boolean hasView(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject ro)
          Check whether the group has view permission on the given registry object.
 boolean isActive()
          Check if the User is already activated.
 boolean isCentraSiteAdministrator()
          Check if the user is a CentraSite Administrator
 boolean isGuestUser()
          Check if this CentraSiteUser instance is the predefined Guest User.
 boolean isPrimaryContact(javax.xml.registry.infomodel.Organization organization)
          Check if the user is a primary contact for the given organization
 boolean isRegistered()
          Is this user registered?
 void register()
          Register this user.
 void removeOrganization(javax.xml.registry.infomodel.Organization organization)
          Remove single organization from this user's organizations.
 void removeRoles(java.util.Collection<CentraSiteRole> roles)
          Remove specified roles from this user.
 void save()
          Persist the user.
 void setEmailAddresses(java.util.Collection<javax.xml.registry.infomodel.EmailAddress> emailAddresses)
          Set user's email addresses.
 void setPersonName(javax.xml.registry.infomodel.PersonName personName)
          Set user's person name.
 void setPostalAddresses(java.util.Collection<javax.xml.registry.infomodel.PostalAddress> postalAddresses)
          Set user's postal address.
 void setTelephoneNumbers(java.util.Collection<javax.xml.registry.infomodel.TelephoneNumber> telephoneNumbers)
          Set user's telephone numbers.
 void setWorkingOrganization(javax.xml.registry.infomodel.Organization organization)
          Set the current working organization of this user.
 void unregister()
          Unregister this user.
 
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
 

Method Detail

removeOrganization

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

Parameters:
organization - The organization to be removed.

addOrganization

void addOrganization(javax.xml.registry.infomodel.Organization organization)
Add organization to this user's organizations.

Parameters:
organization - The organization to add.

getOrganizations

java.util.Collection<javax.xml.registry.infomodel.Organization> getOrganizations()
Get all organizations this user belongs to.

Returns:
Collection of Organization instances.

getWorkingOrganization

javax.xml.registry.infomodel.Organization getWorkingOrganization()
Get the current working Organization of this user.

Returns:
The working Organization.

setWorkingOrganization

void setWorkingOrganization(javax.xml.registry.infomodel.Organization organization)
Set the current working organization of this user. Should be one of the organization the user belongs to.

Parameters:
organization - The working Organization to be set.

getPersonName

javax.xml.registry.infomodel.PersonName getPersonName()
                                                      throws javax.xml.registry.JAXRException,
                                                             com.softwareag.security.jaas.principals.SagGeneralSecurityException
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.getPersonName()

setPersonName

void setPersonName(javax.xml.registry.infomodel.PersonName personName)
                   throws javax.xml.registry.JAXRException,
                          com.softwareag.security.jaas.principals.SagGeneralSecurityException
Set user's person name.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.setPersonName(PersonName)

getPostalAddresses

java.util.Collection<javax.xml.registry.infomodel.PostalAddress> getPostalAddresses()
                                                                                    throws javax.xml.registry.JAXRException,
                                                                                           com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get user's postal address.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.getPostalAddresses()

setPostalAddresses

void setPostalAddresses(java.util.Collection<javax.xml.registry.infomodel.PostalAddress> postalAddresses)
                        throws javax.xml.registry.JAXRException,
                               com.softwareag.security.jaas.principals.SagGeneralSecurityException
Set user's postal address.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.setPostalAddresses(Collection)

getTelephoneNumbers

java.util.Collection<javax.xml.registry.infomodel.TelephoneNumber> getTelephoneNumbers(java.lang.String phoneType)
                                                                                       throws javax.xml.registry.JAXRException,
                                                                                              com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get user's telephone numbers.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.getTelephoneNumbers(String)

setTelephoneNumbers

void setTelephoneNumbers(java.util.Collection<javax.xml.registry.infomodel.TelephoneNumber> telephoneNumbers)
                         throws javax.xml.registry.JAXRException,
                                com.softwareag.security.jaas.principals.SagGeneralSecurityException
Set user's telephone numbers.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.setTelephoneNumbers(Collection)

getEmailAddresses

java.util.Collection<javax.xml.registry.infomodel.EmailAddress> getEmailAddresses()
                                                                                  throws javax.xml.registry.JAXRException,
                                                                                         com.softwareag.security.jaas.principals.SagGeneralSecurityException
Get user's email addresses.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.getEmailAddresses()

setEmailAddresses

void setEmailAddresses(java.util.Collection<javax.xml.registry.infomodel.EmailAddress> emailAddresses)
                       throws javax.xml.registry.JAXRException,
                              com.softwareag.security.jaas.principals.SagGeneralSecurityException
Set user's email addresses.

Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs
See Also:
User.setEmailAddresses(Collection)

addRoles

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

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 user.

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

getPermissions

java.util.Collection<CentraSitePermission> getPermissions()
                                                          throws javax.xml.registry.JAXRException,
                                                                 com.softwareag.security.jaas.principals.SagGeneralSecurityException
Returns the permissions that are applicable to this user.

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

hasPermission

boolean hasPermission(CentraSitePermission permission)
                      throws javax.xml.registry.JAXRException,
                             com.softwareag.security.jaas.principals.SagGeneralSecurityException
This method verifies if the user has a specified permission. If the specified permission is a system level permission, the method will return true when the user has such permission and false otherwise. If the specified permission is an organization level permission, the method will return true either when the user has such permission or its system level equivalent. In all other cases the method will return false.

Parameters:
permission - The CentraSitePermission
Returns:
true if the user has the specified permission and false otherwise.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

hasPermission

boolean hasPermission(CentraSitePermission permission,
                      javax.xml.registry.infomodel.Organization organization)
                      throws javax.xml.registry.JAXRException,
                             com.softwareag.security.jaas.principals.SagGeneralSecurityException
This method verifies if the user has a specified permission for a specified organization. If the specified permission is a system level permission, the method will return true either when the user has such permission or its organization level equivalent. If the specified permission is an organization level permission, the method will return true only if the user has such permission. In all other cases the method will return false.

Parameters:
permission - The CentraSitePermission
organization - The Organization
Returns:
true if the user has the specified permission for the specified organization and false otherwise.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

hasCorrespondingPermission

boolean hasCorrespondingPermission(CentraSitePermission permission)
                                   throws javax.xml.registry.JAXRException,
                                          com.softwareag.security.jaas.principals.SagGeneralSecurityException
This method verifies if the user a specified permission. If the specified permission is a system level permission the method will return true when the user has such permission or the organization level equivalent and false otherwise.

Parameters:
permission - The CentraSitePermission (must be system level)
Returns:
true if the user has the specified system permission or its organization level equivalent and false otherwise.
Throws:
javax.xml.registry.JAXRException - if a JAXR error occurs
com.softwareag.security.jaas.principals.SagGeneralSecurityException - if a security error occurs

hasCorrespondingRole

boolean hasCorrespondingRole(java.lang.String roleId,
                             javax.xml.registry.infomodel.Organization organization)
                             throws javax.xml.registry.JAXRException,
                                    com.softwareag.security.jaas.principals.SagGeneralSecurityException
This method verifies if the user has a specified role for a specified organization. If the specified role is a system level role, the method will return true either when the user has such role. If the specified role is an organization level role, the method will return true only if the user has such permission. In all other cases the method will return false.

Parameters:
roleId - - System level role id or default organization's role id
organization - The Organization
Returns:
Throws:
javax.xml.registry.JAXRException
com.softwareag.security.jaas.principals.SagGeneralSecurityException

getRoles

java.util.Collection<CentraSiteRole> getRoles()
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Returns all the roles directly assigned to this user as well as all roles assigned through group membership.

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(CentraSitePermission permission)
                                              throws javax.xml.registry.JAXRException,
                                                     com.softwareag.security.jaas.principals.SagGeneralSecurityException
Returns all roles that this user has the specified permission for.

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

isRegistered

boolean isRegistered()
                     throws javax.xml.registry.JAXRException,
                            com.softwareag.security.jaas.principals.SagGeneralSecurityException
Is this user registered?

Returns:
true if registered and 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
Register this user.

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 user.

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 user. Either persists freshly created user 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

getUserAssets

java.util.Collection<javax.xml.registry.infomodel.RegistryObject> getUserAssets(java.util.Collection<java.lang.String> findQualifiers)
                                                                                throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException
See Also:
CentraSiteQueryManager.findUserAssets(Collection, javax.xml.registry.infomodel.User)

isGuestUser

boolean isGuestUser()
Check if this CentraSiteUser instance is the predefined Guest User.

Returns:
true If this CentraSiteUser instance is the predefined Guest user, false otherwise.

activate

void activate()
The method activates the User. Called on an already active User the method does not have any effect.


deactivate

void deactivate()
The method deactivates the User. Called on already inactive users the method does not have any effect.


isActive

boolean isActive()
Check if the User is already activated.

Returns:
returns true on active users and false on inactive ones.

isPrimaryContact

boolean isPrimaryContact(javax.xml.registry.infomodel.Organization organization)
                         throws javax.xml.registry.JAXRException
Check if the user is a primary contact for the given organization

Parameters:
organization -
Returns:
returns true if the user is primary contact else returns false.
Throws:
javax.xml.registry.JAXRException

isCentraSiteAdministrator

boolean isCentraSiteAdministrator()
                                  throws com.softwareag.security.jaas.principals.SagGeneralSecurityException,
                                         javax.xml.registry.JAXRException
Check if the user is a CentraSite Administrator

Returns:
returns true if the user is CentraSite Administrator else returns false.
Throws:
com.softwareag.security.jaas.principals.SagGeneralSecurityException
javax.xml.registry.JAXRException

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

adjustImported

java.util.Collection<javax.xml.registry.infomodel.RegistryObject> adjustImported()
                                                                                 throws javax.xml.registry.JAXRException
Adjust the user object at import.

Returns:
collection of updated system objects (roles)
Throws:
javax.xml.registry.JAXRException