com.plumtree.server
Interface IPTUser

All Superinterfaces:
IPTLocalizable, IPTObject, IPTServerContext, IPTStorable, IPTUnknown

public interface IPTUser
extends IPTObject

IPTUser is the interface representing a portal User object.

Version:
2.0
Author:
Arvind Seshan

Method Summary
 int GetAuthenticationSourceID()
          Retrieves the authentication source ID for this user.
 java.lang.String GetAuthenticationUser()
          Retrieves the authentication name for the user.
 int GetDefaultProfile()
          Retrieves the ID of the Default Profile from which this user was created.
 java.lang.String GetEncryptedNumericPassword()
          Retrieves the encrypted numeric password.
 java.lang.String GetEncryptedPassword()
          Retrieves the encrypted password for the user.
 boolean GetLockedStatus()
          Retrieves the lock status for this user account.
 java.lang.String GetLoginName()
          Retrieves the login name for the user, which uniquely identifies the user within Plumtree, and is used in calls to IPTSession.Connect().
 java.lang.String GetMappingAuthName()
          Retrieves the Mapping Auth Name for the user.
 java.lang.String GetNumericUserName()
          Retrieves the numeric user name for this user.
 com.plumtree.openfoundation.util.IXPPropertyBag GetPersonalInformation()
          Deprecated. in 5.0. Use user profiling instead.
 java.lang.String GetUniqueAuthName()
          Retrieves the Auth Unique Name for the user.
 int GetUserType()
          Retrieves the user type for the user, which identifies the user as either a regular user or a guest user.
 boolean IsGuestUser()
          Returns true if the user is of type PT_USER_TYPES.PT_USER_TYPE_GUEST
 IPTQueryResult QueryDirectGroups()
          Queries for the user's group memberships, without taking into account any nested group hierarchy.
 IPTQueryResult QueryDirectGroups(boolean bIncludeDynamicMemberships, boolean bIncludeStaticMemberships)
          Queries for the user's group memberships, without taking into account any nested group hierarchy.
 IPTQueryResult QueryFlattenedGroups()
          Queries for the user's group memberships, taking into account any nested group hierarchy.
 IPTQueryResult QueryUserGroups()
          Deprecated. in 5.0. Use QueryFlattenedGroups() or QueryDirectGroups() instead, as appropriate.
 void SetAuthenticationSourceID(int iAuthSourceID)
          Sets the authentication source ID for this user.
 void SetAuthenticationUser(java.lang.String strAuthUserName)
          Sets the login name for the user.
 void SetDefaultProfile(int iDefaultProfileID)
          Sets the objectID which is the Default Profile that should be used for this user.
 void SetEncryptedNumericPassword(java.lang.String strEncryptedNumericPassword)
          Sets the encrypted numeric password.
 void SetEncryptedPassword(java.lang.String strEncryptedPassword)
          Sets the (encrypted) password for the user.
 void SetLockedStatus(boolean bLocked)
          Sets the locked status for this user account.
 void SetLoginName(java.lang.String strLoginName)
          Sets the login name for the user, which uniquely identifies the user within Plumtree.
 void SetMappingAuthName(java.lang.String strMappingAuthName)
          Sets the Mapping Auth Name for the user.
 void SetNumericPassword(java.lang.String strNumericPassword)
          Sets the user's numeric password (PIN), which can be used in calls to IPTSession.NumericConnect().
 void SetNumericUserName(java.lang.String strNumericUserName)
          Sets the numeric user name for this user.
 void SetPassword(java.lang.String strPassword)
          Sets the password for the user.
 void SetUniqueAuthName(java.lang.String strAuthUniqueName)
          Sets the Auth Unique Name for the user.
 void SetUserType(int nUserType)
          Sets the user type for the user, which identifies the user as either a regular user or a guest user.
 
Methods inherited from interface com.plumtree.server.IPTObject
GetAdminFolderID, GetClassID, GetCreated, GetImageUUID, GetLastModified, GetObjectProperties, SetAdminFolderID, SetImageUUID, SetLastModified
 
Methods inherited from interface com.plumtree.server.IPTLocalizable
GetDescription, GetIsLocalized, GetLocalizedDescription, GetLocalizedDescriptions, GetLocalizedName, GetLocalizedNames, GetName, GetPrimaryLang, GetSupportsLocalization, SetDescription, SetIsLocalized, SetLocalizedDescriptions, SetLocalizedNames, SetName, SetPrimaryLang
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 
Methods inherited from interface com.plumtree.server.IPTServerContext
GetAccessLevel, GetACL, GetLastModifiedBy, GetLockState, GetObjectID, GetOwnerID, GetServerContextSettings, GetSession, GetSettings, LockObject, SetLastModifiedBy, SetObjectID, SetOwnerID, SetServerContextSettings, SetSettings, UnlockObject
 
Methods inherited from interface com.plumtree.server.IPTStorable
Store
 

Method Detail

GetPersonalInformation

com.plumtree.openfoundation.util.IXPPropertyBag GetPersonalInformation()
Deprecated. in 5.0. Use user profiling instead.

Retrieve the user preferences for this user. Returns the propertybag that is a generic container of metadata stored with the user object. This is obsolete with the introduction of the 5.0 user profiling features and should not be used.

Returns:
IXPPropertyBag containing user preferences.

QueryUserGroups

IPTQueryResult QueryUserGroups()
Deprecated. in 5.0. Use QueryFlattenedGroups() or QueryDirectGroups() instead, as appropriate.

This method is deprecated for 5.0 and later.

Returns:
IPTQueryResult

GetAuthenticationSourceID

int GetAuthenticationSourceID()
Retrieves the authentication source ID for this user.

Returns:
The authentication source ID.

SetAuthenticationSourceID

void SetAuthenticationSourceID(int iAuthSourceID)
Sets the authentication source ID for this user. Cannot modify built-in users. The ID is validated to make sure it identifies an existing auth source. This will be used by the login process to reference the correct AuthSource to validate the user's credentials.

Parameters:
iAuthSourceID - - The authentication source ID. Must be a valid object ID specifying an auth source in the system.
Throws:
PTException - - PT_RESULTCODES.PT_E_ACCESSDENIED indicates this is a built-in user and cannot be modified.
PTException - - PT_RESULTCODES.PT_E_INVALIDARG indicates that the auth source ID passed in was not a valid ID.

GetAuthenticationUser

java.lang.String GetAuthenticationUser()
Retrieves the authentication name for the user. Can only be called for users that are synchronized with an external authentication source, not for users created within Plumtree that are part of the Plumtree Authentication Source. Authentication user name is used for logging in.

Returns:
The authentication name.
Throws:
PTException - - PT_RESULTCODES.PT_E_ACCESSDENIED indicates that the user is not an externally authenticated user.

SetAuthenticationUser

void SetAuthenticationUser(java.lang.String strAuthUserName)
Sets the login name for the user. Can only be called for users that are synchronized using an external authentication source, not for users created within Plumtree that are part of the Plumtree Authentication Source. Authentication user name is used for logging in.

Parameters:
strAuthUserName - - The authentication name for the user.

GetEncryptedPassword

java.lang.String GetEncryptedPassword()
Retrieves the encrypted password for the user. Can only be called for users that are created within Plumtree and are part of the Plumtree Authentication Source; not valid for externally authenticated users. The string returned will be different every time this method is called, though the underlying password may actually be the same.

Returns:
The encrypted password.

SetEncryptedPassword

void SetEncryptedPassword(java.lang.String strEncryptedPassword)

Sets the (encrypted) password for the user. Only applies to users from the Plumtree Authentication Source, cannot be called on users that have been synchronized from an external authentication source.

This method is only available to Administrators. Normally the IPTUser.SetPassword() method should be used by clients instead of this method.

Parameters:
strEncryptedPassword - - The new (encrypted) password for the user.
Throws:
PTException - - PT_RESULTCODES.PT_E_ACCESSDENIED indicates that the calling user is not an Administrator, or that the IPTUser object is not a user from the Plumtree Authentication Source.

SetPassword

void SetPassword(java.lang.String strPassword)

Sets the password for the user. Only applies to users from the Plumtree Authentication Source, cannot be called on users that have been synchronized from an external authentication source.

The new password's length in characters must be less than the value specified by the PT_SERVERCONSTANTS.PT_MAX_PASSWORDSIZE constant, and cannot contain newline, carriage return, or tab characters.

Parameters:
strPassword - - The (clear-text) new password for the user.
Throws:
PTException - - PT_RESULTCODES.PT_E_ACCESSDENIED indicates that the IPTUser object is not a user from the Plumtree Authentication Source.
PTException - - PT_RESULTCODES.PT_E_INVALIDPASSWORD indicates the new password is either too long, or contains invalid characters.

GetLockedStatus

boolean GetLockedStatus()
Retrieves the lock status for this user account.

Returns:
true if the user account is locked, false if it is not locked.

SetLockedStatus

void SetLockedStatus(boolean bLocked)
Sets the locked status for this user account. Cannot lock the built-in Guest user account. Also a user cannot lock their own user account.

Parameters:
bLocked - - Pass true to indicate the user account is locked, and false to indicate the account is not locked.
Throws:
PTException - - PT_RESULTCODES.PT_E_INVALIDARG indicates the caller is trying to lock their own user account, which is not allowed.
PTException - - PT_RESULTCODES.PT_E_CANNOTLOCKGUESTACCOUNT indicates the caller is trying the lock the built-in Guest user account.

GetMappingAuthName

java.lang.String GetMappingAuthName()
Retrieves the Mapping Auth Name for the user. The Mapping Auth Name is used with users that are synchronized from an external authentication source, and is specific to the Authentication Source Provider. It maps the user name used in ACL sync agents.

Returns:
The mapping auth name.

SetMappingAuthName

void SetMappingAuthName(java.lang.String strMappingAuthName)
Sets the Mapping Auth Name for the user. The Mapping Auth Name is used with users that are synchronized from an external authentication source, and is specific to the Authentication Source Provider. It maps the user name used in ACL sync agents.

Parameters:
strMappingAuthName - - The new mapping auth name for the user.

GetUniqueAuthName

java.lang.String GetUniqueAuthName()
Retrieves the Auth Unique Name for the user. The Auth Unique Name is used with users that are synchronized from an external authentication source, and represents the user's unique name within that authentication source, as opposed to Login Name, which uniquely identifies a user within Plumtree).

For example, an LDAP provider might have a "CN=bob,OU=plumtree" string whereas an NT provider might have "PLUMTREE\Bob".

Returns:
The auth unique name.

SetUniqueAuthName

void SetUniqueAuthName(java.lang.String strAuthUniqueName)
Sets the Auth Unique Name for the user. The Auth Unique Name is used with users that are synchronized from an external authentication source, and represents the user's unique name within that authentication source, as opposed to Login Name, which uniquely identifies a user within Plumtree). Note that setting this is illegal for users whose passwords are stored in the portal database (ie, has a Plumtree AuthSourceID).

Parameters:
strAuthUniqueName - - The auth unique name for the user.
Throws:
PTException - - PT_RESULTCODES.PT_E_ACCESSDENIED indicates that this user is from the Plumtree Authentication source.

GetDefaultProfile

int GetDefaultProfile()
Retrieves the ID of the Default Profile from which this user was created.

Returns:
The object ID of the Default Profile.

SetDefaultProfile

void SetDefaultProfile(int iDefaultProfileID)
Sets the objectID which is the Default Profile that should be used for this user.

Parameters:
iDefaultProfileID - - The Default Profile's object ID.

GetNumericUserName

java.lang.String GetNumericUserName()
Retrieves the numeric user name for this user. The numeric user name is used with numeric authentication, for example when logging in with a mobile device. This is the string expected from in calls to IPTSession.NumericConnect().

Returns:
The numeric user name.

SetNumericUserName

void SetNumericUserName(java.lang.String strNumericUserName)
Sets the numeric user name for this user. The numeric user name is used with numeric authentication, for example when logging in with a mobile device.

Parameters:
strNumericUserName - - The new numeric user name for the user. This string must evaluate to a valid number, e.g. each character must be a digit from 0 through 9. The length of the username in characters must be less than the value specified by the PT_SERVERCONSTANTS.MAX_NUMERIC_STORESIZE constant. The numeric user name must also be unique within the system.
Throws:
PTException - - PT_RESULTCODES.PT_E_NUM_AUTH_INVALID_USERNAME indicates that the username was too long.
PTException - - PT_RESULTCODES.PT_E_NUM_AUTH_NONNUMERIC_STRING indicates that the username contained non-numeric characters.
PTException - - PT_RESULTCODES.PT_E_NUM_AUTH_NONUNIQUE_USERNAME indicates that the numeric username specified is already in use by another user in the system.

SetNumericPassword

void SetNumericPassword(java.lang.String strNumericPassword)

Sets the user's numeric password (PIN), which can be used in calls to IPTSession.NumericConnect().

The new password's length in characters must be less than that specified in the PT_SERVERCONTSTANTS.MAX_NUMERIC_STORESIZE. The string passed in must convert to a valid numeric string.

Parameters:
strNewNumericPassword - - The new numeric password.
Throws:
PTException - - PT_RESULTCODES.PT_E_NONNUMERIC_STRING indicates that the new password passed in is not a valid numeric string.
PTException - - PT_RESULTCODES.PT_E_NUM_AUTH_INVALID_USERNAME indicates that the new password was too long.

GetEncryptedNumericPassword

java.lang.String GetEncryptedNumericPassword()
Retrieves the encrypted numeric password. The string returned will be different every time this method is called, though the underlying password may actually be the same.

Returns:
The encrypted numeric password.

SetEncryptedNumericPassword

void SetEncryptedNumericPassword(java.lang.String strEncryptedNumericPassword)
Sets the encrypted numeric password. This method is only available to Administrators. Normally the IPTUser.SetNumericPassword() method should be used by clients instead of this method.

Parameters:
strEncryptedNumericPassword - - The new (encrypted) numeric password.

QueryFlattenedGroups

IPTQueryResult QueryFlattenedGroups()
Queries for the user's group memberships, taking into account any nested group hierarchy. This method should be used when security-related information is needed.

Returns:
IPTQueryResult containing the groups the user is in. The query result contains object IDs of the groups and their corresponding localized names, which can be extracted from the IPTQueryResult using PT_PROPIDS.PT_PROPID_OBJECTID and PT_PROPIDS.PT_PROPID_NAME, respectively.

QueryDirectGroups

IPTQueryResult QueryDirectGroups()
Queries for the user's group memberships, without taking into account any nested group hierarchy. This method is mainly for displaying what groups a user has been added to or included in by dynamic membership rule. This function returns both static and dynamic memberships.

Returns:
IPTQueryResult containing the groups the user is in. The query result contains object IDs of the groups and their corresponding localized names, which can be extracted from the IPTQueryResult using PT_PROPIDS.PT_PROPID_OBJECTID and PT_PROPIDS.PT_PROPID_NAME, respectively.
See Also:
IPTUserGroup

QueryDirectGroups

IPTQueryResult QueryDirectGroups(boolean bIncludeDynamicMemberships,
                                 boolean bIncludeStaticMemberships)
Queries for the user's group memberships, without taking into account any nested group hierarchy. This method is mainly for displaying what groups a user has been added to or included in by dynamic membership rule.

Parameters:
bIncludeDynamicMemberships - - true to include dynamic memberships for this user. false to suppress dynamic memberships.
bIncludeStaticMemberships - - true to include static memberships. false to suppress static memberships
Returns:
IPTQueryResult containing the groups the user is in. The query result contains object IDs of the groups and their corresponding localized names, which can be extracted from the IPTQueryResult using PT_PROPIDS.PT_PROPID_OBJECTID and PT_PROPIDS.PT_PROPID_NAME, respectively.
See Also:
IPTUserGroup

GetLoginName

java.lang.String GetLoginName()
Retrieves the login name for the user, which uniquely identifies the user within Plumtree, and is used in calls to IPTSession.Connect().

Returns:
The login name of the user.

SetLoginName

void SetLoginName(java.lang.String strLoginName)
Sets the login name for the user, which uniquely identifies the user within Plumtree.

Parameters:
strLoginName - - The new login name for the user.

GetUserType

int GetUserType()
Retrieves the user type for the user, which identifies the user as either a regular user or a guest user.

Returns:
The user's type.
See Also:
PT_USER_TYPES

IsGuestUser

boolean IsGuestUser()
Returns true if the user is of type PT_USER_TYPES.PT_USER_TYPE_GUEST

Returns:
a flag indicating if the user of type guest.

SetUserType

void SetUserType(int nUserType)
Sets the user type for the user, which identifies the user as either a regular user or a guest user.

Parameters:
The - user's type.
See Also:
PT_USER_TYPES


Copyright 2008 Plumtree Software Inc. All Rights Reserved.