com.softwareag.centrasite.api.csom
Interface User

All Superinterfaces:
CentraSiteObject, CentraSiteRegistryObject

public interface User
extends CentraSiteRegistryObject

The User interface serves as a common interface for the user related information.


Method Summary
 void addTelephoneNumber(TelephoneNumber telephoneNumber, java.lang.String telephoneTypeId)
          Deprecated.  
 boolean canCreateAsset(Organization organization)
          Check if the user has privilege to create an asset instance in the given organization.
 boolean canDelete(CentraSiteObject centraSiteObject)
          Check if the user has privilege to delete the given RegistryObject.
 boolean canModify(CentraSiteRegistryObject centraSiteRegistryObject)
          Check if the user has privilege to modify the given CentraSiteRegistryObject.
 java.lang.String getAvatar()
          Get the profile picture's URL of the current user.
 CentraSiteRepositoryFolder getDefaultRepositoryFolder()
          Get the repository location of the user.
 java.lang.String getDisplayName()
          Returns the Display Name of the current user.
 java.util.Collection<java.lang.String> getEmailAddresses()
          Get the collection of email addresses for the current user.
 java.lang.String getFirstName()
          Get First Name of the current user.
 java.lang.String getLastName()
          Get Last Name of the current user.
 java.lang.String getMiddleName()
          Get Middle Name of the current user.
 java.util.Collection<Organization> getOrganizations()
          Get all organizations this user belongs to.
 java.util.Collection<PostalAddress> getPostalAddress()
          Get the Postal Addresses for the user.
 java.util.Collection<TelephoneNumber> getTelephoneNumbers(java.lang.String phoneType)
          Get the collection of telephone numbers for the current user.
 UserPreferences getUserPreferences()
          Return UserPreferences of this user.
 boolean isActive()
          Whether current user is active or inactive
 boolean isCentraSiteAdministrator()
          Checks whether this user has CSA role.
 boolean isGuest()
          Check if the user is a guest.
 void setAvatar(java.io.InputStream inputStreamOfImage)
          Upload the given image as the profile picture of the current user.
 void setEmailAddresses(java.util.Collection<java.lang.String> emailAddresses)
          Sets the given collection of email addresses to the current user.
 void setFirstName(java.lang.String firstName)
          Sets First Name for the current user.
 void setLastName(java.lang.String lastName)
          Sets Last Name for the current user.
 void setMiddleName(java.lang.String middleName)
          Sets Middle Name for the current user.
 void setTelephoneNumbers(java.util.Collection<TelephoneNumber> telephoneNumbers)
          Sets the given collection of telephone numbers to the user
 
Methods inherited from interface com.softwareag.centrasite.api.csom.CentraSiteRegistryObject
getConsumers, getDescription, getDescription, getDisplayVersion, getLCMAssignment, getLocalName, getMandatoryAttributeProfiles, getName, getName, getNameSpace, getNextVersion, getNextVersions, getOrganization, getOwner, getPreviousVersion, getPreviousVersions, getRegistryObject, getSubscribers, getSystemVersion, getUserVersion, getVisiblePrimaryProfiles, isLatestVersionObject, setDescription, setDescription, setDisplayVersion, setLCMState, setLocalName, setName, setName, setNameSpace, setOrganization, setOwner, setUserVersion
 
Methods inherited from interface com.softwareag.centrasite.api.csom.CentraSiteObject
delete, getAttributeLink, getAttributeValue, getAttributeValue, getAttributeValue, getId, getType, isModified, isReadOnly, save, setAttributeValue, setAttributeValue, setAttributeValue
 

Method Detail

getFirstName

java.lang.String getFirstName()
                              throws CLLException
Get First Name of the current user.

Returns:
First Name of the user
Throws:
CLLException - if CLL fails to return the user's First Name

setFirstName

void setFirstName(java.lang.String firstName)
                  throws CLLException
Sets First Name for the current user.

Parameters:
firstName - First Name to be set for the user
Throws:
CLLException - if CLL fails to set the First Name for the user

getMiddleName

java.lang.String getMiddleName()
                               throws CLLException
Get Middle Name of the current user.

Returns:
Middle Name of the user
Throws:
CLLException - if CLL fails to return the user's Middle Name

setMiddleName

void setMiddleName(java.lang.String middleName)
                   throws CLLException
Sets Middle Name for the current user.

Parameters:
middleName - Middle Name to be set for the user
Throws:
CLLException - if CLL fails to set the Middle Name for the user

getLastName

java.lang.String getLastName()
                             throws CLLException
Get Last Name of the current user.

Returns:
Last Name of the user
Throws:
CLLException - if CLL fails to return the user's Last Name

setLastName

void setLastName(java.lang.String lastName)
                 throws CLLException
Sets Last Name for the current user.

Parameters:
lastName - Last Name to be set for the user
Throws:
CLLException - if CLL fails to set the Last Name for the user

getDisplayName

java.lang.String getDisplayName()
                                throws CLLException
Returns the Display Name of the current user.

Returns:
Display Name of the user
Throws:
CLLException - if CLL fails to return the user's Display Name

getEmailAddresses

java.util.Collection<java.lang.String> getEmailAddresses()
                                                         throws CLLException
Get the collection of email addresses for the current user.

Returns:
collection of email addresses of the user
Throws:
CLLException - if CLL fails to return the user's email addresses

setEmailAddresses

void setEmailAddresses(java.util.Collection<java.lang.String> emailAddresses)
                       throws CLLException
Sets the given collection of email addresses to the current user.

Parameters:
emailAddresses - Collection of email addresses to be set for the user
Throws:
CLLException - if CLL fails to set the given collection of email addresses to the user

isActive

boolean isActive()
                 throws CLLException
Whether current user is active or inactive

Returns:
if the current user is active or inactive
Throws:
CLLException - if CLL fails to return if the user is active or inactive

addTelephoneNumber

@Deprecated
void addTelephoneNumber(TelephoneNumber telephoneNumber,
                                   java.lang.String telephoneTypeId)
                        throws CLLException
Deprecated. 

Use User.setTelephoneNumbers(Collection) instead of this method

Adds the given telephone number with the given phone-type categoryId to the current user.

Parameters:
telephoneNumber - Telephone number
telephoneTypeId - Phone-type categoryId
Throws:
CLLException - if CLL fails to add the given telephone number to the user.

setTelephoneNumbers

void setTelephoneNumbers(java.util.Collection<TelephoneNumber> telephoneNumbers)
                         throws CLLException
Sets the given collection of telephone numbers to the user

Parameters:
telephoneNumbers - a collection of TelephoneNumber
Throws:
CLLException - if CLL fails to add the given telephone number to the user.

getTelephoneNumbers

java.util.Collection<TelephoneNumber> getTelephoneNumbers(java.lang.String phoneType)
                                                          throws CLLException
Get the collection of telephone numbers for the current user.

Parameters:
phoneType -
Returns:
collection of telephone numbers for the user
Throws:
CLLException - if CLL fails to return the user's telephone numbers

getOrganizations

java.util.Collection<Organization> getOrganizations()
                                                    throws CLLException
Get all organizations this user belongs to.

Returns:
list of organizations this user belongs to
Throws:
CLLException - if CLL fails to return the list of organizations

getPostalAddress

java.util.Collection<PostalAddress> getPostalAddress()
                                                     throws CLLException
Get the Postal Addresses for the user.

Returns:
collection of postal addresses for the user
Throws:
CLLException - if CLL fails to return the user's postal addresses

canModify

boolean canModify(CentraSiteRegistryObject centraSiteRegistryObject)
                  throws CLLException
Check if the user has privilege to modify the given CentraSiteRegistryObject.

Parameters:
centraSiteRegistryObject - CentraSite object to be verified
Returns:
true if this user has permission to modify; else false.
Throws:
CLLException - if CLL fails to verify the user's permission settings

canDelete

boolean canDelete(CentraSiteObject centraSiteObject)
                  throws CLLException
Check if the user has privilege to delete the given RegistryObject.

Parameters:
centraSiteObject - CentraSiteObject
Returns:
true if this user has permission to delete; else false.
Throws:
CLLException - if CLL fails to verify the user's permission settings

isCentraSiteAdministrator

boolean isCentraSiteAdministrator()
                                  throws com.softwareag.security.jaas.principals.SagGeneralSecurityException,
                                         javax.xml.registry.JAXRException
Checks whether this user has CSA role.

Returns:
Returns true if this user has CSA role, otherwise false.
Throws:
com.softwareag.security.jaas.principals.SagGeneralSecurityException
javax.xml.registry.JAXRException

canCreateAsset

boolean canCreateAsset(Organization organization)
                       throws CLLException
Check if the user has privilege to create an asset instance in the given organization.

Parameters:
organization - Organization.
Returns:
true if this user can create an asset instance in the given organization; else false.
Throws:
CLLException - if CLL fails to verify the user's permission settings

isGuest

boolean isGuest()
                throws CLLException
Check if the user is a guest.

Returns:
true if this user is a guest; else false.
Throws:
CLLException - if CLL fails to check if the user is a guest

getUserPreferences

UserPreferences getUserPreferences()
                                   throws CLLException
Return UserPreferences of this user.

Returns:
UserPreferences
Throws:
CLLException - if CLL fails to get the UserPreferences

setAvatar

void setAvatar(java.io.InputStream inputStreamOfImage)
               throws CLLException
Upload the given image as the profile picture of the current user.

Parameters:
inputStreamOfImage - Profile picture as InputStream
Throws:
CLLException - if CLL fails to upload the profile picture

getAvatar

java.lang.String getAvatar()
                           throws CLLException
Get the profile picture's URL of the current user.

Returns:
profile picture's URL as String
Throws:
CLLException - if CLL fails to return the profile picture's URL

getDefaultRepositoryFolder

CentraSiteRepositoryFolder getDefaultRepositoryFolder()
                                                      throws CLLException
Get the repository location of the user.

Returns:
CentraSiteRepositoryFolder Get the repository folder of the user.
Throws:
CLLException