Class TdbUser
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink,TdbControlObjectProvider
-
Constructor Summary
ConstructorsConstructorDescriptionTdbUser(TdbSession session) Constructor, creates a blank instanceTdbUser(TdbSession session, TdbControlObject ob) Constructor, creates a user instance for the user referenced by the provided Control object -
Method Summary
Modifier and TypeMethodDescriptionvoidMove all objects owned by the current user to another user.voidMove all objects owned by one user to another user.voidMove objects owned by one user to another user.voidchangePassword(String oldpw, String newpw) Change the current user's password.voidclear()Clear any state established for this objectvoidcopy(String newname, String newpw, boolean groups, TdbControlObject ob) Create a new user as a copy of an existing one, optionally including group memberships and private procedures.voidCreate a new user on the server with the specified credentials.voiddelete()Remove the user from the server.voidRemove a user from the server.voidExport the definition of the user to a file.voidExport the definition of the user to a file.voidget()Retrieve the user's properties from the server.voidRetrieve the specified user's properties from the server.Retrieve the first line of the user's addressRetrieve the second line of the user's addressRetrieve the user's company nameintRetrieve the date format in use by the user; to retrieve the text version of a date format, use theTdbSession.getDateformmethods.Retrieve the separators used when formatting date stringsbooleangetIsFM()Retrieve the user's FM statusbooleangetIsUM()Retrieve the user's UM statusRetrieve the name of the user's login procedure, i.e.Retrieve the user's phone numberRetrieve the user's "real" nameintObsoletebooleanCheck if the user can enter TRIP without providing a password if the server O/S in use supports single sign-onvoidimportUpdate(String filename) Update the user's definition from a saved file.voidimportUser(String filename, String username, String password) Create a new user from a saved definition.voidput()Update the user's properties on the server.voidUpdate a user's properties on the server.voidRename the user.voidresetPassword(String password) Reset the user's password -- can only be accomplished by the system manager.voidsetAddress1(String address) Establish the first line of the user's addressvoidsetAddress2(String address) Established the second line of the user's addressvoidsetCompany(String name) Establish the user's company namevoidsetDateform(int dform) Establish the date format that will be used by the user; to retrieve the text version of a date format, use theTdbSession.getDateformmethods.voidsetDateformSep(String sep) Establish the separates that will be used when formatting date strings for the user.voidsetIsFM(boolean fm) Modify the user's FM status; this can only successfully be invoked by the SYSTEM uservoidsetIsUM(boolean um) Modify the user's UM status; this can only successfully be invoked by the SYSTEM uservoidsetLoginProcedure(String proc) Establish the name of the user's login procedure, i.e.voidsetPhoneNumber(String number) Establish the user's phone numbervoidsetRealName(String name) Establish the user's "real" namevoidsetStartModule(int module) ObsoletevoidsetUsesBypass(boolean bypass) Establish the user's ability to enter TRIP without providing a password, provided that the server O/S supports single sign-on; if the O/S does not support single sign-on, this setting is ignoredMethods inherited from class com.tietoenator.trip.jxp.session.TdbSerializableObject
getControlObjectMethods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessagesMethods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
-
Constructor Details
-
TdbUser
Constructor, creates a user instance for the user referenced by the provided Control object- Parameters:
session- Active sessionob- The Control object reference for the user that will be manipulated by this instance- Throws:
TdbException
-
TdbUser
Constructor, creates a blank instance- Parameters:
session- Active session- Throws:
TdbException
-
-
Method Details
-
getRealName
Retrieve the user's "real" name- Returns:
- The user's real name, if any
-
setRealName
Establish the user's "real" name- Parameters:
name- The user's new real name
-
getCompany
Retrieve the user's company name- Returns:
- The user's company name, if any
-
setCompany
Establish the user's company name- Parameters:
name- The user's new company name
-
getAddress1
Retrieve the first line of the user's address- Returns:
- The address line, if any
-
setAddress1
Establish the first line of the user's address- Parameters:
address- The first line of the user's new address
-
getAddress2
Retrieve the second line of the user's address- Returns:
- The second line of the user's address, if any
-
setAddress2
Established the second line of the user's address- Parameters:
address- The second line of the user's new address
-
getPhoneNumber
Retrieve the user's phone number- Returns:
- The user's phone number, if any
-
setPhoneNumber
Establish the user's phone number- Parameters:
number- The user's new phone number
-
getLoginProcedure
Retrieve the name of the user's login procedure, i.e. the procedure that will always be run whenever the user initializes a session.- Returns:
- The name of the user's login procedure, if any
-
setLoginProcedure
Establish the name of the user's login procedure, i.e. the procedure that will always be run whenever the user initializes a session.- Parameters:
proc- The name of the user's new login procedure
-
getDateformSep
Retrieve the separators used when formatting date strings- Returns:
- Date separators
-
setDateformSep
Establish the separates that will be used when formatting date strings for the user. This must be a two character string, with the allowable characters being chosen from :/-- Parameters:
sep- The user's new date separators
-
getIsUM
public boolean getIsUM()Retrieve the user's UM status- Returns:
- true if the user is a user manager, false otherwise
-
setIsUM
public void setIsUM(boolean um) Modify the user's UM status; this can only successfully be invoked by the SYSTEM user- Parameters:
um- if true, the user will be granted UM privilege
-
getIsFM
public boolean getIsFM()Retrieve the user's FM status- Returns:
- true if the user is a file manager, false otherwise
-
setIsFM
public void setIsFM(boolean fm) Modify the user's FM status; this can only successfully be invoked by the SYSTEM user- Parameters:
fm- if true, the user will be granted FM privilege
-
getUsesBypass
public boolean getUsesBypass()Check if the user can enter TRIP without providing a password if the server O/S in use supports single sign-on- Returns:
- true if the user can enter TRIP without a password
-
setUsesBypass
public void setUsesBypass(boolean bypass) Establish the user's ability to enter TRIP without providing a password, provided that the server O/S supports single sign-on; if the O/S does not support single sign-on, this setting is ignored- Parameters:
bypass- If true, the user will be able to enter TRIP without a password if the server O/S supports single sign-on
-
getDateform
public int getDateform()Retrieve the date format in use by the user; to retrieve the text version of a date format, use theTdbSession.getDateformmethods.- Returns:
- The index of the dateform in use by the user
-
setDateform
public void setDateform(int dform) Establish the date format that will be used by the user; to retrieve the text version of a date format, use theTdbSession.getDateformmethods.- Parameters:
dform- The index of the dateform to be used
-
getStartModule
public int getStartModule()Obsolete- Returns:
- N/A
-
setStartModule
public void setStartModule(int module) Obsolete- Parameters:
module- N/A
-
clear
public void clear()Clear any state established for this object -
get
Retrieve the specified user's properties from the server.This method causes network I/O.
- Parameters:
username- The name of user for whom properties are to be retrieved- Throws:
TdbException
-
get
Retrieve the user's properties from the server.If this TdbUser instance has been created using a TdbControlObject from a TdbUserList instance, this method will fetch the properties of the user associated with the TdbControlObject instance.
If this TdbUser instance has previously been used to fetch a user's properties, this method will fetch that user's properties again.
If neither of the two above cases apply, this method will retrieve the properties of the currently logged on user.
This method causes network I/O.
- Throws:
TdbException
-
create
Create a new user on the server with the specified credentials. Note that upon successful completion of this function, the Control object contained by the instance of this class will be valid for the new user. Note that any profile or management attributes set for the user will also be applied at this time, so the operation can be considered monotonic.This method causes network I/O.
- Parameters:
username- The username of the new userpassword- The password of the new user- Throws:
TdbException
-
delete
Remove a user from the server.This method causes network I/O.
- Parameters:
username- The name of the user to be removed- Throws:
TdbException
-
delete
Remove the user from the server.This method causes network I/O.
- Throws:
TdbException
-
put
Update a user's properties on the server.This method causes network I/O.
- Parameters:
username- The name of user for whom properties are to be updated- Throws:
TdbException
-
put
Update the user's properties on the server.This method causes network I/O.
- Throws:
TdbException
-
resetPassword
Reset the user's password -- can only be accomplished by the system manager. Note that the current user must have been loaded, either by providing a TdbControlObject during the constructor, or by calling the get() method prior to calling this method.This method causes network I/O.
- Parameters:
password- The new password to set- Throws:
TdbException
-
changePassword
Change the current user's password.This method causes network I/O.
- Parameters:
oldpw- The current passwordnewpw- The password to be assigned to the currently logged-in user- Throws:
TdbException
-
rename
Rename the user.This method causes network I/O.
- Parameters:
newname- The new name of the user.- Throws:
TdbException
-
changeMgr
Move objects owned by one user to another user.This method causes network I/O.
- Parameters:
newmgr- Name of planned new owner of objectsoldmgr- Name of current owner of objectsname- Name of object to move- Throws:
TdbException
-
changeMgr
Move all objects owned by one user to another user.This method causes network I/O.
- Parameters:
newmgr- Name of planned new owner of objectsoldmgr- Name of current owner of objects- Throws:
TdbException
-
changeMgr
Move all objects owned by the current user to another user.This method causes network I/O.
- Parameters:
newmgr- Name of planned new owner of objects- Throws:
TdbException
-
export
Export the definition of the user to a file.This method causes network I/O.
- Parameters:
filename- The name of the file to which to write the user's definitionusername- The name of the user to exportgroups- If true, the user's group membership associations will also be exported- Throws:
TdbException
-
export
Export the definition of the user to a file.This method causes network I/O.
- Parameters:
filename- The name of the file to which to write the user's definitiongroups- If true, the user's group membership associations will also be exported- Throws:
TdbException
-
importUpdate
Update the user's definition from a saved file.This method causes network I/O.
- Parameters:
filename- The name of the file from which to read the user's definition- Throws:
TdbException
-
importUser
Create a new user from a saved definition.This method causes network I/O.
- Parameters:
filename- The name of the file containing the saved definitionusername- The name of the user to createpassword- The password to assign to the new user- Throws:
TdbException
-
copy
public void copy(String newname, String newpw, boolean groups, TdbControlObject ob) throws TdbException Create a new user as a copy of an existing one, optionally including group memberships and private procedures.This method causes network I/O.
- Parameters:
newname- The name of the new user to be creatednewpw- The password to be assigned to the new usergroups- If set true, group memberships are copiedob- If not null, the Control object pointed to will be updated with information about the new user upon completion of the operation- Throws:
TdbException
-