com.crystaldecisions.sdk.occa.security
Interface IUserInfo


public interface IUserInfo

This is an interface through which user information can be extracted from the security session and then modified. The IUserInfo interface contains the information that identifies the currently logged on user. This includes the user name, userID, logon parameters, and so on.


Method Summary
 void associateWithPrincipal(ITrustedPrincipal credential)
          Associate this user with the specify trusted credential.
 java.lang.String getAuthenMethod()
           Returns the authentication method used by the user to log on to the CMS.
 java.util.Locale getLocale()
           Returns the user's locale.
 long getPasswordExpiry()
           Returns the password's expiry period in days.
 int getPersonalObjectID(java.lang.String kind)
           Returns the personal object ID for this user based on the kind.
 java.util.Locale getPreferredViewingLocale()
           Returns the user's preferred viewing locale.
 java.lang.String getProfileString(java.lang.String Name)
           Returns the user's profile string.
 java.lang.String getProfileString(java.lang.String Name, boolean isRefresh)
           Returns the user's profile string. isRefresh if true, will get value from CMS instead of from cache.
 java.lang.String getSecondaryCredential(java.lang.String name)
          Deprecated. use IUserInfo.getSecondaryCredentialEx(String) This call do not internally encrypt the value saved to the repository and are insecure.

Returns the specified secondary credential. It also incompatible with the Ex versions, ie.the values saved with the non-Ex form of the call cannot be retrieved by the Ex version and vice-versa.

 java.lang.String getSecondaryCredentialEx(java.lang.String name)
           Returns the specified secondary credential.
 int getTenantID()
          Returns the id of the tenant that the current user is associated with.
 java.util.TimeZone getTimeZone()
           Returns the user's time zone.
 java.lang.String getUserCUID()
           Returns the user's CUID
 java.lang.String getUserDesc()
           Returns a description of the user currently logged onto the CMS.
 int getUserID()
           Returns the user's unique identifier.
 java.lang.String getUserName()
           Returns the name of the user.
 boolean isUserDefaultLocale()
          Returns a boolean that determines whether the Locale is a userDefaultLocale.
 void removePreferredViewingLocale()
           remove user's preferred viewing locale.
 void setLocale(java.util.Locale value)
           Sets the user's locale.
 void setPassword(java.lang.String oldPassword, java.lang.String newPassword)
           Changes the user's password.
 void setPreferredViewingLocale(java.util.Locale value)
           Sets the user's preferred viewing locale.
 void setProfileString(java.lang.String Name, java.lang.String Value)
           Assigns a profile string to the user.
 void setSecondaryCredential(java.lang.String name, java.lang.String value)
          Deprecated. use IUserInfo.setSecondaryCredentialEx(String, String) This call do not internally encrypt the value saved to the repository and are insecure.

Set the new value to the specified secondary credential or create a new one if the credential specified does not exist. It also incompatible with the Ex versions, ie.the values saved with the non-Ex form of the call cannot be retrieved by the Ex version and vice-versa.

 void setSecondaryCredentialEx(java.lang.String name, java.lang.String value)
           Set the new value to the specified secondary credential or create a new one if the credential specified does not exist.
 void setTimeZone(java.util.TimeZone value)
           Sets the user's time zone.
 void setUserDefaultLocale()
           Sets the current user's locale to the default locale.
 

Method Detail

getAuthenMethod

java.lang.String getAuthenMethod()
                                 throws SDKException

Returns the authentication method used by the user to log on to the CMS.

Returns:
A String specifying the authentication method used by the user to log on to the CMS.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getPasswordExpiry

long getPasswordExpiry()
                       throws SDKException

Returns the password's expiry period in days.

Returns:
A long specifying the password's expiry period in days.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setPassword

void setPassword(java.lang.String oldPassword,
                 java.lang.String newPassword)
                 throws SDKException

Changes the user's password.

Parameters:
oldPassword - The user's old password.
newPassword - The user's new password.
Throws:
SDKException - This is thrown if the password change is unsuccessful.

getProfileString

java.lang.String getProfileString(java.lang.String Name)
                                  throws SDKException

Returns the user's profile string.

Parameters:
Name - The name of the profile string. Each user can have multiple named profile strings.
Returns:
A String containing the user's profile string value.
Throws:
SDKException - This is thrown of the process is unsuccessful.

getProfileString

java.lang.String getProfileString(java.lang.String Name,
                                  boolean isRefresh)
                                  throws SDKException

Returns the user's profile string. isRefresh if true, will get value from CMS instead of from cache. isRefresh is true has performance consequence and should only be used if user know there's an out-of-sycn between cache and cms value.

Parameters:
Name - The name of the profile string. Each user can have multiple named profile strings.
isRefresh - if true, will get value from CMS instead of from cache.
Returns:
A String containing the user's profile string value.
Throws:
SDKException - This is thrown of the process is unsuccessful.

setProfileString

void setProfileString(java.lang.String Name,
                      java.lang.String Value)
                      throws SDKException

Assigns a profile string to the user.

Parameters:
Name - The name of the profile string.
Value - The new value of the profile string.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getSecondaryCredential

java.lang.String getSecondaryCredential(java.lang.String name)
                                        throws SDKException
Deprecated. use IUserInfo.getSecondaryCredentialEx(String) This call do not internally encrypt the value saved to the repository and are insecure.

Returns the specified secondary credential. It also incompatible with the Ex versions, ie.the values saved with the non-Ex form of the call cannot be retrieved by the Ex version and vice-versa.

Parameters:
name - The name credential the user would like to retrieve.
Returns:
A String containing the specified credential.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setSecondaryCredential

void setSecondaryCredential(java.lang.String name,
                            java.lang.String value)
                            throws SDKException
Deprecated. use IUserInfo.setSecondaryCredentialEx(String, String) This call do not internally encrypt the value saved to the repository and are insecure.

Set the new value to the specified secondary credential or create a new one if the credential specified does not exist. It also incompatible with the Ex versions, ie.the values saved with the non-Ex form of the call cannot be retrieved by the Ex version and vice-versa.

Parameters:
name - The name that the new secondary credential should be stored under.
value - The new value of the secondary credential.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getSecondaryCredentialEx

java.lang.String getSecondaryCredentialEx(java.lang.String name)
                                          throws SDKException

Returns the specified secondary credential. It is incompatible with the deprecated non-Ex versions, ie.the values saved with the non-Ex form of the call cannot be retrieved by the Ex version and vice-versa.

Parameters:
name - The String that contains the name of the credential the user would like to retrieve.
Returns:
A String that contains the specified credential.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setSecondaryCredentialEx

void setSecondaryCredentialEx(java.lang.String name,
                              java.lang.String value)
                              throws SDKException

Set the new value to the specified secondary credential or create a new one if the credential specified does not exist. This call internally encrypt the value saved to the repository. It is incompatible with the deprecated non-Ex versions, ie.the values saved with the non-Ex form of the call cannot be retrieved by the Ex version and vice-versa.

Parameters:
name - The String that contains the name that the new secondary credential should be stored under.
value - The String that contains the new value of the secondary credential.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getUserDesc

java.lang.String getUserDesc()
                             throws SDKException

Returns a description of the user currently logged onto the CMS.

Returns:
A String containing a description of the user currently logged onto the CMS.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getUserID

int getUserID()
              throws SDKException

Returns the user's unique identifier.

Returns:
A int containing the user's unique identifier.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getUserCUID

java.lang.String getUserCUID()
                             throws SDKException

Returns the user's CUID

Returns:
A String containing the user's CUID.
Throws:
SDKException - This is thrown if the process is unsuccessful.
Since:
4.0

getUserName

java.lang.String getUserName()
                             throws SDKException

Returns the name of the user.

Returns:
A String containing the name of the user.
Throws:
SDKException - This is thrown if the process is unsuccessful.

isUserDefaultLocale

boolean isUserDefaultLocale()
                            throws SDKException
Returns a boolean that determines whether the Locale is a userDefaultLocale.

Returns:
true if the current user's locale is the default locale, and false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setUserDefaultLocale

void setUserDefaultLocale()
                          throws SDKException

Sets the current user's locale to the default locale.

Throws:
SDKException - This is thrown if the process is unsuccessful.

getLocale

java.util.Locale getLocale()
                           throws SDKException

Returns the user's locale.

Returns:
A Locale that contains the user's locale.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setLocale

void setLocale(java.util.Locale value)
               throws SDKException

Sets the user's locale.

Parameters:
value - A Locale that specifies the user's locale.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getPreferredViewingLocale

java.util.Locale getPreferredViewingLocale()
                                           throws SDKException

Returns the user's preferred viewing locale.

Returns:
A Locale that contains the user's preferred viewing locale.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setPreferredViewingLocale

void setPreferredViewingLocale(java.util.Locale value)
                               throws SDKException

Sets the user's preferred viewing locale.

Parameters:
value - A Locale that specifies the user's preferred viewing locale.
Throws:
SDKException - This is thrown if the process is unsuccessful.

removePreferredViewingLocale

void removePreferredViewingLocale()
                                  throws SDKException

remove user's preferred viewing locale.

Throws:
SDKException - This is thrown if the process is unsuccessful.

getTimeZone

java.util.TimeZone getTimeZone()
                               throws SDKException

Returns the user's time zone.

Returns:
A TimeZone that contains the user's time zone.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setTimeZone

void setTimeZone(java.util.TimeZone value)
                 throws SDKException

Sets the user's time zone.

Parameters:
value - A TimeZone that specifies the user's time zone.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getPersonalObjectID

int getPersonalObjectID(java.lang.String kind)
                        throws SDKException

Returns the personal object ID for this user based on the kind. The kind represents the InfoObject type. For more information on kind, see the CeKind class.

Parameters:
kind - A String that represents the object type.
Throws:
SDKException - This is thrown if the process is unsuccessful.

associateWithPrincipal

void associateWithPrincipal(ITrustedPrincipal credential)
                            throws SDKException
Associate this user with the specify trusted credential.

Parameters:
credential - the credential this user is supposed to be associated with
Throws:
SDKException - Thrown if the assocation could not be made in the back end

getTenantID

int getTenantID()
                throws SDKException
Returns the id of the tenant that the current user is associated with.

Returns:
the id of the tenant that the current user is associated with
Throws:
SDKException