com.ibm.as400.access
Class User

java.lang.Object
  extended bycom.ibm.as400.access.User
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UserGroup

public class User
extends Object
implements Serializable

The User class represents a user profile object on the system.

Note that calling any of the attribute getters for the first time will result in an implicit call to loadUserInformation(). If any exceptions are thrown by loadUserInformation() during the implicit call, they will be logged to Trace.ERROR and ignored. However, should an exception occur during an explicit call to loadUserInformation(), it will be thrown to the caller.

Implementation note: This class internally calls the Retrieve User Information (QSYRUSRI) API for the methods that retrieve user profile information. The caller must have *READ authority to the user profile object in order to retrieve the information. The class internally calls the Change User Profile (CHGUSRPRF) command for the methods that change user profile information. The caller must have security administrator (*SECADM) special authority, and object management (*OBJMGT) and use (*USE) authorities to the user profile being changed.

See Also:
DirectoryEntry, UserList, UserGroup, Serialized Form

Field Summary
static String NONE
          Constant value representing the String "*NONE".
static String SPECIAL_AUTHORITY_ALL_OBJECT
          Constant value representing a special authority of "*ALLOBJ".
static String SPECIAL_AUTHORITY_AUDIT
          Constant value representing a special authority of "*AUDIT".
static String SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION
          Constant value representing a special authority of "*IOSYSCFG".
static String SPECIAL_AUTHORITY_JOB_CONTROL
          Constant value representing a special authority of "*JOBCTL".
static String SPECIAL_AUTHORITY_SAVE_SYSTEM
          Constant value representing a special authority of "*SAVSYS".
static String SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR
          Constant value representing a special authority of "*SECADM".
static String SPECIAL_AUTHORITY_SERVICE
          Constant value representing a special authority of "*SERVICE".
static String SPECIAL_AUTHORITY_SPOOL_CONTROL
          Constant value representing a special authority of "*SPLCTL".
 
Constructor Summary
User()
          Constructs a User object.
User(AS400 system, String name)
          Constructs a User object.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addVetoableChangeListener(VetoableChangeListener listener)
          Adds a VetoableChangeListener.
 boolean exists()
          Determines if this user profile exists on the system.
 String getAccountingCode()
          Retrieves the accounting code that is associated with this user.
 String getAssistanceLevel()
          Retrieves the user interface that the user will use.
 String getAttentionKeyHandlingProgram()
          Retrieves the attention key handling program for this user.
 int getCCSID()
          Retrieves the character code set ID to be used by the system for this user.
 String getCHRIDControl()
          Retrieves the character identifier control for the user.
 String getCountryID()
          Retrieves the country or region ID used by the system for this user.
 String getCurrentLibraryName()
          Retrieves the name of the user's current library.
 int getDaysUntilPasswordExpire()
          Retrieves the number of days until the password will expire.
 String getDescription()
          Retrieves the descriptive text for the user profile.
 DirectoryEntry getDirectoryEntry()
          Retrieves the system distribution directory entry for the user profile, if one exists.
 String getDisplaySignOnInformation()
          Retrieves whether the sign-on information display is shown when the user signs on.
 String getGroupAuthority()
          Retrieves the authority the user's group profile has to objects the user creates.
 String getGroupAuthorityType()
          Retrieves the type of authority the user's group has to objects the user creates.
 long getGroupID()
          Retrieves the group ID number for the user profile.
 int getGroupIDNumber()
          Deprecated. This method has been replaced by getGroupID() which returns a long.
 String getGroupProfileName()
          Retrieves the name of the group profile.
 int getHighestSchedulingPriority()
          Retrieves the highest scheduling priority the user is allowed to have for each job submitted to the system.
 String getHomeDirectory()
          Retrieves the home directory for this user profile.
 String[] getIASPNames()
          Retrieves the list of independent auxiliary storage pool (IASP) names in use by this user.
 int getIASPStorageAllowed(String iaspName)
          Retrieves the maximum amount of auxiliary storage in kilobytes that can be assigned to store permanent object owned by this user on the given independant ASP.
 int getIASPStorageUsed(String iaspName)
          Retrieves the amount of auxiliary storage in kilobytes occupied by this user's owned objects on the given independent ASP.
 String getInitialMenu()
          Retrieves the initial menu for the user.
 String getInitialProgram()
          Retrieves the initial program for the user.
 String getJobDescription()
          Retrieves the fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries.
 String getKeyboardBuffering()
          Retrieves the keyboard buffering value that is used when a job is initialized for this user.
 String getLanguageID()
          Retrieves the language ID used by the system for this user.
 String getLimitCapabilities()
          Retrieves whether the user has limited capabilites.
 String getLimitDeviceSessions()
          Retrieves whether the user is limited to one device session.
 String[] getLocaleJobAttributes()
          Retrieves a list of the job attributes which are set from the user's locale path name.
 String getLocalePathName()
          Retrieves the locale path name that is assigned to the user profile when a job is started.
 int getMaximumStorageAllowed()
          Retrieves the maximum amount of auxiliary storage (in kilobytes) that can be assigned to store permanant objects owned by the user.
 String getMessageQueue()
          Retrieves the fully qualified integrated file system path name of the message queue that is used by this user.
 String getMessageQueueDeliveryMethod()
          Retrieves how the messages are delivered to the message queue used by the user.
 int getMessageQueueSeverity()
          Retrieves the lowest severity that a message can have and still be delivered to a user in break or notify mode.
 String getName()
          Returns the user profile name.
 String getObjectAuditingValue()
          Retrieves the user's object auditing value.
 UserObjectsOwnedList getObjectsOwned()
          Return an object representing the objects that this user owns.
 String getOutputQueue()
          Retrieves the output queue used by this user.
 String getOwner()
          Retrieves who is to own objects created by this user.
 String getPasswordChangeBlock()
          Retrieves the time period during which a password is blocked from being changed following the prior successful password change operation.
 int getPasswordExpirationInterval()
          Retrieves the number of days the user's password can remain active before it must be changed.
 Date getPasswordExpireDate()
          Retrieves the date the user's password expires.
 Date getPasswordLastChangedDate()
          Retrieves the date the user's password was last changed.
 Date getPreviousSignedOnDate()
          Retrieves the date and time the user last signed on.
 String getPrintDevice()
          Retrieves the printer used to print for this user.
 int getSignedOnAttemptsNotValid()
          Retrieves the number of sign-on attempts that were not valid since the last successful sign-on.
 String getSortSequenceTable()
          Retrieves the name of the sort sequence table used for string comparisons.
 String[] getSpecialAuthority()
          Retrieves a list of the special authorities the user has.
 String getSpecialEnvironment()
          Retrieves the special environment the user operates in after signing on.
 String getStatus()
          Retrieves the status of the user profile.
 int getStorageUsed()
          Retrieves the amount of auxiliary storage (in kilobytes) occupied by this user's owned objects.
 String[] getSupplementalGroups()
          Retrieves the supplemental groups for the user profile.
 int getSupplementalGroupsNumber()
          Retrieves the number of supplemental groups for the user profile.
 AS400 getSystem()
          Returns the system object representing the system on which the user profile exists.
 String[] getUserActionAuditLevel()
          Retrieves a list of action audit levels for the user.
 String getUserClassName()
          Retrieves the user class name.
 long getUserID()
          Retrieves the user ID (UID) number for the user profile.
 int getUserIDNumber()
          Deprecated. This method has been replaced by getUserID() which returns a long.
 String[] getUserOptions()
          Retrieves a list of options for users to customize their environment.
 String getUserProfileName()
          Retrieves the name of the user profile for which the information is returned.
 boolean hasSpecialAuthority(String authority)
          Retrieves if this user profile has been granted the specified authority, or belongs to a group profile that has been granted the specified authority.
 boolean isGroupHasMember()
          Retrieves whether this user is a group that has members.
 boolean isLocalPasswordManagement()
          Retrieves whether the password is managed locally.
 boolean isNoPassword()
          Retrieves whether *NONE is specified for the password in the user profile.
 boolean isPasswordSetExpire()
          Retrieves whether the user's password is set to expire, requiring the user to change the password when signing on.
 boolean isWithDigitalCertificates()
          Retrieves whether there are digital certificates associated with this user.
 void loadUserInformation()
          Refreshes the values for all attributes.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes the PropertyChangeListener.
 void removeVetoableChangeListener(VetoableChangeListener listener)
          Removes the VetoableChangeListener.
 void setAccountingCode(String accountingCode)
          Sets the accounting code that is associated with this user profile.
 void setAssistanceLevel(String assistanceLevel)
          Sets which user interface to use.
 void setAttentionKeyHandlingProgram(String attentionKeyHandlingProgram)
          Sets the program to be used as the Attention (ATTN) key handling program for this user.
 void setCCSID(int ccsid)
          Sets the character code set identifier (CCSID) to be used for this user.
 void setCCSID(String ccsid)
          Sets the character code set identifier (CCSID) to be used for this user.
 void setCHRIDControl(String chridControl)
          Sets the character identifier control (CHRIDCTL) for the job.
 void setCountryID(String countryID)
          Sets the country or region identifier to be used for this user.
 void setCurrentLibraryName(String currentLibraryName)
          Sets the name of the current library associated with the job being run.
 void setDescription(String description)
          Sets the text that briefly describes the object.
 void setDisplaySignOnInformation(String displaySignOnInformation)
          Sets whether the sign-on information display is shown.
 void setGroupAuthority(String groupAuthority)
          Sets the specific authority given to the group profile for newly created objects.
 void setGroupAuthorityType(String groupAuthorityType)
          Sets the type of authority to be granted to the group profile for newly-created objects.
 void setGroupID(long groupID)
          Sets the group ID number (gid number) for this user profile.
 void setGroupID(String groupID)
          Sets the group ID number (gid number) for this user profile.
 void setGroupProfileName(String groupProfileName)
          Sets the user's group profile name whose authority is used if no specific authority is given for the user.
 void setHighestSchedulingPriority(int highestSchedulingPriority)
          Sets the highest scheduling priority the user is allowed to have for each job submitted to the system.
 void setHomeDirectory(String homeDirectory)
          Sets the path name of the home directory for this user profile.
 void setInitialMenu(String initialMenu)
          Sets the initial menu displayed when the user signs on the system if the user's routing program is the command processor.
 void setInitialProgram(String initialProgram)
          Sets, for an interactive job, the program called whenever a new routing step is started that has QCMD as the request processing program.
 void setJobDescription(String jobDescription)
          Sets the fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries.
 void setKeyboardBuffering(String keyboardBuffering)
          Sets the keyboard buffering value to be used when a job is initialized for this user profile.
 void setLanguageID(String languageID)
          Sets the language ID to be used for this user.
 void setLimitCapabilities(String limitCapabilities)
          Sets the limit to which the user can control the program, menu, current library, and the ATTN key handling program values.
 void setLimitDeviceSessions(String limitDeviceSessions)
          Sets if the number of device sessions allowed for a user is limited to 1.
 void setLocaleJobAttributes(String[] localeJobAttributes)
          Sets which job attributes are to be taken from the locale specified for the Locale (LOCALE) parameter when the job is initiated.
 void setLocalePathName(String localePathName)
          Sets the path name of the locale that is assigned to LANG environment variable for this user.
 void setLocalPasswordManagement(boolean localPasswordManagement)
          Sets whether the user profile password should be managed locally.
 void setMaximumStorageAllowed(int maximumStorageAllowed)
          Sets the maximum amount of auxiliary storage (in kilobytes) assigned to store permanant objects owned by this user profile (1 kilobyte equals 1024 bytes).
 void setMaximumStorageAllowed(String maximumStorageAllowed)
          Sets the maximum amount of auxiliary storage (in kilobytes) assigned to store permanant objects owned by this user profile (1 kilobyte equals 1024 bytes).
 void setMessageQueue(String messageQueue)
          Sets the message queue to which messages are sent.
 void setMessageQueueDeliveryMethod(String messageQueueDeliveryMethod)
          Sets how the messages are sent to the message queue for this user are to be delivered.
 void setMessageQueueSeverity(int messageQueueSeverity)
          Sets the lowest severity code that a message can have and still be delivered to a user in break or notify mode.
 void setName(String name)
          Sets the user profile name.
 void setObjectAuditingValue(String objectAuditingValue)
          Sets the object auditing value for the user.
 void setOutputQueue(String outputQueue)
          Sets the output queue to be used by this user profile.
 void setOwner(String owner)
          Sets the user profile that is to be the owner of objects created by this user.
 void setPasswordChangeBlock(String pwdChangeBlock)
          Sets the time period during which a password is blocked from being changed following the prior successful password change operation.
 void setPasswordExpirationInterval(int passwordExpirationInterval)
          Sets the password expiration interval (in days).
 void setPasswordExpirationInterval(String passwordExpirationInterval)
          Sets the password expiration interval (in days).
 void setPasswordSetExpire(boolean passwordSetExpire)
          Sets whether the password for this user is set to expired.
 void setPrintDevice(String printDevice)
          Sets the default printer device for this user.
 void setSortSequenceTable(String sortSequenceTable)
          Sets the sort sequence table to be used for string comparisons for this profile.
 void setSpecialAuthority(String[] specialAuthority)
          Sets the special authorities given to a user.
 void setSpecialEnvironment(String specialEnvironment)
          Sets the special environment in which the user operates after signing on.
 void setStatus(String status)
          Sets the status of the user profile.
 void setSupplementalGroups(String[] supplementalGroups)
          Sets the user's supplemental group profiles.
 void setSystem(AS400 system)
          Sets the system object representing the system on which the user profile exists.
 void setUserActionAuditLevel(String[] userActionAuditLevel)
          Sets the level of activity that is audited for this user profile.
 void setUserClassName(String userClassName)
          Sets the type of user associated with this user profile: security officer, security administrator, programmer, system operator, or user.
 void setUserID(long userID)
          Sets the user ID number (uid number) for this user profile.
 void setUserOptions(String[] userOptions)
          Sets the level of help information detail to be shown and the function of the Page Up and Page Down keys by default.
 String toString()
          Sets the string representation of this User object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final String NONE
Constant value representing the String "*NONE".

See Also:
getGroupProfileName(), getAttentionKeyHandlingProgram(), getGroupAuthority(), getInitialProgram(), getLocaleJobAttributes(), getLocalePathName(), getObjectAuditingValue(), getSpecialEnvironment(), Constant Field Values

SPECIAL_AUTHORITY_ALL_OBJECT

public static final String SPECIAL_AUTHORITY_ALL_OBJECT
Constant value representing a special authority of "*ALLOBJ".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_AUDIT

public static final String SPECIAL_AUTHORITY_AUDIT
Constant value representing a special authority of "*AUDIT".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION

public static final String SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION
Constant value representing a special authority of "*IOSYSCFG".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_JOB_CONTROL

public static final String SPECIAL_AUTHORITY_JOB_CONTROL
Constant value representing a special authority of "*JOBCTL".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SAVE_SYSTEM

public static final String SPECIAL_AUTHORITY_SAVE_SYSTEM
Constant value representing a special authority of "*SAVSYS".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR

public static final String SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR
Constant value representing a special authority of "*SECADM".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SERVICE

public static final String SPECIAL_AUTHORITY_SERVICE
Constant value representing a special authority of "*SERVICE".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SPOOL_CONTROL

public static final String SPECIAL_AUTHORITY_SPOOL_CONTROL
Constant value representing a special authority of "*SPLCTL".

See Also:
getSpecialAuthority()
Constructor Detail

User

public User()
Constructs a User object.


User

public User(AS400 system,
            String name)
     throws AS400SecurityException,
            ErrorCompletingRequestException,
            InterruptedException,
            IOException,
            ObjectDoesNotExistException
Constructs a User object. Note that this constructor no longer throws any of the declared exceptions, but they remain for compatibility.

Parameters:
system - The system object representing the system on which the user profile exists.
name - The user profile name.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange() method will be called each time the value of any bound property is changed.

Parameters:
listener - The listener.
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener)

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener. The specified VetoableChangeListener's vetoableChange() method will be called each time the value of any constrained property is changed.

Parameters:
listener - The listener.
See Also:
removeVetoableChangeListener(java.beans.VetoableChangeListener)

exists

public boolean exists()
               throws AS400SecurityException,
                      ErrorCompletingRequestException,
                      InterruptedException,
                      IOException,
                      ObjectDoesNotExistException
Determines if this user profile exists on the system. This method just calls loadUserInformation() and if no exception is thrown, the user profile exists, if a CPF9801 then the user profile does not exist. Any other exceptions (e.g. not enough authority) are still thrown.

The value returned by this method is not cached. That is, every time exists() is called, a call to the system is made to determine if the user profile still exists.

Returns:
true if the profile exists, false if it does not.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getAccountingCode

public String getAccountingCode()
Retrieves the accounting code that is associated with this user.

Returns:
The accounting code that is associated with this user. If the user does not have an accounting code, an empty string ("") is returned.

getAssistanceLevel

public String getAssistanceLevel()
Retrieves the user interface that the user will use.

Returns:
The user interface that the user will use. Possible values are:
  • "*SYSVAL" - The system value QASTLVL determines which user interface the user is using.
  • "*BASIC" - The Operational Assistant user interface.
  • "*INTERMED" - The system user interface.
  • "*ADVANCED" - The expert system user interface.

getAttentionKeyHandlingProgram

public String getAttentionKeyHandlingProgram()
Retrieves the attention key handling program for this user.

Returns:
The attention key handling program for this user. Possible values are:
  • "*SYSVAL" - The system value QATNPGM determines the user's attention key handling program.
  • User.NONE - No attention key handling program is used.
  • The fully qualified integrated file system path name of the attention key handling program.
See Also:
QSYSObjectPathName

getCCSID

public int getCCSID()
Retrieves the character code set ID to be used by the system for this user.

Returns:
The character code set ID to be used by the system for this user. Possible values are:
  • -2 - The system value QCCSID is used to determine the user's character code set ID.
  • A character code set ID.

getCHRIDControl

public String getCHRIDControl()
Retrieves the character identifier control for the user.

Returns:
The character identifier control for this user. Possible values are:
  • "*SYSVAL" - The system value QCHRIDCTL will be used to determine the CHRID control for this user.
  • "*DEVD" - The *DEVD special value performs the same function as on the CHRID command parameter for display files, printer files, and panel groups.
  • "*JOBCCSID" - The *JOBCCSID special value performs the same function as on the CHRID command parameter for display files, printer files, and panel groups.

getCountryID

public String getCountryID()
Retrieves the country or region ID used by the system for this user.

Returns:
The country or region ID used by the system for this user. Possible values are:
  • "*SYSVAL" - The system value QCNTRYID is used to determine the user's country or region ID.
  • A country or region ID.

getCurrentLibraryName

public String getCurrentLibraryName()
Retrieves the name of the user's current library.

Returns:
The name of the user's current library. Possible values are:
  • "*CRTDFT" - The user does not have a current library.
  • A library name.

getDaysUntilPasswordExpire

public int getDaysUntilPasswordExpire()
Retrieves the number of days until the password will expire.

Returns:
The number of days until the password will expire. Possible values are:
  • 0 - The password is expired.
  • 1-7 - The number of days until the password expires.
  • -1 - The password will not expire in the next 7 days.

getDescription

public String getDescription()
Retrieves the descriptive text for the user profile. This value is pre-loaded into any User objects generated from a UserList object so that a call to the system is not required to retrieve this value. In the event that this User object was not constructed by a UserList, the description will need to be retrieved from the system via an implicit call to loadUserInformation().

Returns:
The descriptive text for the user profile.

getDirectoryEntry

public DirectoryEntry getDirectoryEntry()
                                 throws AS400SecurityException,
                                        ErrorCompletingRequestException,
                                        InterruptedException,
                                        IOException,
                                        ObjectDoesNotExistException
Retrieves the system distribution directory entry for the user profile, if one exists. The directory entry is retrieved from the system every time this method is called, so its value is unaffected by any call to loadUserInformation().

Returns:
The directory entry, or null if none exists.
Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

getDisplaySignOnInformation

public String getDisplaySignOnInformation()
Retrieves whether the sign-on information display is shown when the user signs on.

Returns:
Whether the sign-on information display is shown when the user signs on. Possible values are:
  • "*SYSVAL" - The system value QDSPSGNINF determines if the sign-on information display is shown when the user signs on.
  • "*YES" - The sign-on information display is shown when the user signs on.
  • "*NO" - The sign-on information display is not shown when the user signs on.

getGroupAuthority

public String getGroupAuthority()
Retrieves the authority the user's group profile has to objects the user creates.

Returns:
The authority the user's group profile has to objects the user creates. Possible values are:
  • User.NONE - The group profile has no authority to the objects the user creates, or the user does not have a group profile.
  • "*ALL" - The group profile has all authority to the objects the user creates.
  • "*CHANGE" - The group profile has change authority to the objects the user creates.
  • "*USE" - The group profile has use authority to the objects the user creates.
  • "*EXCLUDE" - The group profile has exclude authority to the objects the user creates.

getGroupAuthorityType

public String getGroupAuthorityType()
Retrieves the type of authority the user's group has to objects the user creates.

Returns:
The type of authority the user's group has to objects the user creates. Possible values are:
  • "*PRIVATE" - The group profile has a private authority to the objects the user creates, or the user does not have a group profile.
  • "*PGP" - The group profile will be the primary group for objects the user creates.

getGroupID

public long getGroupID()
Retrieves the group ID number for the user profile. The group ID number is used to identify the user when it is a group and a member of the group is using the integrated file system.

Returns:
The group ID number for the user profile. Possible values are:
  • 0 - user does not have a group ID (*NONE).
  • A GID.

getGroupIDNumber

public int getGroupIDNumber()
Deprecated. This method has been replaced by getGroupID() which returns a long.

Retrieves the group ID number for the user profile. The group ID number is used to identify the user when it is a group and a member of the group is using the integrated file system.

Returns:
The group ID number for the user profile. Possible values are:
  • 0 - user does not have a group ID (*NONE).
  • A GID.

getGroupProfileName

public String getGroupProfileName()
Retrieves the name of the group profile.

Returns:
The name of the group profile. Possible values are:
  • User.NONE - The user does not have a group profile.
  • The group profile name.

getHighestSchedulingPriority

public int getHighestSchedulingPriority()
Retrieves the highest scheduling priority the user is allowed to have for each job submitted to the system.

Returns:
The highest scheduling priority the user is allowed to have for each job submitted to the system. The priority is a value from 0 to 9, with 0 being the highest priority.

getHomeDirectory

public String getHomeDirectory()
Retrieves the home directory for this user profile. The home directory is the user's initial working directory. The working directory, associated with a process, is used in path name resolution in the directory file system for path names that do not begin with a slash (/).

Returns:
The home directory for this user profile.

getIASPNames

public String[] getIASPNames()
Retrieves the list of independent auxiliary storage pool (IASP) names in use by this user.

Returns:
The list of independent auxiliary storage pool (IASP) names in use by this user. If no IASP name are in use by this user, a zero length array is returned. If the system operating system is not release V5R1M0 or higher, null is returned.
See Also:
getIASPStorageAllowed(java.lang.String), getIASPStorageUsed(java.lang.String), AS400.getVRM(), AS400.generateVRM(int, int, int)

getIASPStorageAllowed

public int getIASPStorageAllowed(String iaspName)
Retrieves the maximum amount of auxiliary storage in kilobytes that can be assigned to store permanent object owned by this user on the given independant ASP.

Returns:
The maximum amount of auxiliary storage in kilobytes that can be assigned to store permanent object owned by this user on the given independant ASP. If the user does not have a maximum amount of allowed storage on the given independent ASP, -1 for *NOMAX is returned. If the system operating system is not release V5R1M0 or higher, or if the given IASP name is not listed for this user, -2 is returned.
See Also:
getIASPNames(), getIASPStorageUsed(java.lang.String)

getIASPStorageUsed

public int getIASPStorageUsed(String iaspName)
Retrieves the amount of auxiliary storage in kilobytes occupied by this user's owned objects on the given independent ASP.

Returns:
The amount of auxiliary storage in kilobytes occupied by this user's owned objects on the given independent ASP. If the system operating system is not release V5R1M0 or higher, or if the given IASP name is not listed for this user, -2 is returned.
See Also:
getIASPNames(), getIASPStorageAllowed(java.lang.String)

getInitialMenu

public String getInitialMenu()
Retrieves the initial menu for the user.

Returns:
The initial menu for the user. Possible values are:
  • "*SIGNOFF" - The user is limited to running the initial program specified in this profile.
  • The fully qualified integrated file system path name of the initial menu name.
See Also:
QSYSObjectPathName

getInitialProgram

public String getInitialProgram()
Retrieves the initial program for the user.

Returns:
The initial program for the user. Possible values are:
  • User.NONE - The user does not have an initial program.
  • The fully qualified integrated file system path name of the initial program name.
See Also:
QSYSObjectPathName

getJobDescription

public String getJobDescription()
Retrieves the fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries.

Returns:
The fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries.
See Also:
QSYSObjectPathName

getKeyboardBuffering

public String getKeyboardBuffering()
Retrieves the keyboard buffering value that is used when a job is initialized for this user.

Returns:
The keyboard buffering value that is used when a job is initialized for this user. Possible values are:
  • "*SYSVAL" - The system value QKBDBUF determines the keyboard buffering value for this user.
  • "*YES" - The type-ahead and attention-key buffering options are both on.
  • "*NO" - The type-ahead and attention-key buffering options are not on.
  • "*TYPEAHEAD" - The type-ahead option is on, but the attention-key buffering option is not.

getLanguageID

public String getLanguageID()
Retrieves the language ID used by the system for this user.

Returns:
The language ID used by the system for this user. Possible values are:
  • "*SYSVAL" - The system value QLANGID will be used to determine the language ID.
  • The language ID.

getLimitCapabilities

public String getLimitCapabilities()
Retrieves whether the user has limited capabilites.

Returns:
Whether the user has limited capabilites. Possible values are:
  • "*PARTIAL" - The user cannot change the initial program or current library.
  • "*YES" - The user cannot change the initial menu, initial program, or current library. The user cannot run commands from the command line.
  • "*NO" - The user is not limited.

getLimitDeviceSessions

public String getLimitDeviceSessions()
Retrieves whether the user is limited to one device session. NOTE: Values "0-9" are only valid when running to the i5/OS release after V5R4.

Returns:
Whether the user is limited to one device session. Possible values are:
  • "*SYSVAL" - The system value QLMTDEVSSN determines if the user is limited to one device session.
  • "*YES" - The user is limited to one session.
  • "*NO" - The user is not limited to one device session.
  • "0" - The user is not limited to a specific number of device session. The value has the same meaning as *NO.
  • "1" - The user is limited to a single device session. The value has the same meaning as *YES.
  • "2-9" - The user is limited to the specified number of device sessions.

getLocaleJobAttributes

public String[] getLocaleJobAttributes()
Retrieves a list of the job attributes which are set from the user's locale path name.

Returns:
A list of the job attributes which are set from the user's locale path name. Possible values for the elements of this array are:
  • User.NONE - No job attributes are used from the locale path name at the time a job is started for this user profile.
  • "*SYSVAL" - The job attributes assigned from the locale path name are determined by the system value QSETJOBATR at the time a job is started for this user profile.
  • "*CCSID" - The coded character set identifier is set from the locale path name at the time a job is started for this user profile.
  • "*DATFMT" - The date format is set from the locale path name at the time a job is started for this user profile.
  • "*DATSEP" - The date separator is set from the locale path name at the time a job is started for this user profile.
  • "*SRTSEQ" - The sort sequence is set from the locale path name at the time a job is started for this user profile.
  • "*TIMSEP" - The time separator is set from the locale path name at the time a job is started for this user profile.
  • "*DECFMT" - The decimal format is set from the locale path name at the time a job is started for this user profile.

getLocalePathName

public String getLocalePathName()
Retrieves the locale path name that is assigned to the user profile when a job is started.

Returns:
The locale path name that is assigned to the user profile when a job is started. Possible values are:
  • "*C" - The C locale path name is assigned.
  • User.NONE - No locale path name is assigned.
  • "*POSIX" - The POSIX locale path name is assigned.
  • "*SYSVAL" - The QLOCALE system value is used to determine the locale path name.
  • A locale path name.

getMaximumStorageAllowed

public int getMaximumStorageAllowed()
Retrieves the maximum amount of auxiliary storage (in kilobytes) that can be assigned to store permanant objects owned by the user.

Returns:
The maximum amount of auxiliary storage (in kilobytes) that can be assigned to store permanant objects owned by the user. Possible values are:
  • -1 - The user does not have a maximum amount of allowed storage (*NOMAX).
  • The maximum amount of auxiliary storage (in kilobytes).

getMessageQueue

public String getMessageQueue()
Retrieves the fully qualified integrated file system path name of the message queue that is used by this user.

Returns:
The fully qualified integrated file system path name of the message queue that is used by this user.
See Also:
QSYSObjectPathName

getMessageQueueDeliveryMethod

public String getMessageQueueDeliveryMethod()
Retrieves how the messages are delivered to the message queue used by the user.

Returns:
How the messages are delivered to the message queue used by the user. Possible values are:
  • "*BREAK" - The job to which the message queue is assigned is interrupted when a message arrives on the message queue.
  • "*DFT" - Messages requiring replies are answered with their default reply.
  • "*HOLD" - The messages are held in the message queue until they are requested by the user or program.
  • "*NOTIFY" - The job to which the message queue is assigned is notified when a message arrives on the message queue.

getMessageQueueSeverity

public int getMessageQueueSeverity()
Retrieves the lowest severity that a message can have and still be delivered to a user in break or notify mode.

Returns:
The lowest severity that a message can have and still be delivered to a user in break or notify mode. The severity is a value in the range 0 through 99.

getName

public String getName()
Returns the user profile name.

Returns:
The user profile name.
See Also:
setName(java.lang.String)

getObjectAuditingValue

public String getObjectAuditingValue()
Retrieves the user's object auditing value.

Returns:
The user's object auditing value. Possible values are:
  • User.NONE - No additional object auditing is done for the user.
  • "*CHANGE" - Object changes are audited for the user if the object's auditing value is *USRPRF.
  • "*ALL" - Object read and change operations are audited for the user if the object's auditing value is *USRPRF.

getObjectsOwned

public UserObjectsOwnedList getObjectsOwned()
Return an object representing the objects that this user owns.

Returns:
UserObjectsOwnedList object constructed with default selection criteria.

getOutputQueue

public String getOutputQueue()
Retrieves the output queue used by this user.

Returns:
The output queue used by this user. Possible values are:
  • "*WRKSTN" - The output queue assigned to the user's work station is used.
  • "*DEV" - An output queue with the same name as the device specified in the printer device parameter is used.
  • The fully qualified integrated file system path name of the output queue.
See Also:
QSYSObjectPathName

getOwner

public String getOwner()
Retrieves who is to own objects created by this user.

Returns:
Who is to own objects created by this user. Possible values are:
  • "*USRPRF" - The user owns any objects the user creates. If the user does not have a group profile, the field contains this value.
  • "*GRPPRF" - The user's group profile owns any objects the user creates.

getPasswordExpireDate

public Date getPasswordExpireDate()
Retrieves the date the user's password expires.

Returns:
The date the user's password expires. Possible values are:
  • A date object containing the date the user's password expires.
  • null - The user's password will not expire (password expiration interval of *NOMAX) or the user's password is set to expire.

getPasswordChangeBlock

public String getPasswordChangeBlock()
Retrieves the time period during which a password is blocked from being changed following the prior successful password change operation.

NOTE: This method should not be used when running to i5/OS V5R4 or earlier releases.

Returns:
The time period during which a password is blocked from being changed. Possible values are:
  • "*SYSVAL" - The system value QPWDCHGBLK is used to determine the block password change value.
  • "*NONE" - The password can be changed at any time.
  • "1-99" - Indicates the number of hours a user must wait after the prior successful password change operation before they are able to change the password again.

getPasswordExpirationInterval

public int getPasswordExpirationInterval()
Retrieves the number of days the user's password can remain active before it must be changed.

Returns:
The number of days the user's password can remain active before it must be changed. Possible values are:
  • 0 - The system value QPWDEXPITV is used to determine the user's password expiration interval.
  • -1 - The user's password does not expire (*NOMAX).
  • 1-366 - The number of days the user's password can remain active before it must be changed.

getPasswordLastChangedDate

public Date getPasswordLastChangedDate()
Retrieves the date the user's password was last changed.

Returns:
The date the user's password was last changed.

getPreviousSignedOnDate

public Date getPreviousSignedOnDate()
Retrieves the date and time the user last signed on.

Returns:
The date and time the user last signed on. Possible values are:
  • A date object containing the date and time the user last signed on.
  • null - The user has never signed on the system.

getPrintDevice

public String getPrintDevice()
Retrieves the printer used to print for this user.

Returns:
The printer used to print for this user. Possible values are:
  • "*WRKSTN" - The printer assigned to the user's work station is used.
  • "*SYSVAL" - The default system printer specified in the system value QPRTDEV is used.
  • The print device.

getSignedOnAttemptsNotValid

public int getSignedOnAttemptsNotValid()
Retrieves the number of sign-on attempts that were not valid since the last successful sign-on.

Returns:
The number of sign-on attempts that were not valid since the last successful sign-on.

getSortSequenceTable

public String getSortSequenceTable()
Retrieves the name of the sort sequence table used for string comparisons.

Returns:
The name of the sort sequence table used for string comparisons. Possible values are:
  • "*HEX" - The hexadecimal values of the characters are used to determine the sort sequence.
  • "*LANGIDUNQ" - A unique-weight sort table associated with the language specified.
  • "*LANGIDSHR" - A shared-weight sort table associated with the language specified.
  • "*SYSVAL" - The system value QSRTSEQ.
  • The fully qualified integrated file system path name of the sort sequence table name.
See Also:
QSYSObjectPathName

getSpecialAuthority

public String[] getSpecialAuthority()
Retrieves a list of the special authorities the user has.

Returns:
A list of the special authorities the user has. If the user has no special authorities, an empty array is returned. Possible values for the elements of this array are:

getSpecialEnvironment

public String getSpecialEnvironment()
Retrieves the special environment the user operates in after signing on.

Returns:
The special environment the user operates in after signing on. Possible values are:
  • "*SYSVAL" - The system value QSPCENV is used to determine the user's special environment.
  • User.NONE - The user operates in the i5/OS system environment.
  • "*S36" - The user operates in the System/36 environment.

getStatus

public String getStatus()
Retrieves the status of the user profile.

Returns:
The status of the user profile. Possible values are:
  • "*ENABLED" - The user profile is enabled; therefor, the user is able to sign on.
  • "*DISABLED" - The user profile is not enabled; therefor, the user cannot sign on.

getStorageUsed

public int getStorageUsed()
Retrieves the amount of auxiliary storage (in kilobytes) occupied by this user's owned objects.

Returns:
The amount of auxiliary storage (in kilobytes) occupied by this user's owned objects.

getSupplementalGroups

public String[] getSupplementalGroups()
Retrieves the supplemental groups for the user profile.

Returns:
The array of supplemental groups for the user profile, or an array of length 0 if there are no supplemental groups.

getSupplementalGroupsNumber

public int getSupplementalGroupsNumber()
Retrieves the number of supplemental groups for the user profile.

This method simply returns getSupplementalGroups().length.

Returns:
The number of supplemental groups for the user profile.
See Also:
getSupplementalGroups()

getSystem

public AS400 getSystem()
Returns the system object representing the system on which the user profile exists.

Returns:
The system object representing the system on which the user profile exists. If the system has not been set, null is returned.

getUserActionAuditLevel

public String[] getUserActionAuditLevel()
Retrieves a list of action audit levels for the user.

Returns:
A list of action audit levels for the user. Possible values for the elements of this array are:
  • "*CMD" - The user has the *CMD audit value specified in the user profile.
  • "*CREATE" - The user has the *CREATE audit value specified in the user profile.
  • "*DELETE" - The user has the *DELETE audit value specified in the user profile.
  • "*JOBDTA" - The user has the *JOBDTA audit value specified in the user profile.
  • "*OBJMGT" - The user has the *OBJMGT audit value specified in the user profile.
  • "*OFCSRV" - The user has the *OFCSRV audit value specified in the user profile.
  • "*OPTICAL" - The user has the *OPTICAL audit value specified in the user profile.
  • "*PGMADP" - The user has the *PGMADP audit value specified in the user profile.
  • "*SAVRST" - The user has the *SAVRST audit value specified in the user profile.
  • "*SECURITY" - The user has the *SECURITY audit value specified in the user profile.
  • "*SERVICE" - The user has the *SERVICE audit value specified in the user profile.
  • "*SPLFDTA" - The user has the *SPLFDTA audit value specified in the user profile.
  • "*SYSMGT" - The user has the *SYSMGT audit value specified in the user profile.

getUserClassName

public String getUserClassName()
Retrieves the user class name.

Returns:
The user class name. Possible values are:
  • "*SECOFR" - The user has a class of security officer.
  • "*SECADM" - The user has a class of security administrator.
  • "*PGMR" - The user has a class of programmer.
  • "*SYSOPR" - The user has a class of system operator.
  • "*USER" - The user has a class of end user.

getUserID

public long getUserID()
Retrieves the user ID (UID) number for the user profile. The UID is used to identify the user when using the integrated file system.

Returns:
The user ID (UID) number for the user profile.

getUserIDNumber

public int getUserIDNumber()
Deprecated. This method has been replaced by getUserID() which returns a long.

Retrieves the user ID (UID) number for the user profile. The UID is used to identify the user when using the integrated file system.

Returns:
The user ID (UID) number for the user profile.

getUserOptions

public String[] getUserOptions()
Retrieves a list of options for users to customize their environment.

Returns:
The list of options for users to customize their environment. Possible values include:
  • "*CLKWD" - The keywords are shown when a CL command is displayed.
  • "*EXPERT" - More detailed information is shown when the user is defining or changing the system using edit or display object authority. This is independent of the ASTLVL parameter that is available on the user profile and other commands.
  • "*HLPFULL" - UIM online help is to be displayed full screen instead of in a window.
  • "*STSMSG" - Status messages sent to the user are shown.
  • "*NOSTSMSG" - Status messages sent to the user are not shown.
  • "*ROLLKEY" - The opposite action from the system default for roll keys is taken.
  • "*PRTMSG" - A message is sent to the user when a spooled file is printed.

getUserProfileName

public String getUserProfileName()
Retrieves the name of the user profile for which the information is returned. Note this is the name that is returned by the system, not the name that was set into this User object by the constructor or by a call to setUser().

Returns:
The name of the user profile for which the information is returned.

hasSpecialAuthority

public boolean hasSpecialAuthority(String authority)
Retrieves if this user profile has been granted the specified authority, or belongs to a group profile that has been granted the specified authority.

Parameters:
authority - The authority to check. It must be one of the following special authority values:
  • *ALLOBJ - All object.
  • *SECADM - Security administrator.
  • *JOBCTL - Job control.
  • *SPLCTL - Spool control.
  • *SAVSYS - Save system.
  • *SERVICE - Service.
  • *AUDIT - Audit.
  • *IOSYSCFG - Input/output system configuration.
Returns:
true if this user has the authority or belongs to a group that has the authority; false if it does not have authority or an error occurs.

isGroupHasMember

public boolean isGroupHasMember()
Retrieves whether this user is a group that has members.

For User objects, this should always return false. For UserGroup objects, this should return true if the group profile has members.

Returns:
true if the user is a group that has members, false otherwise.
See Also:
UserGroup

isLocalPasswordManagement

public boolean isLocalPasswordManagement()
Retrieves whether the password is managed locally.

Returns:
true if the password is managed locally, false otherwise.

isNoPassword

public boolean isNoPassword()
Retrieves whether *NONE is specified for the password in the user profile.

Returns:
true if *NONE is specified for the password in the user profile, false otherwise.

isPasswordSetExpire

public boolean isPasswordSetExpire()
Retrieves whether the user's password is set to expire, requiring the user to change the password when signing on.

Returns:
true if the password set to expire, false otherwise.

isWithDigitalCertificates

public boolean isWithDigitalCertificates()
Retrieves whether there are digital certificates associated with this user.

Returns:
true if there are digital certificates associated with this user; false otherwise.

loadUserInformation

public void loadUserInformation()
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException,
                                ObjectDoesNotExistException
Refreshes the values for all attributes.

Throws:
AS400SecurityException - If a security or authority error occurs.
ErrorCompletingRequestException - If an error occurs before the request is completed.
InterruptedException - If this thread is interrupted.
IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener. If the PropertyChangeListener is not on the list, nothing is done.

Parameters:
listener - The listener object.

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes the VetoableChangeListener. If the VetoableChangeListener is not on the list, nothing is done.

Parameters:
listener - The listener object.

setAccountingCode

public void setAccountingCode(String accountingCode)
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException
Sets the accounting code that is associated with this user profile.

Parameters:
accountingCode - The accounting code that is associated with this user profile. Possible values are:
  • "*BLANK" - An accounting code of 15 blanks is assigned to this user profile.
  • An accounting code - A 15 character accounting code to be used by jobs that get their accounting code from this user profile. If less than 15 characters are specified, the string is padded on the right with blanks.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setAssistanceLevel

public void setAssistanceLevel(String assistanceLevel)
                        throws AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException
Sets which user interface to use.

Parameters:
assistanceLevel - The user interface to use. Possible values are:
  • "*SYSVAL" - The assistance level defined in the system value QASTLVL is used.
  • "*BASIC" - The Operational Assistant user interface is used.
  • "*INTERMED" - The system user interface is used.
  • "*ADVANCED" - The expert system user interface is used. To allow for more list entries, option keys and function keys are not displayed. If a command does not have an advanced (*ADVANCED) level, the intermediate (*INTERMED) level is used.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setAttentionKeyHandlingProgram

public void setAttentionKeyHandlingProgram(String attentionKeyHandlingProgram)
                                    throws AS400SecurityException,
                                           ErrorCompletingRequestException,
                                           InterruptedException,
                                           IOException
Sets the program to be used as the Attention (ATTN) key handling program for this user. The ATTN key handling program is called when the ATTN key is pressed during an interactive job. The program is active only when the user routes to the system-supplied QCMD processor. The ATTN key handling program is set on before the initial program (if any) is called and it is active for both program and menu. If the program changes the ATNPGM (by using the SETATNPGM command), the new program remains active only for the duration of the program. When contol returns and QCMD call the menu, the original ATTN key handling program becomes active again. If the SETATNPGM command is run from the menues or an application is called from the menues, the new ATTN key handling program that is specified overrides the original ATTN key handling program. If *YES or *PARTIAL is specified for the Limit capabilites (LMTCPB) parameter on the Create User Profile (CRTUSRPRF) or Change User Profile (CHGUSRPRF) command, the ATTN key handling program cannot be changed. The caller must have *USE authority to the specified program.

Parameters:
attentionKeyHandlingProgram - The program to be used as the Attention (ATTN) key handling program for this user. Possible values are:
  • "*SYSVAL" - The system value QATNPGM is used.
  • User.NONE - No ATTN key handling program is used by this user.
  • "*ASSIST" - The Operational Assistant ATTN key handling program, QEZMAIN, is used.
  • The fully qualified integrated file system path name of the attention key handling program.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setCCSID

public void setCCSID(int ccsid)
              throws AS400SecurityException,
                     ErrorCompletingRequestException,
                     InterruptedException,
                     IOException
Sets the character code set identifier (CCSID) to be used for this user.

A CCSID is a 16-bit number identifying a specific set of encoding scheme identifiers, character set identifiers, code page identifiers, and additional coding-related information that uniquely identifies the coded graphic representation used.

Note: If the value for CCSID is changed, the change does not affect job that are currently running.

Parameters:
ccsid - The character code set identifier (CCSID) to be used for this user. Possible values are:
  • -2 - The system value QCCSID is used to determine the user's character code set ID.
  • A character code set ID.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setCCSID

public void setCCSID(String ccsid)
              throws AS400SecurityException,
                     ErrorCompletingRequestException,
                     InterruptedException,
                     IOException
Sets the character code set identifier (CCSID) to be used for this user.

A CCSID is a 16-bit number identifying a specific set of encoding scheme identifiers, character set identifiers, code page identifiers, and additional coding-related information that uniquely identifies the coded graphic representation used.

Note: If the value for CCSID is changed, the change does not affect job that are currently running.

Parameters:
ccsid - The character code set identifier (CCSID) to be used for this user. Possible values are:
  • "*SYSVAL" - The system value QCCSID is used to determine the user's character code set ID.
  • "*HEX" - The CCSID 65535 is used.
  • A character code set ID.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setCHRIDControl

public void setCHRIDControl(String chridControl)
                     throws AS400SecurityException,
                            ErrorCompletingRequestException,
                            InterruptedException,
                            IOException
Sets the character identifier control (CHRIDCTL) for the job. This attribute controls the type of coded character set identifier (CCSID) conversion that occurs for display files, printer files and panel groups. The *CHRIDCTL special value must be specified for the Character identifier (CHRID) parameter an the create, change, or override commands for display files, printer files, and panel groups before this attribute will be used.

Parameters:
chridControl - The character identifier control (CHRIDCTL) for the job. Possible values are:
  • "*SYSVAL" - The system value QCHRIDCTL is used.
  • "*DEVD" - The *DEVD special value performs the same function as on the CHRID command parameter for display files, printer files, and panel groups.
  • "*JOBCCSID" - The *JOBCCSID special value performs the same function as on the CHRID command parameter for display files, printer files, and panel groups.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setCountryID

public void setCountryID(String countryID)
                  throws AS400SecurityException,
                         ErrorCompletingRequestException,
                         InterruptedException,
                         IOException
Sets the country or region identifier to be used for this user.

Parameters:
countryID - The country or region identifier to be used for this user. Possible values are:
  • "*SYSVAL" - The system value QCNTRYID is used.
  • A country or region identifier.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setCurrentLibraryName

public void setCurrentLibraryName(String currentLibraryName)
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException
Sets the name of the current library associated with the job being run.

Specifies the name of the library to be used as the current library for this user. If *PARTIAL or *YES is specified for the Limit capabilities (LMTCPB) parameter of the Create User Profile (CRTUSRPRF) or Change User Profile (CHGUSRPRF) command, the user cannot change the current library at sign-on or with the Change Profile (CHGPRF) command.

The caller must have *USE authority to the specified library.

Parameters:
currentLibraryName - The name of the current library associated with the job being run. Possible values are:
  • "*CRTDFT" - The user has no current library. The library QGPL is used as the default current library.
  • A library name.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setDescription

public void setDescription(String description)
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException
Sets the text that briefly describes the object.

Parameters:
description - The text that briefly describes the object. Possible values are:
  • "*BLANK" - No text is specified.
  • No more than 50 characters of text.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setDisplaySignOnInformation

public void setDisplaySignOnInformation(String displaySignOnInformation)
                                 throws AS400SecurityException,
                                        ErrorCompletingRequestException,
                                        InterruptedException,
                                        IOException
Sets whether the sign-on information display is shown.

Parameters:
displaySignOnInformation - Whether the sign-on information display is shown. Possible values are:
  • "*SYSVAL" - The system value QDSPSGNINF is used to determine whether the sign-on information display is shown.
  • "*NO" - The sign-on information display is not shown.
  • "*YES" - The sign-on information display is shown.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setGroupAuthority

public void setGroupAuthority(String groupAuthority)
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException
Sets the specific authority given to the group profile for newly created objects. If *GRPPRF is specified for the Owner (OWNER) parameter, specification of this parameter is not allowed.

Parameters:
groupAuthority - The specific authority given to the group profile for newly created objects. Possible values are:
  • User.NONE - No group authority is given.
  • "*ALL" - The user can perform all operations execept those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user can also change ownership of the object.
  • "*CHANGE" - The user can perform all operations execept those limited to the owner or controlled by the object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
  • "*USE" - The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. User (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
  • "*EXCLUDE" - The user cannot access the object.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setGroupAuthorityType

public void setGroupAuthorityType(String groupAuthorityType)
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException
Sets the type of authority to be granted to the group profile for newly-created objects. If *NONE is specified for the Group Authority (GRPAUT) parameter, specification of this parameter is ignored.

Parameters:
groupAuthorityType - The type of authority to be granted to the group profile for newly-created objects. Possible values are:
  • "*PRIVATE" - The group profile is granted private authority to newly-created objects, with the authority value determined by the GRPAUT parameter. If the authority value in the GRPAUT parameter is *NONE, this value is ignored.
  • "*PGP" - The group profile is the primary group for newly-created objects, with the authority value determined by the GRPAUT parameter. If the authority value in the GRPAUT parameter is *NONE, this value is ignored.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setGroupID

public void setGroupID(long groupID)
                throws AS400SecurityException,
                       ErrorCompletingRequestException,
                       InterruptedException,
                       IOException
Sets the group ID number (gid number) for this user profile. The gid number is used to identify the group profile when a member of the group is using the directory file system. The gid number for a user may not be changed if:

Parameters:
groupID - The group ID number (gid number) for this user profile. Possible values are:
  • 0 - The user does not have a gid number or an existing gid number is removed.

    Note: This value cannot be specified if the user is a group profile or the primary group of an object.

  • 1-4294967294 - The gid number to be assigned to the user profile. The gid number assigned must not already be assigned to another user profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setGroupID

public void setGroupID(String groupID)
                throws AS400SecurityException,
                       ErrorCompletingRequestException,
                       InterruptedException,
                       IOException
Sets the group ID number (gid number) for this user profile. The gid number is used to identify the group profile when a member of the group is using the directory file system. The gid number for a user may not be changed if:

Parameters:
groupID - The group ID number (gid number) for this user profile. Possible values are:
  • "*NONE" - The user does not have a gid number or an existing gid number is removed.

    Note: This value cannot be specified if the user is a group profile or the primary group of an object.

  • "*GEN" - The gid number will be generated for the user. The system generates a gid number that is not already assigned to another user. The gid number generated is greater than 100.
  • 1-4294967294 - The gid number to be assigned to the user profile. The gid number assigned must not already be assigned to another user profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setGroupProfileName

public void setGroupProfileName(String groupProfileName)
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException
Sets the user's group profile name whose authority is used if no specific authority is given for the user. The caller must have object management (*OBJMGT) and change (*CHANGE) authority to the profile specified for the Group profile (GRPPRF) parameter. The required *OBJMGT authority cannot be given by a program adopt operation.

Parameters:
groupProfileName - The user's group profile name whose authority is used if no specific authority is given for the user. Possible values are:
  • User.NONE - The user profile has no group profile.
  • The name of the group profile used with this user profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setHighestSchedulingPriority

public void setHighestSchedulingPriority(int highestSchedulingPriority)
                                  throws AS400SecurityException,
                                         ErrorCompletingRequestException,
                                         InterruptedException,
                                         IOException
Sets the highest scheduling priority the user is allowed to have for each job submitted to the system. This value controls the job processing priority and output priority for any job running under this user profile; that is, values specified in the JOBPTY and OUTPTY parameters of any job command cannot exceed the PTYLMT value of the user profile under which the job is run. The scheduling priority can have a value ranging from 0 through 9, where 0 is the highest priority and 9 is the lowest priority.

Parameters:
highestSchedulingPriority - The highest scheduling priority the user is allowed to have for each job submitted to the system.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setHomeDirectory

public void setHomeDirectory(String homeDirectory)
                      throws AS400SecurityException,
                             ErrorCompletingRequestException,
                             InterruptedException,
                             IOException
Sets the path name of the home directory for this user profile. The home directory is the user's initial working directory. The working directory, associated with a process, is used during path name resolution in the directory file system for path names that do not begin with a slash (/). If the home directory specified does not exist when the user signs on, the user's initial working directory is the root (/) directory.

Parameters:
homeDirectory - The path name of the home directory for this user profile. Possible values are:
  • "*USRPRF" - The home directory assigned to the user will be /home/USRPRF, where USRPRF is the name of the user profile.
  • The path name of the home directory to be assigned to this user.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setInitialMenu

public void setInitialMenu(String initialMenu)
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException
Sets the initial menu displayed when the user signs on the system if the user's routing program is the command processor. If *YES is specified for the Limit capabilities (LMTCPB) parameter, the user cannot change the menu either at sign-on or with the Change Profile (CHGPRF) command.

A System/36 environment menu can be specified as the initial menu if either of the following conditions are true:

The caller must have *USE authority to the specified menu.

Parameters:
initialMenu - The initial menu displayed when the user signs on the system if the user's routing program is the command processor. Possible values are:
  • "*SIGNOFF" - The system signs off the user when the program completes. This is intended for users authorized only to run the program.
  • The fully qualified integrated file system path name of the initial menu.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setInitialProgram

public void setInitialProgram(String initialProgram)
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException
Sets, for an interactive job, the program called whenever a new routing step is started that has QCMD as the request processing program. If *PARTIAL or *YES is specified for the Limit capabilities parameter, the program value cannot be changed at sign on or by using the Change Profile (CHGPRF) command. No parameters can be passed to the program.

A System/36 environment procedure name can be specified as the initial program if the procedure is a member of the file QS36PRC (in the library list or specified library) and if either of the following conditions are true:

The caller must have *USE authority to the specified program.

Parameters:
initialProgram - The initial program for the user. Possible values are:
  • User.NONE - No program is called when the user signs on. If a menu name is specified in the Initial menu (INLMNU) parameter, that menu is displayed.
  • The fully qualified integrated file system path name of the initial program for the user.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setJobDescription

public void setJobDescription(String jobDescription)
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException
Sets the fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries. If the job description does not exist when the user profile is created or changed, a library qualifier must be specified, because the job description name is kept in the user profile. The caller must have *USE authority to the specified job description.

Parameters:
jobDescription - The fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setKeyboardBuffering

public void setKeyboardBuffering(String keyboardBuffering)
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException
Sets the keyboard buffering value to be used when a job is initialized for this user profile. If the type-ahead feature is active, you can buffer your keyboard strokes. If the attention key buffering option is active, the attention key is buffered as any other key. If it is not active, the attention key is not buffered and is sent to the system even if the display station is input-inhibited. This value can alse be set by a user application.

Parameters:
keyboardBuffering - The keyboard buffering value to be used when a job is initialized for this user profile. Possible values are:
  • "*SYSVAL" - The system value, QKBDBUF, is used to determine the keyboard buffering value.
  • "*NO" - The type-ahead and attention-key buffering options are not active.
  • "*TYPEAHEAD" - The type-ahead option is active, but the attention key buffering option is not.
  • "*YES" - The type-ahead and attention key buffering options are active.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setLanguageID

public void setLanguageID(String languageID)
                   throws AS400SecurityException,
                          ErrorCompletingRequestException,
                          InterruptedException,
                          IOException
Sets the language ID to be used for this user.

Parameters:
languageID - The language ID to be used for this user. Possible values are:
  • "*SYSVAL" - The system value QLANGID is used.
  • The language ID to be used.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setLimitCapabilities

public void setLimitCapabilities(String limitCapabilities)
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException
Sets the limit to which the user can control the program, menu, current library, and the ATTN key handling program values. It alse determines whether the user can run commands from the command line. This parameter is ignored when the security level is 10.

Note: When creating or changing other users' user profile, you cannot specify values on this parameter that grant greater capabilities to other users than your own user profile grants to you. For example, if *PARTIAL is specified for the Limit capabilities (LMTCPB) parameter in your user profile, you can specify *PARTIAL or *YES for anther user. You cannot specify *NO for another user.

Parameters:
limitCapabilities - The limit to which the user can control the program, menu, current library, and the ATTN key handling program values. Possible values are:
  • "*NO" - The program, menu, and current library values can be changed when the usre signs on the system. User may change the program, menu, current library, or ATTN key handling program values is the own user profiles with the Change Profile (CHGPRF) command. Commands can be run from a command line.
  • "*PARTIAL" - The program and current library cannot be changed on the sign-on display. The menu can be changed and comands can be run from a command line. A user can change the menu value with the Change profile (CHGPRF) command. The program, current library, and the ATTN key handling program cannot be changed using the CHGPRF command.
  • "*YES" - The program, menu, and current library values cannot be changed on the sign-on display. Commands cannot be run when issued from a command line or by selecting an option from a command grouping menu such as CMDADD, but can still be run from a command entry screen. The user cannot change the program, menu, current library, or the ATTN key program handling values by using the CHGPRF command.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setLimitDeviceSessions

public void setLimitDeviceSessions(String limitDeviceSessions)
                            throws AS400SecurityException,
                                   ErrorCompletingRequestException,
                                   InterruptedException,
                                   IOException
Sets if the number of device sessions allowed for a user is limited to 1. This does not limit SYSREQ and second sign-on. NOTE: Values "0-9" are only valid when running to the i5/OS release after V5R4.

Parameters:
limitDeviceSessions - If the number of device sessions allowed for a user is limited to 1. Possible values are:
  • "*SYSVAL" - The system value QLMTDEVSSN is used to determine whether the user is limited to a single device session.
  • "*NO" - The user is not limited to one device session.
  • "*YES" - The user is limited to one session.
  • "0" - The user is not limited to a specific number of device session. The value has the same meaning as *NO.
  • "1" - The user is limited to a single device session. The value has the same meaning as *YES.
  • "2-9" - The user is limited to the specified number of device sessions.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setLocaleJobAttributes

public void setLocaleJobAttributes(String[] localeJobAttributes)
                            throws AS400SecurityException,
                                   ErrorCompletingRequestException,
                                   InterruptedException,
                                   IOException
Sets which job attributes are to be taken from the locale specified for the Locale (LOCALE) parameter when the job is initiated.

Parameters:
localeJobAttributes - A list of attributes which are set from the locale path name at the time a job is started for this user. Possible values for the elements of this array are:
  • "*SYSVAL" - The system value, QSETJOBATR, is used to determine which job attributes are taken from the locale.
  • User.NONE - No job attributes are taken from the locale.
  • "*CCSID" - The coded character set identifier from the locale is used. The CCSID value from the locale overrides the user profile CCSID.
  • "*DATFMT" - The date format from the locale is used.
  • "*DATSEP" - The date separator from the locale is used.
  • "*DECFMT" - The decimal format from the locale is used.
  • "*SRTSEQ" - The sort sequence from the locale is used. The sort sequence from the locale overrides the user profile sort sequence.
  • "*TIMSEP" - The time separator from the locale is used.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setLocalePathName

public void setLocalePathName(String localePathName)
                       throws AS400SecurityException,
                              ErrorCompletingRequestException,
                              InterruptedException,
                              IOException
Sets the path name of the locale that is assigned to LANG environment variable for this user.

Parameters:
localePathName - The locale path name that is assigned to the user profile when a job is started. Possible values are:
  • "*SYSVAL" - The system value QLOCALE is used to determine the locale path name to be assigned for this user.
  • User.NONE - No locale path name is assigned for this user.
  • "*C" - The C locale path name is assigned for this user.
  • "*POSIX" - The POSIX locale path name is assigned for this user.
  • The path name of the locale to be assigned for this user.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setLocalPasswordManagement

public void setLocalPasswordManagement(boolean localPasswordManagement)
                                throws AS400SecurityException,
                                       ErrorCompletingRequestException,
                                       InterruptedException,
                                       IOException
Sets whether the user profile password should be managed locally.

Parameters:
localPasswordManagement - true if the password will be managed on the local system, false otherwise.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setMaximumStorageAllowed

public void setMaximumStorageAllowed(int maximumStorageAllowed)
                              throws AS400SecurityException,
                                     ErrorCompletingRequestException,
                                     InterruptedException,
                                     IOException
Sets the maximum amount of auxiliary storage (in kilobytes) assigned to store permanant objects owned by this user profile (1 kilobyte equals 1024 bytes). If the maximum is exceeded, when an interactive user tries to create an object, an error message is displayed, and the object is not created. If the maximum is exceeded when an object is created in a batch job, an error message is sent to the job log (depending on the logging level of the job), and the object is not created.

Storage is allocated in 4K increments. Therefore, if you specify MAXSTG (9), the profile is allocated 12K of storage.

When planning maximum storage for user profiles, consider the following system actions:

Parameters:
maximumStorageAllowed - The maximum amount of auxiliary storage (in kilobytes) assigned to store permanant objects owned by this user profile. Possible values are:
  • -1 - As much storage as is required is assigned to this profile (*NOMAX).
  • The maximum amount of storage for the user, in kilobytes (1 kilobyte equals 1024 bytes).
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setMaximumStorageAllowed

public void setMaximumStorageAllowed(String maximumStorageAllowed)
                              throws AS400SecurityException,
                                     ErrorCompletingRequestException,
                                     InterruptedException,
                                     IOException
Sets the maximum amount of auxiliary storage (in kilobytes) assigned to store permanant objects owned by this user profile (1 kilobyte equals 1024 bytes). If the maximum is exceeded, when an interactive user tries to create an object, an error message is displayed, and the object is not created. If the maximum is exceeded when an object is created in a batch job, an error message is sent to the job log (depending on the logging level of the job), and the object is not created.

Storage is allocated in 4K increments. Therefore, if you specify MAXSTG (9), the profile is allocated 12K of storage.

When planning maximum storage for user profiles, consider the following system actions:

Parameters:
maximumStorageAllowed - The maximum amount of auxiliary storage (in kilobytes) assigned to store permanant objects owned by this user profile. Possible values are:
  • "*NOMAX" - As much storage as is required is assigned to this profile.
  • The maximum amount of storage for the user, in kilobytes (1 kilobyte equals 1024 bytes).
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setMessageQueue

public void setMessageQueue(String messageQueue)
                     throws AS400SecurityException,
                            ErrorCompletingRequestException,
                            InterruptedException,
                            IOException
Sets the message queue to which messages are sent.

Note: The message queue is created, if it does not exist. The user profile specified for the User profile (USRPRF) parameter is the owner of the message queue.

The caller must have *USE authority to the specified message queue.

Parameters:
messageQueue - The message queue to which messages are sent. Possible values are:
  • "*USRPRF" - A message queue with the same name as that specified for the USRPRF parameter is used as the message queue for this user. This message queue is located in the QUSERSYS library.
  • The fully qualified integrated file system path name of the message queue to be used with this profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setMessageQueueDeliveryMethod

public void setMessageQueueDeliveryMethod(String messageQueueDeliveryMethod)
                                   throws AS400SecurityException,
                                          ErrorCompletingRequestException,
                                          InterruptedException,
                                          IOException
Sets how the messages are sent to the message queue for this user are to be delivered.

Parameters:
messageQueueDeliveryMethod - How the messages are sent to the message queue for this user are to be delivered. Possible values are:
  • "*NOTIFY" - The job to which the message queue is assigned is notified when a message arrives on the message queue. For interactive jobs at a work station, the audible alarm is sounded (if the alarm feature is set) and the Message Waiting light is turned on. The delivery mode cannot be changed to *NOTIFY if the message queue is also being used by another job.
  • "*HOLD" - The messages are held in the message queue until they are requested by the user or program.
  • "*BREAK" - The job to which the message queue is assigned is interrupted when a message arrives at the message queue. If the job is an interactive job, the autdible alarm is sounded (if the alarm feature is set). The delivery mode cannot be changed to *BREAK if the message queue is also being used by another job.
  • "*DFT" - The default reply to the inquiry message is sent. If no default reply is specified in the message description of the inquiry message, the system default reply, *N, is used.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setMessageQueueSeverity

public void setMessageQueueSeverity(int messageQueueSeverity)
                             throws AS400SecurityException,
                                    ErrorCompletingRequestException,
                                    InterruptedException,
                                    IOException
Sets the lowest severity code that a message can have and still be delivered to a user in break or notify mode. Messages arriving at the message queue whose severities are lower than the the severity code specified for this parameter do not interrupt the job or turn on the audible alarm or the message-waiting light; they are held in the queue until they are requested by using the Display Message (DSPMSG) command. If *BREAK or *NOTIFY is specidied for the Delivery (DLVRY) parameter, and is in effect when a message arrives at the queue, the message is delivered if the severity code associated with the message is equal or greater then the value specified here. Otherwiese, the message is held in the queue until it is requested.

Parameters:
messageQueueSeverity - A severity code ranging from 00 through 99.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setName

public void setName(String name)
             throws PropertyVetoException
Sets the user profile name. This does not change the name of the user profile on the system. Instead, it changes the user profile to which this User object references. This property cannot be changed if the object has established a connection to the system.

Parameters:
name - The user profile name.
Throws:
PropertyVetoException - If any of the registered listeners vetos the property change.
See Also:
getName()

setObjectAuditingValue

public void setObjectAuditingValue(String objectAuditingValue)
                            throws AS400SecurityException,
                                   ErrorCompletingRequestException,
                                   InterruptedException,
                                   IOException
Sets the object auditing value for the user. This value only takes effect if the object auditing (OBJAUD) value for the object being accessed has the value *USRPRF.

Implementation note: The method internally calls the Change User Auditing (CHGUSRAUD) command and not the Change User Profile (CHGUSRPRF) command. The caller must have audit (*AUDIT) special authority. Changes take effect the next time a job is started for this user.

Parameters:
objectAuditingValue - The object auditing value for the user. Possible values are:
  • User.NONE - The auditing value for the object determines when auditing is performed.
  • "*CHANGE" - All changes accesses by this user on all objects with the *USRPRF audit value are logged.
  • "*ALL" - All change and read accesses by this use on all objects with the *USRPRF audit value are logged.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setOutputQueue

public void setOutputQueue(String outputQueue)
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException
Sets the output queue to be used by this user profile. The output queue must already exist when this command is run. The caller must have *USE authority to the specified output queue.

Parameters:
outputQueue - The output queue to be used by this user profile. Possible values are:
  • "*WRKSTN" - The output queue assigned to the user's work station is used.
  • "*DEV" - The output queue associated with the printer specified for the Print device (PRTDEV) parameter is used. The output queue has the same name as the printer. (The pringer file DEV parameter is determined by the CRTPRTF, CHGPRTF, or the OVRPRTF command).

    Note: This assumes the defaults are specified for the Output queue (OUTQ) parameter for the printer file, job description, user profile, and workstation.

  • The fully qualified integrated file system path name of the output queue to be used by this user profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setOwner

public void setOwner(String owner)
              throws AS400SecurityException,
                     ErrorCompletingRequestException,
                     InterruptedException,
                     IOException
Sets the user profile that is to be the owner of objects created by this user.

Parameters:
owner - The user profile that is to be the owner of objects created by this user. Possible values are:
  • "*USRPRF" - The user profile associated with the job is the owner of the object.
  • "*GRPPRF" - The group profile is made the owner of newly created objects and has all authority to the object. The user profile associated with the job does not have any specific authority to the object. If *GRPPRF is specified, a user profile name must be specified for the Group profile (GRPPRF) parameter, and the Group authority (GRPAUT) parameter cannot be specified.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setPasswordChangeBlock

public void setPasswordChangeBlock(String pwdChangeBlock)
                            throws AS400SecurityException,
                                   ErrorCompletingRequestException,
                                   InterruptedException,
                                   IOException
Sets the time period during which a password is blocked from being changed following the prior successful password change operation.

NOTE: This method should not be used when running to i5/OS V5R4 or earlier releases.

Parameters:
pwdChangeBlock - The time period during which a password is blocked from being changed. Possible values are:
  • "*SYSVAL" - The system value QPWDCHGBLK is used to determine the block password change value.
  • "*NONE" - The password can be changed at any time.
  • "1-99" - Indicates the number of hours a user must wait after the prior successful password change operation before they are able to change the password again.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setPasswordExpirationInterval

public void setPasswordExpirationInterval(int passwordExpirationInterval)
                                   throws AS400SecurityException,
                                          ErrorCompletingRequestException,
                                          InterruptedException,
                                          IOException
Sets the password expiration interval (in days).

Parameters:
passwordExpirationInterval - The number of days the user's password can remain active before it must be changed. Possible values are:
  • 0 - The system value QPWDEXPITV is used to determine the password expiration interval (*SYSVAL).
  • -1 - The password does not expire (*NOMAX).
  • 1-366 - The number of days between the date when the password is changed and the date when the password expires.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setPasswordExpirationInterval

public void setPasswordExpirationInterval(String passwordExpirationInterval)
                                   throws AS400SecurityException,
                                          ErrorCompletingRequestException,
                                          InterruptedException,
                                          IOException
Sets the password expiration interval (in days).

Parameters:
passwordExpirationInterval - The number of days the user's password can remain active before it must be changed. Possible values are:
  • "*SYSVAL" - The system value QPWDEXPITV is used to determine the password expiration interval.
  • "*NOMAX" - The password does not expire.
  • 1-366 - The number of days between the date when the password is changed and the date when the password expires.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setPasswordSetExpire

public void setPasswordSetExpire(boolean passwordSetExpire)
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException
Sets whether the password for this user is set to expired. If the password is set to expired, the use is required to change the password to sign on the system. When the user attempts to sign on the system, the sign-on information display is shown and the user has the option to change this password.

Parameters:
passwordSetExpire - true if the password set to expired, false otherwise.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setPrintDevice

public void setPrintDevice(String printDevice)
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException
Sets the default printer device for this user. If the pringer file used to create printed output specifies to spool the data, the spooled file is placed on the device's output queue, which is named the same as the device.

Note: This assumes the defaults are specified for the Output queue (OUTQ) parameter for the printer file, job description, user profile, and workstation.

The caller must have *USE authority to the specified print device.

Parameters:
printDevice - The default printer device for this user. Possible values are:
  • "*WRKSTN" - The printer assigned to the user's work station is used.
  • "*SYSVAL" - The value specified in the system value QPRTDEV is used.
  • The name of a printer that is to be used to print the output for this user.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setSortSequenceTable

public void setSortSequenceTable(String sortSequenceTable)
                          throws AS400SecurityException,
                                 ErrorCompletingRequestException,
                                 InterruptedException,
                                 IOException
Sets the sort sequence table to be used for string comparisons for this profile.

Parameters:
sortSequenceTable - The sort sequence table to be used for string comparisons for this profile. Possible values are:
  • "*SYSVAL" - The system value QSRTSEQ is used.
  • "*HEX" - A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence.
  • "*LANGIDUNQ" - A unique-weight sort table is used
  • "*LANGIDSHR" - A shared-weight sort table is used.
  • The fully qualified integrated file system path name of the sort sequence table to be used with this profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
See Also:
QSYSObjectPathName

setSpecialAuthority

public void setSpecialAuthority(String[] specialAuthority)
                         throws AS400SecurityException,
                                ErrorCompletingRequestException,
                                InterruptedException,
                                IOException
Sets the special authorities given to a user. Special authorities are required to perform certain functions on the system. Special authorities cannot be removed from many of the system-supplied user profiles, including QSECOFR and QSYS.

The following special authorities are usually given:

Restrictions:

Parameters:
specialAuthority - The special authorities given to a user. Possible values for the elements of this array are:
  • "*USRCLS" - Special authorities are granted to this user based on the value specified on User class (USRCLS) parameter.
  • "*NONE" - No special authorities are granted to this user.
  • User.SPECIAL_AUTHORITY_ALL_OBJECT - All object authority is given to the user. The user can access any system resource with or without private user authorizations.
  • User.SPECIAL_AUTHORITY_AUDIT - Audit authority is granted to this user. The user is given the authority to perform auditing functions. Auditing functions include turning auditing on or off for the system and controlling the level of auditing on an object or user.
  • User.SPECIAL_AUTHORITY_JOB_CONTROL - Job control authority is given to the user. The user has authority to change, display, hold, release, cancel, and clear all jobs that are running on the system or that are on a job queue or output queue that has OPRCTL (*YES) specified. The user also has the authority to start writers and to stop active subsystems.
  • User.SPECIAL_AUTHORITY_SAVE_SYSTEM - Save system authority is given to the user profile. This user has the authority to save, restore, and free storage for all objects on the system, with or without object management authority.
  • User.SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION - Input/output (I/O) system configuration authority is given to the user. The user has authority to change system I/O configurations.
  • User.SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR - Security administrator authority is given to the user. The user can create, change, or delete user profiles if authorized to the Create User Profile (CRTUSRPRF), Change User Profile (CHGUSRPRF), or Delete User Profile (DLTUSRPRF) commands and is authorized to the user profile. This authority does not allow giving special authorities that this user profile does not have. To give *SECADM special authority to another user, a user must have both *ALLOBJ and *SECADM special authorities.
  • User.SPECIAL_AUTHORITY_SERVICE - Service authority is given to this user. The user can perform service functions.
  • User.SPECIAL_AUTHORITY_SPOOL_CONTROL - Spool control authority is given to this user. The user can perform all spool functions.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setSpecialEnvironment

public void setSpecialEnvironment(String specialEnvironment)
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException
Sets the special environment in which the user operates after signing on.

Parameters:
specialEnvironment - The special environment in which the user operates after signing on. Possible values are:
  • "*SYSVAL" - The system value, QSPCENV, is used to determine the system environment after the user signs on the system.
  • User.NONE - The user operates in the i5/OS system environment after signing on the system.
  • "*S36" - The user operates in the System/36 environment after signing on the system.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setStatus

public void setStatus(String status)
               throws AS400SecurityException,
                      ErrorCompletingRequestException,
                      InterruptedException,
                      IOException
Sets the status of the user profile.

The system will disable a user profile if the number of failed sign-on attempts reaches the limit specified on the QMAXSIGN system value and option 2 or 3 has been specified on the QMAXSGNACN system value.

Parameters:
status - The status of the user profile. Possible values are:
  • "*ENABLED" - The user profile is valid for sign-on.
  • "*DISABLED" - The user profile is not valid for sign-on until an authorized user enables it again. Batch jobs can be submitted under a disabled user profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setSupplementalGroups

public void setSupplementalGroups(String[] supplementalGroups)
                           throws AS400SecurityException,
                                  ErrorCompletingRequestException,
                                  InterruptedException,
                                  IOException
Sets the user's supplemental group profiles. The profiles specified here, along with the group profile specified for the Group profile (GRPPRF) parameter, are used to determine what authority the user has if no specific user authority is given for the job. If profiles are specified for this parameter, a group profile name must be specified on the GRPPRF parameter for this user profile (either on this command or on a previous Create User Profile (CRTUSRPRF) or Change User Profile (CHGUSRPRF) command. The current user of this command must have object management (*OBJMGT) and change (*CHANGE) authority to the profiles specified for this. The required *OBJMGT authority cannot be given by a program adopt operation.

Notes:

Parameters:
supplementalGroups - The user's supplemental group profiles. Possible values for the elements of this array are:
  • "*NONE" - No supplemental group profiles are used with this user profile.
  • The group profile names to be used with this user profile and the group profile specified on the GRPPRF parameter to determine a job's eligibility for getting access to existing objects and special authority. A maximum of 15 group profile names may be specified.
    Throws:
    AS400SecurityException
    ErrorCompletingRequestException
    InterruptedException
    IOException

setSystem

public void setSystem(AS400 system)
               throws PropertyVetoException
Sets the system object representing the system on which the user profile exists. This property cannot be changed if the object has established a connection to the system.

Parameters:
system - The system object representing the system on which the user profile exists.
Throws:
PropertyVetoException - If any of the registered listeners vetos the property change.

setUserActionAuditLevel

public void setUserActionAuditLevel(String[] userActionAuditLevel)
                             throws AS400SecurityException,
                                    ErrorCompletingRequestException,
                                    InterruptedException,
                                    IOException
Sets the level of activity that is audited for this user profile. Note: The system values QAUDLVL and QAUDLVL2 are used in conjunction with this parameter. Example: If QAUDLVL is set to *DELETE and AUDLVL is set to *CREATE, then both *DELETE and *CREATE would be audited for this user. The default value for the QAUDLVL and QAUDLVL2 system values is *NONE.

Implementation note: The method internally calls the Change User Auditing (CHGUSRAUD) command and not the Change User Profile (CHGUSRPRF) command. The caller must have audit (*AUDIT) special authority. Changes take effect the next time a job is started for this user.

Parameters:
userActionAuditLevel - The level of activity that is audited for this user profile. Possible values for the elements of this array are:
  • "*NONE" - No auditing level is specified. The auditing level for this user is taken from system values QAUDLVL and QAUDLVL2.
  • "*CMD" - CL command strings, System/36 environment operator control commands, and System/36 enviromnent procedures are logged for this user.
  • "*CREATE" - Auditing entries are sent when objects are created by this user.
  • "*DELETE" - Auditing entries are sent when objects are deleteed by this user.
  • "*JOBDTA" - The following actions taken by this user that affect a job are audited:
    • Job start and stop data.
    • Hold, release, stop, continue, change, disconnect, end, end abnormal.
    • Program start request (PSR) is attached to a prestart job.
  • "*OBJMGT" - Object management changes made by this user, such as move or rename, are audited.
  • "*OFCSRV" - Office services changes made by this user, such as changes to the system directory and use of OfficeVision for AS/400 mail, are audited.
  • "*OPTICAL" - The following optical functions are audited:
    • Add or remove optical cartridge.
    • Change the authorization list used to secure an optical volume.
    • Open optical file or directory.
    • Create or delete optical directory.
    • Change or retrieve optical directory attributes.
    • Copy, move, or rename optical file.
    • Copy optical directory.
    • Back up optical volume.
    • Initialize or rename optical volume.
    • Convert backup optical volume to a primary volume.
    • Save or release help optical file.
    • Absolute read of an optical volume.
  • "*PGMADP" - Authority obtained through program adoption is audited for this user.
  • "*SAVRST" - Save and restore actions performed by this user are audited.
  • "*SECURITY" - Security changes made by this user are audited.
  • "*SERVICE" - User of the system service tools by this user is audited.
  • "*SPLFDTA" - Spooled file operations made by this user are audited.
  • "*SYSMGT" - Use of system management functions by this user are audited.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setUserClassName

public void setUserClassName(String userClassName)
                      throws AS400SecurityException,
                             ErrorCompletingRequestException,
                             InterruptedException,
                             IOException
Sets the type of user associated with this user profile: security officer, security administrator, programmer, system operator, or user. The user class controls the options that are shown on a menu. Special authorities are given only if *USRCLS is specified for the Special authority (SPCAUT) parameter. If SPCAUT(*USRCLS) is specified, the special authorities granted will differ depending on the QSECURITY value.

Parameters:
userClassName - The type of user associated with this user profile. Possible values are:
  • "*USER" - At QSECURITY level 10 or 20, the user has *ALLOBJ and *SAVSYS authority. At QSECURITY level 30 or above, the user has no special authorities.
  • "*SECOFR" - At all levels of security, the security officer is granted the following special authorities:
    • *ALLOBJ
    • *SAVSYS
    • *JOBCTL
    • *SERVICE
    • *SPLCTL
    • *SECADM
    • *AUDIT
    • *IOSYSCFG
  • "*SECADM" - At QSECURITY level 10 or 20, the security administrator has *ALLOBJ, *SAVSYS, *SECADM, and *JOBCTL special authorities. At QSECURITY level 30 or above, the user has *SECADM special authority.
  • "*PGMR" - At QSECURITY level 10 or 20, the programmer has *ALLOBJ, *SAVSYS, and *JOBCTL special authorities. At QSECURITY level 30 or above, the user has no special authorities.
  • "*SYSOPR" - At QSECURITY level 10 or 20, the system operator has *ALLOBJ, *SAVSYS, and *JOBCTL special authorities. At QSECURITY level 30 or above, the user has *SAVSYS and *JOBCTL special authorities.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setUserID

public void setUserID(long userID)
               throws AS400SecurityException,
                      ErrorCompletingRequestException,
                      InterruptedException,
                      IOException
Sets the user ID number (uid number) for this user profile. The uid number is used to identify the user when the user is using the directory file system. The uid number for a user cannot be changed if there are one or more active jobs for the user.

Parameters:
userID - The uid number to be assigned to the user profile. A value from 1 to 4294967294 can be entered. The uid number assigned must not already be assigned to another user profile.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

setUserOptions

public void setUserOptions(String[] userOptions)
                    throws AS400SecurityException,
                           ErrorCompletingRequestException,
                           InterruptedException,
                           IOException
Sets the level of help information detail to be shown and the function of the Page Up and Page Down keys by default. The system shows several displays that are suitable for the inexperienced user. More experienced users must perform an extra action to see detailed information. When values are specified for this parameter, the system presents detailed information without further action by the experienced user.

Parameters:
userOptions - The level of help information detail to be shown and the function of the Page Up and Page Down keys by default. Possible values include:
  • "*NONE" - Detailed information is not shown.
  • "*CLKWD" - Parameter keywords are shown instead of the possible parameter values when a control language (CL) command is prompted.
  • "*EXPERT" - More detailed information is shown when the user is performing display and edit options to define or change the system (such as edit or display object authority).
  • "*ROLLKEY" - The actions of the Page Up and Page Down keys are reversed.
  • "*NOSTSMSG" - Status messages are not displayed when sent to the user.
  • "*STSMSG" - Status messages are displayed when sent to the user.
  • "*HLPFULL" - Help text is shown on a full display rather than in a window.
  • "*PRTMSG" - A message is sent to this user's message queue when a spooled file for this user is printed or held by the printer writer.
Throws:
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException

toString

public String toString()
Sets the string representation of this User object.

Returns:
The user profile name.