com.crystaldecisions.sdk.plugin.desktop.user
Interface IUserBase

All Known Subinterfaces:
IUser

public interface IUserBase

The IUserBase interface is used to determine the specific behavior of each user. It is the top level object in the User plugin, and it is returned by default when you use the PluginInterface property.

Use the IUser interface to change the password settings for a specific user. Use the properties in the com.crystaldecisions.sdk.plugin.authentication.enterprise package to set the global password options for native Enterprise users. Password options for third-party accounts are set through your external systems.


Nested Class Summary
static interface IUserBase.RecentActionType
           This interface defines types of action recently performed by this user and will be used to retrieve list of documents being acted on.
 
Field Summary
static int CONCURRENT
           This constant specifies the user has a pooled connection that is shared by other users.
static java.lang.String KIND
           The Kind used to query for User objects.
static int NAMED
           This constant specifies the user has a reserved connection.
static java.lang.String PROGID
          The ProgID for the User Class.
 
Method Summary
 void addSecondaryCredential(java.lang.String secondCred, java.lang.String password)
          Adds a second credential for this user.
 void changePassword(java.lang.String oldPassword, java.lang.String newPassword)
           Changes the password, but only if the old password matches the user's current password.
 IUserAliases getAliases()
           Returns the collection of aliases for this user.
 int getConnection()
           Returns how the user is licensed.
 IMappedAttributes getCustomMappedAttributes()
          Get the custom mapped attributes
 java.lang.String getEmailAddress()
          Gets user's email address
 java.util.Set getExcludedAlerts()
          Returns the IDs of all the events for which this user will be excluded from receiving alert notifications.
 int getFavoritesFolderID()
           Returns the ID of the user's Favorites Folder.
 java.lang.String getFullName()
           Returns the full name of the user.
 java.util.Set getGroups()
           Returns a collection of the groups that the user belongs to.
 int getInboxID()
           Returns the ID of the user's Inbox.
 java.lang.String getLicenseRestrictionCUID()
          Returns the license restriction for this user.
 java.util.Locale getLocale()
          Returns the Product Locale of the user.
 int getPersonalCategoryID()
           Returns the ID of the user's Personal Category.
 java.util.Locale getPreferredViewingLocale()
          Returns the Preferred Viewing Locale of the user.
 java.lang.String getProfileString(java.lang.String name)
           Gets a string value from the user's profile, given a specified name.
 IReceivedAlertNotifications getReceivedAlertNotifications()
          Returns a collection of alert notifications that this user has received.
 IRecentDocuments getRecentDocuments(int actionType)
           Returns a collection of document the user recently acted on with specified action type.
 boolean hasCustomMappedAttributes()
          Check if SI_CUSTOM_MAPPED_ATTRIBUTES property bag exist
 boolean hasSecondaryCredential(java.lang.String secondCred)
          Returns a boolean value that indicates whether this user has a particular second credential.
 boolean isAttributeBindingEnabled()
           Returns a boolean to indicate whether the attribute binding is enabled.
 boolean isPasswordChangeAllowed()
           Returns whether the user is allowed to change their password.
 boolean isPasswordExpiryAllowed()
           Returns whether the password expires.
 boolean isPasswordToChangeAtNextLogon()
           Returns whether the user must change their password at the next logon.
 void removeProfileString(java.lang.String name)
           Removes a string from the user's profile.
 void removeSecondaryCredential(java.lang.String secondCred)
          Removes a second credential from this user.
 void setAttributeBindingEnabled(boolean isEnabled)
           Enables or diables the attribute binding.
 void setConnection(int newConnection)
           Specifies how the user is licensed.
 void setEmailAddress(java.lang.String address)
          Sets user's email address
 void setFullName(java.lang.String newFullName)
           Sets the full name of the user.
 void setLicenseRestrictionCUID(java.lang.String restrictionCuid)
          Set the license restriction for this user.
 void setLocale(java.util.Locale l)
          Sets the Product Locale of the user.
 void setNewPassword(java.lang.String newPassword)
           Sets a new password without requiring an old password.
 void setPasswordChangeAllowed(boolean newAllowChangePassword)
           Allows the user to change his or her password.
 void setPasswordExpiryAllowed(boolean newPasswordExpires)
           Sets whether the password expires.
 void setPasswordToChangeAtNextLogon(boolean newChangePasswordAtNextLogon)
           Forces the user to change the password at the next logon.
 void setPreferredViewingLocale(java.util.Locale pvl)
          Sets the Preferred Viewing Locale of the user.
 void setProfileString(java.lang.String name, java.lang.String newProfileString)
           Adds a string to the user's profile.
 

Field Detail

KIND

static final java.lang.String KIND

The Kind used to query for User objects.

See Also:
Constant Field Values

PROGID

static final java.lang.String PROGID

The ProgID for the User Class.

ProgIDCrystalEnterprise.User
Query CategoryCI_SYSTEMOBJECTS
Associated Interfacecom.crystaldecisions.sdk.plugin.desktop.user.IUser

Query syntax:

SELECT
SI_CHANGEPASSWORD, SI_FORCE_PASSWORD_CHANGE, SI_NAMEDUSER, SI_PASSWORDEXPIRE, SI_USERFULLNAME
FROM
CI_SYSTEMOBJECTS
WHERE
SI_PROGID='CrystalEnterprise.User'

The CePropertyIDs named in the SELECT statement are those that are required to access data through the IUser interface. For more information on their associations with the interface's methods, see IUser

See Also:
Constant Field Values

NAMED

static final int NAMED

This constant specifies the user has a reserved connection.

See Also:
Constant Field Values

CONCURRENT

static final int CONCURRENT

This constant specifies the user has a pooled connection that is shared by other users.

See Also:
Constant Field Values
Method Detail

getFullName

java.lang.String getFullName()
                             throws SDKException

Returns the full name of the user.

Returns:
A String containing the full name of the user.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_USERFULLNAME

setFullName

void setFullName(java.lang.String newFullName)

Sets the full name of the user.

Parameters:
newFullName - A String containing the full name of the user.

isPasswordExpiryAllowed

boolean isPasswordExpiryAllowed()

Returns whether the password expires.

Returns:
true if the password expires, false otherwise.
InfoObject properties to query for:
SI_PASSWORDEXPIRE

setPasswordExpiryAllowed

void setPasswordExpiryAllowed(boolean newPasswordExpires)

Sets whether the password expires.

Parameters:
newPasswordExpires - true if the password should expire, false otherwise.

isPasswordToChangeAtNextLogon

boolean isPasswordToChangeAtNextLogon()

Returns whether the user must change their password at the next logon.

Returns:
true if the user must change their password at next logon, false otherwise.
InfoObject properties to query for:
SI_FORCE_PASSWORD_CHANGE

setPasswordToChangeAtNextLogon

void setPasswordToChangeAtNextLogon(boolean newChangePasswordAtNextLogon)

Forces the user to change the password at the next logon.

Parameters:
newChangePasswordAtNextLogon - true to force the user to change their password at next logon, false otherwise.

isPasswordChangeAllowed

boolean isPasswordChangeAllowed()

Returns whether the user is allowed to change their password.

Returns:
true if the user is allowed to change their password, false otherwise.
InfoObject properties to query for:
SI_CHANGEPASSWORD

setPasswordChangeAllowed

void setPasswordChangeAllowed(boolean newAllowChangePassword)

Allows the user to change his or her password.

Parameters:
newAllowChangePassword - true if the user is allowed to change their password, false otherwise.

getConnection

int getConnection()

Returns how the user is licensed.

Returns:
An int specifying the user connection type.
InfoObject properties to query for:
SI_NAMEDUSER

setConnection

void setConnection(int newConnection)

Specifies how the user is licensed.

Parameters:
newConnection - An int specifying the user connection type.

setNewPassword

void setNewPassword(java.lang.String newPassword)

Sets a new password without requiring an old password. This is an administrative function that allows a password to be set without supplying an old password.

Parameters:
newPassword - A String containing the new password.

changePassword

void changePassword(java.lang.String oldPassword,
                    java.lang.String newPassword)

Changes the password, but only if the old password matches the user's current password.

Parameters:
oldPassword - A String containing the user's old password.
newPassword - A String containing the user's new password.

getGroups

java.util.Set getGroups()

Returns a collection of the groups that the user belongs to. This collection is used for adding or deleting groups that this user belongs to.

Returns:
A Set containing the collection of the groups that the user belongs to. This Set contains Integer objects containing the SI_IDs of the groups that this user belongs to.
InfoObject properties to query for:
SI_USERGROUPS

getProfileString

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

Gets a string value from the user's profile, given a specified name.

Parameters:
name - The name of the string to be returned.
Returns:
A String containing the requested string value from the user's profile.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_DATA

setProfileString

void setProfileString(java.lang.String name,
                      java.lang.String newProfileString)

Adds a string to the user's profile.

Parameters:
name - The name of the string to be added.
newProfileString - A String containing the value of the string to be added to the user's profile.
InfoObject properties to query for:
SI_DATA

removeProfileString

void removeProfileString(java.lang.String name)
                         throws SDKException

Removes a string from the user's profile.

Parameters:
name - The name of the string to be removed.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_DATA

getAliases

IUserAliases getAliases()

Returns the collection of aliases for this user.

Returns:
An IUserAliases object containing the aliases for this user.
InfoObject properties to query for:
SI_ALIASES

getEmailAddress

java.lang.String getEmailAddress()
                                 throws SDKException
Gets user's email address

Returns:
User's email address
Throws:
SDKException - if the corresponding property is not found
InfoObject properties to query for:
SI_EMAIL_ADDRESS

setEmailAddress

void setEmailAddress(java.lang.String address)
Sets user's email address

Parameters:
address - User's email address

hasSecondaryCredential

boolean hasSecondaryCredential(java.lang.String secondCred)
                               throws SDKException
Returns a boolean value that indicates whether this user has a particular second credential.

Parameters:
secondCred - A String that contains the particular second credential to check.
Returns:
a boolean value that indicates whether this user has a particular second credential.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_2ND_CREDS

addSecondaryCredential

void addSecondaryCredential(java.lang.String secondCred,
                            java.lang.String password)
                            throws SDKException
Adds a second credential for this user.

Parameters:
secondCred - A String that contains the name of the second credential to add.
password - A String that contains the password for the second credential to add.
Throws:
SDKException - if the corresponding property is not found.

removeSecondaryCredential

void removeSecondaryCredential(java.lang.String secondCred)
                               throws SDKException
Removes a second credential from this user.

Parameters:
secondCred - A String that contains the name of the second credential to remove.
Throws:
SDKException - if the corresponding property is not found.

isAttributeBindingEnabled

boolean isAttributeBindingEnabled()
                                  throws SDKException

Returns a boolean to indicate whether the attribute binding is enabled.

Returns:
true if the binding is enabled, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_ENABLE_ATTR_BINDING

setAttributeBindingEnabled

void setAttributeBindingEnabled(boolean isEnabled)

Enables or diables the attribute binding.

Parameters:
isEnabled - true to enable the binding, false to disable the binding.

getFavoritesFolderID

int getFavoritesFolderID()
                         throws SDKException

Returns the ID of the user's Favorites Folder.

Returns:
The int value of the Favorites Folder ID.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_FAVORITES_FOLDER

getInboxID

int getInboxID()
               throws SDKException

Returns the ID of the user's Inbox.

Returns:
The int value of the inbox ID.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_INBOX

getPersonalCategoryID

int getPersonalCategoryID()
                          throws SDKException

Returns the ID of the user's Personal Category.

Returns:
The int value of the Personal Category ID.
Throws:
SDKException - if the corresponding property is not found.
InfoObject properties to query for:
SI_PERSONALCATEGORY

getRecentDocuments

IRecentDocuments getRecentDocuments(int actionType)
                                    throws SDKException

Returns a collection of document the user recently acted on with specified action type.

Parameters:
actionType - as the type of action.
Returns:
true a collection of document the user recently acted on with specified action type .
Throws:
SDKException
InfoObject properties to query for:
SI_RECENT_DOCUMENTS

getPreferredViewingLocale

java.util.Locale getPreferredViewingLocale()
Returns the Preferred Viewing Locale of the user.

Returns:
Locale as the Preferred Viewing Locale of the user.
Since:
13.0
InfoObject properties to query for:
SI_DATA

getLocale

java.util.Locale getLocale()
Returns the Product Locale of the user.

Returns:
Locale as the Product Locale of the user.
Since:
13.0
InfoObject properties to query for:
SI_DATA

setPreferredViewingLocale

void setPreferredViewingLocale(java.util.Locale pvl)
Sets the Preferred Viewing Locale of the user.

Parameters:
Locale - as the Preferred Viewing Locale of the user.
Since:
13.0
InfoObject properties to query for:
SI_DATA

setLocale

void setLocale(java.util.Locale l)
Sets the Product Locale of the user.

Parameters:
Locale - as the Product Locale of the user.
Since:
13.0
InfoObject properties to query for:
SI_DATA

getExcludedAlerts

java.util.Set getExcludedAlerts()
                                throws SDKException
Returns the IDs of all the events for which this user will be excluded from receiving alert notifications.

Returns:
A Set of IDs of excluded alert notifications.
Throws:
SDKException
Since:
4.0
InfoObject properties to query for:
SI_EXCLUDED_EVENTS

getReceivedAlertNotifications

IReceivedAlertNotifications getReceivedAlertNotifications()
                                                          throws SDKException
Returns a collection of alert notifications that this user has received. You cannot add items to the returned collection.

Returns:
An IReceivedAlertNotifications object that contains a collection of alert notifications.
Throws:
SDKException
Since:
4.0
InfoObject properties to query for:
SI_RECEIVED_ALERTNOTIFICATIONS

getLicenseRestrictionCUID

java.lang.String getLicenseRestrictionCUID()
Returns the license restriction for this user. This applies only when the system uses the role-based licensing model, for example BI Analyst and BI Viewer user licenses.

Returns:
The CUID of the license restriction this user is assigned to, for example CeSecurityCUID.LicenseRestriction.ANALYST or CeSecurityCUID.LicenseRestriction.VIEWER.
Since:
4.0
See Also:
CeSecurityCUID.LicenseRestriction
InfoObject properties to query for:
SI_USER_LICENSE_CUID

setLicenseRestrictionCUID

void setLicenseRestrictionCUID(java.lang.String restrictionCuid)
Set the license restriction for this user. This applies only when the system uses the role-based licensing model, for example BI Analyst and BI Viewer user licenses. For example, use CeSecurityCUID.LicenseRestriction.ANALYST or CeSecurityCUID.LicenseRestriction.VIEWER.

Parameters:
restrictionCuid - The CUID of the license restriction for this user.
Since:
4.0
See Also:
CeSecurityCUID.LicenseRestriction

getCustomMappedAttributes

IMappedAttributes getCustomMappedAttributes()
Get the custom mapped attributes

Returns:
A IMappedAttributes contains all the attribute values. If the property bag does not exist, an empty property bag will be created, please call IUserBase.hasCustomMappedAttributes() to check if property bag exist if you don't want to create the property bag
Since:
4.1
InfoObject properties to query for:
SI_CUSTOM_MAPPED_ATTRIBUTES

hasCustomMappedAttributes

boolean hasCustomMappedAttributes()
Check if SI_CUSTOM_MAPPED_ATTRIBUTES property bag exist

Since:
4.1