com.ibm.as400.access
Class User

java.lang.Object
  |
  +--com.ibm.as400.access.User
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UserGroup

public class User
extends java.lang.Object
implements java.io.Serializable

The User class represents an OS/400 user profile.

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.

See Also:
DirectoryEntry, UserList, UserGroup, RUser, RUserList, Serialized Form

Field Summary
static java.lang.String NONE
          Constant value representing the String "*NONE".
static java.lang.String SPECIAL_AUTHORITY_ALL_OBJECT
          Constant value representing a special authority of "*ALLOBJ".
static java.lang.String SPECIAL_AUTHORITY_AUDIT
          Constant value representing a special authority of "*AUDIT".
static java.lang.String SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION
          Constant value representing a special authority of "*IOSYSCFG".
static java.lang.String SPECIAL_AUTHORITY_JOB_CONTROL
          Constant value representing a special authority of "*JOBCTL".
static java.lang.String SPECIAL_AUTHORITY_SAVE_SYSTEM
          Constant value representing a special authority of "*SAVSYS".
static java.lang.String SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR
          Constant value representing a special authority of "*SECADM".
static java.lang.String SPECIAL_AUTHORITY_SERVICE
          Constant value representing a special authority of "*SERVICE".
static java.lang.String SPECIAL_AUTHORITY_SPOOL_CONTROL
          Constant value representing a special authority of "*SPLCTL".
 
Constructor Summary
User()
          Constructs a User object.
User(AS400 system, java.lang.String name)
          Constructs a User object.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Adds a VetoableChangeListener.
 boolean exists()
          Determines if this user profile exists on the system.
 java.lang.String getAccountingCode()
          Returns the accounting code that is associated with this user.
 java.lang.String getAssistanceLevel()
          Returns the user interface that the user will use.
 java.lang.String getAttentionKeyHandlingProgram()
          Returns the fully qualified integrated file system path name of the attention key handling program for this user.
 int getCCSID()
          Returns the character code set ID to be used by the system for this user.
 java.lang.String getCHRIDControl()
          Returns the character identifier control for the user.
 java.lang.String getCountryID()
          Returns the country ID used by the system for this user.
 java.lang.String getCurrentLibraryName()
          Returns the name of the user's current library.
 int getDaysUntilPasswordExpire()
          Returns the number of days until the password will expire.
 java.lang.String getDescription()
          Returns the descriptive text for the user profile.
 DirectoryEntry getDirectoryEntry()
          Returns the system distribution directory entry for the user profile, if one exists.
 java.lang.String getDisplaySignOnInformation()
          Returns whether the sign-on information display is shown when the user signs on.
 java.lang.String getGroupAuthority()
          Returns the authority the user's group profile has to objects the user creates.
 java.lang.String getGroupAuthorityType()
          Returns the type of authority the user's group has to objects the user creates.
 long getGroupID()
          Returns the group ID number for the user profile.
 int getGroupIDNumber()
          Deprecated. This method has been replaced by getGroupID() which returns a long.
 java.lang.String getGroupProfileName()
          Returns the name of the group profile.
 int getHighestSchedulingPriority()
          Returns the highest scheduling priority the user is allowed to have for each job submitted to the system.
 java.lang.String getHomeDirectory()
          Returns the home directory for this user profile.
 java.lang.String[] getIASPNames()
          Returns a list of independent auxiliary storage pool (IASP) names in use by this user.
 int getIASPStorageAllowed(java.lang.String iaspName)
          Returns the maximum storage this user is allowed to use for the given IASP.
 int getIASPStorageUsed(java.lang.String iaspName)
          Returns the amount of storage taken by this user's owned objects for the given IASP.
 java.lang.String getInitialMenu()
          Returns the fully qualified integrated file system path name of the initial menu for the user.
 java.lang.String getInitialProgram()
          Returns the fully qualified integrated file system path name of the initial program for the user.
 java.lang.String getJobDescription()
          Returns the fully qualified integrated file system path name of the job description used for jobs that start through subsystem work station entries.
 java.lang.String getKeyboardBuffering()
          Returns the keyboard buffering value that is used when a job is initialized for this user.
 java.lang.String getLanguageID()
          Returns the language ID used by the system for this user.
 java.lang.String getLimitCapabilities()
          Indicates whether the user has limited capabilites.
 java.lang.String getLimitDeviceSessions()
          Indicates whether the user is limited to one device session.
 java.lang.String[] getLocaleJobAttributes()
          Returns a list of attributes which are set from the locale path name at the time a job is started for this user.
 java.lang.String getLocalePathName()
          Returns the locale path name that is assigned to the user profile when a job is started.
 int getMaximumStorageAllowed()
          Returns the maximum amount of auxiliary storage (in kilobytes) that can be assigned to store permanant objects owned by the user.
 java.lang.String getMessageQueue()
          Returns the fully qualified integrated file system path name of the message queue that is used by this user.
 java.lang.String getMessageQueueDeliveryMethod()
          Returns how the messages are delivered to the message queue used by the user.
 int getMessageQueueSeverity()
          Returns the lowest severity that a message can have and still be delivered to a user in break or notify mode.
 java.lang.String getName()
          Returns the user profile name.
 java.lang.String getObjectAuditingValue()
          Returns the user's object auditing value.
 java.lang.String getOutputQueue()
          Returns the fully qualified integrated file system path name of the output queue that is used by this user.
 java.lang.String getOwner()
          Indicates who is to own objects created by this user.
 int getPasswordExpirationInterval()
          Returns the number of days the user's password can remain active before it must be changed.
 java.util.Date getPasswordExpireDate()
          Returns the date the user's password expires.
 java.util.Date getPasswordLastChangedDate()
          Returns the date the user's password was last changed.
 java.util.Date getPreviousSignedOnDate()
          Returns the date and time the user last signed on.
 java.lang.String getPrintDevice()
          Returns the printer used to print for this user.
 int getSignedOnAttemptsNotValid()
          Returns the number of sign-on attempts that were not valid since the last successful sign-on.
 java.lang.String getSortSequenceTable()
          Returns the fully integrated file system path name of the sort sequence table used for string comparisons.
 java.lang.String[] getSpecialAuthority()
          Returns a list of special authorities that the user has.
 java.lang.String getSpecialEnvironment()
          Returns the special environment the user operates in after signing on.
 java.lang.String getStatus()
          Returns the status of the user profile.
 int getStorageUsed()
          Returns the amount of auxiliary storage (in kilobytes) occupied by this user's owned objects.
 java.lang.String[] getSupplementalGroups()
          Returns the supplemental groups for the user profile.
 int getSupplementalGroupsNumber()
          Returns the number of supplemental groups for the user profile.
 AS400 getSystem()
          Returns the system.
 java.lang.String[] getUserActionAuditLevel()
          Returns a list of action audit levels for the user.
 java.lang.String getUserClassName()
          Returns the user class name.
 long getUserID()
          Returns the user ID number for the user profile.
 int getUserIDNumber()
          Deprecated. This method has been replaced by getUserID() which returns a long.
 java.lang.String[] getUserOptions()
          Returns a list of options for users to customize their environment.
 java.lang.String getUserProfileName()
          Returns the name of the user profile on the system.
 boolean hasSpecialAuthority(java.lang.String authority)
          Indicates 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()
          Indicates whether this user is a group that has members.
 boolean isNoPassword()
          Indicates whether there is no password.
 boolean isPasswordSetExpire()
          Indicates whether the user's password is set to expire, requiring the user to change the password when signing on.
 boolean isWithDigitalCertificates()
          Indicates whether there are digital certificates associated with this user.
 void loadUserInformation()
          Refreshes the values for all attributes.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Removes a VetoableChangeListener.
 void setName(java.lang.String name)
          Sets the user profile name.
 void setSystem(AS400 system)
          Sets the system.
 java.lang.String toString()
          Returns 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 java.lang.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 java.lang.String SPECIAL_AUTHORITY_ALL_OBJECT
Constant value representing a special authority of "*ALLOBJ".

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_AUDIT

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

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION

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

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_JOB_CONTROL

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

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SAVE_SYSTEM

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

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR

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

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SERVICE

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

See Also:
getSpecialAuthority()

SPECIAL_AUTHORITY_SPOOL_CONTROL

public static final java.lang.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,
            java.lang.String name)
     throws AS400Exception,
            AS400SecurityException,
            ConnectionDroppedException,
            ErrorCompletingRequestException,
            java.lang.InterruptedException,
            ObjectDoesNotExistException,
            java.io.IOException,
            java.io.UnsupportedEncodingException
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.
name - The user profile name.
Throws:
AS400Exception - If the AS/400 system returns an error message.
AS400SecurityException - If a security or authority error occurs.
ConnectionDroppedException - If the connection is dropped unexpectedly.
ErrorCompletingRequestException - If an error occurs before the request is completed.
java.lang.InterruptedException - If this thread is interrupted.
java.io.IOException - If an error occurs while communicating with the AS/400.
ObjectDoesNotExistException - If the AS/400 object does not exist.
java.io.UnsupportedEncodingException - If the character encoding is not supported.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.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(java.beans.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 AS400Exception,
                      AS400SecurityException,
                      ConnectionDroppedException,
                      ErrorCompletingRequestException,
                      java.lang.InterruptedException,
                      ObjectDoesNotExistException,
                      java.io.IOException,
                      java.io.UnsupportedEncodingException
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 server is made to determine if the user profile still exists.

Returns:
true if the profile exists, false if it does not.
AS400Exception
AS400SecurityException
ConnectionDroppedException
ErrorCompletingRequestException
java.lang.InterruptedException
ObjectDoesNotExistException
java.io.IOException
java.io.UnsupportedEncodingException

getAccountingCode

public java.lang.String getAccountingCode()
Returns the accounting code that is associated with this user.

Returns:
The accounting code that is associated with this user.

getAssistanceLevel

public java.lang.String getAssistanceLevel()
Returns 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 java.lang.String getAttentionKeyHandlingProgram()
Returns the fully qualified integrated file system path name of the attention key handling program for this user.

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

getCCSID

public int getCCSID()
Returns the character code set ID to be used by the system for this user. The special value of -2 indicates that the system value QCCSID is used to determine the user's CCSID.

Returns:
The character code set ID to be used by the system for this user.

getCHRIDControl

public java.lang.String getCHRIDControl()
Returns the character identifier control for the user. Possible values iare:

Returns:
The character identifier control for this user.

getCountryID

public java.lang.String getCountryID()
Returns the country ID used by the system for this user.

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

getCurrentLibraryName

public java.lang.String getCurrentLibraryName()
Returns 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()
Returns 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 java.lang.String getDescription()
Returns the descriptive text for the user profile. This value is pre-loaded into any User objects generated off of a UserList object so that a call to the server 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 AS400Exception,
                                        AS400SecurityException,
                                        ErrorCompletingRequestException,
                                        java.lang.InterruptedException,
                                        java.io.IOException,
                                        ObjectDoesNotExistException
Returns 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.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistException

getDisplaySignOnInformation

public java.lang.String getDisplaySignOnInformation()
Returns 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 java.lang.String getGroupAuthority()
Returns 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 java.lang.String getGroupAuthorityType()
Returns 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()
Returns 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. This will be 0 if the user does not have a group ID.

getGroupIDNumber

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

Returns 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. This will be 0 if the user does not have a group ID.

getGroupProfileName

public java.lang.String getGroupProfileName()
Returns the name of the group profile.

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

getHighestSchedulingPriority

public int getHighestSchedulingPriority()
                                 throws java.lang.NumberFormatException
Returns the highest scheduling priority the user is allowed to have for each job submitted to the system.

Note this method no longer throws a NumberFormatException, but the exception declaration remains for compatibility.

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.
java.lang.NumberFormatException

getHomeDirectory

public java.lang.String getHomeDirectory()
Returns the home directory for this user profile.

Returns:
The home directory for this user profile.

getIASPNames

public java.lang.String[] getIASPNames()
Returns a list of independent auxiliary storage pool (IASP) names in use by this user.

Returns:
If the server is V5R1 and higher, returns the array of IASP names; null otherwise.
See Also:
getIASPStorageAllowed(java.lang.String), getIASPStorageUsed(java.lang.String), AS400.getVRM(), AS400.generateVRM(int, int, int)

getIASPStorageAllowed

public int getIASPStorageAllowed(java.lang.String iaspName)
Returns the maximum storage this user is allowed to use for the given IASP.

Returns:
If the server is V5R1 and higher, returns the maximum allowed storage in kilobytes or -1 for *NOMAX; returns -2 if the server is pre-V5R1 or if the given IASP name is not listed for this user.
See Also:
getIASPNames(), getIASPStorageUsed(java.lang.String)

getIASPStorageUsed

public int getIASPStorageUsed(java.lang.String iaspName)
Returns the amount of storage taken by this user's owned objects for the given IASP.

Returns:
If the server is V5R1 and higher, returns the storage used in kilobytes; returns -2 if the server is pre-V5R1 or if the given IASP name is not listed for this user.
See Also:
getIASPNames(), getIASPStorageAllowed(java.lang.String)

getInitialMenu

public java.lang.String getInitialMenu()
Returns the fully qualified integrated file system path name of the initial menu for the user.

Returns:
The fully qualified integrated file system path name of the initial menu for the user. Possible values are:
  • "*SIGNOFF"
  • The initial menu name.
See Also:
QSYSObjectPathName

getInitialProgram

public java.lang.String getInitialProgram()
Returns the fully qualified integrated file system path name of the initial program for the user.

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

getJobDescription

public java.lang.String getJobDescription()
Returns 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 java.lang.String getKeyboardBuffering()
Returns the keyboard buffering value that is used when a job is initialized for this user. Possible values are:

Returns:
The keyboard buffering value.

getLanguageID

public java.lang.String getLanguageID()
Returns 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 java.lang.String getLimitCapabilities()
Indicates 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 java.lang.String getLimitDeviceSessions()
Indicates whether the user is limited to one device session.

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.

getLocaleJobAttributes

public java.lang.String[] getLocaleJobAttributes()
Returns a list of attributes which are set from the locale path name at the time a job is started for this user.

Returns:
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:
  • 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 java.lang.String getLocalePathName()
Returns 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:
  • User.NONE - No locale path name is assigned.
  • "*SYSVAL" - The QLOCALE system value is used to determine the locale path name.
  • "*C" - The C locale path name is assigned.
  • "*POSIX" - The POSIX locale path name is assigned.
  • A locale path name.

getMaximumStorageAllowed

public int getMaximumStorageAllowed()
Returns 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. If the user does not have a maximum amount of allowed storage, this will be -1.

getMessageQueue

public java.lang.String getMessageQueue()
Returns 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 java.lang.String getMessageQueueDeliveryMethod()
Returns 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()
Returns 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, in the range 0 through 99.

getName

public java.lang.String getName()
Returns the user profile name.

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

getObjectAuditingValue

public java.lang.String getObjectAuditingValue()
Returns 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.
  • "*NOTAVL" - The auditing value is not available, possibly because the user of the AS400 connection does not have *ALLOBJ or *AUDIT special authority.

getOutputQueue

public java.lang.String getOutputQueue()
Returns the fully qualified integrated file system path name of the output queue that is used by this user.

Returns:
The fully qualified integrated file system path name of the output queue that is 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 output queue name.
See Also:
QSYSObjectPathName

getOwner

public java.lang.String getOwner()
Indicates 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 java.util.Date getPasswordExpireDate()
Returns the date the user's password expires.

Returns:
The date the user's password expires.

getPasswordExpirationInterval

public int getPasswordExpirationInterval()
Returns 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.
  • The number of days the user's password can remain active before it must be changed.

getPasswordLastChangedDate

public java.util.Date getPasswordLastChangedDate()
Returns the date the user's password was last changed.

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

getPreviousSignedOnDate

public java.util.Date getPreviousSignedOnDate()
Returns the date and time the user last signed on.

Returns:
The date and time the user last signed on, or null if it is not known.

getPrintDevice

public java.lang.String getPrintDevice()
Returns 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()
Returns 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 java.lang.String getSortSequenceTable()
Returns the fully integrated file system path name of the sort sequence table used for string comparisons.

Returns:
The fully integrated file system path 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 sort sequence table name.
See Also:
QSYSObjectPathName

getSpecialAuthority

public java.lang.String[] getSpecialAuthority()
Returns a list of special authorities that the user has.

Returns:
A list of special authorities that 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 java.lang.String getSpecialEnvironment()
Returns the special environment the user operates in after signing on.

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

getStatus

public java.lang.String getStatus()
Returns the status of the user profile.

Returns:
The status of the user profile. Possible values are:
  • "*ENABLED" - The user profile is enabled.
  • "*DISABLED" - The user profile is not enabled.

getStorageUsed

public int getStorageUsed()
Returns 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 java.lang.String[] getSupplementalGroups()
Returns the supplemental groups for the user profile.

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

getSupplementalGroupsNumber

public int getSupplementalGroupsNumber()
Returns 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.

Returns:
The system.
See Also:
setSystem(com.ibm.as400.access.AS400)

getUserActionAuditLevel

public java.lang.String[] getUserActionAuditLevel()
Returns 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.
This method may return an empty String[] if the user of the AS400 connection does not have *ALLOBJ or *AUDIT special authority.

getUserClassName

public java.lang.String getUserClassName()
Returns 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()
Returns the user ID number for the user profile. This is used to identify the user when using the integrated file system.

Returns:
The user ID number for the user profile.

getUserIDNumber

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

Returns the user ID number for the user profile. This is used to identify the user when using the integrated file system.

Returns:
The user ID number for the user profile.

getUserOptions

public java.lang.String[] getUserOptions()
Returns a list of options for users to customize their environment. Possible values include:

Returns:
The user options that are set.

getUserProfileName

public java.lang.String getUserProfileName()
Returns the name of the user profile on the system. 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 a call to setUser().

Returns:
The name of the user profile.

hasSpecialAuthority

public boolean hasSpecialAuthority(java.lang.String authority)
Indicates 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()
Indicates 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

isNoPassword

public boolean isNoPassword()
Indicates whether there is no password.

Returns:
true if there is no password, false otherwise.

isPasswordSetExpire

public boolean isPasswordSetExpire()
Indicates 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()
Indicates 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 AS400Exception,
                                AS400SecurityException,
                                ConnectionDroppedException,
                                ErrorCompletingRequestException,
                                java.lang.InterruptedException,
                                ObjectDoesNotExistException,
                                java.io.IOException,
                                java.io.UnsupportedEncodingException
Refreshes the values for all attributes.

Throws:
AS400Exception - If the AS/400 system returns an error message.
AS400SecurityException - If a security or authority error occurs.
ConnectionDroppedException - If the connection is dropped unexpectedly.
ErrorCompletingRequestException - If an error occurs before the request is completed.
java.lang.InterruptedException - If this thread is interrupted.
java.io.IOException - If an error occurs while communicating with the AS/400.
ObjectDoesNotExistException - If the AS/400 object does not exist.
java.io.UnsupportedEncodingException - If the character encoding is not supported.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener.

Parameters:
listener - The listener.

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a VetoableChangeListener.

Parameters:
listener - The listener.

setName

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

Parameters:
name - The user profile name.
Throws:
java.beans.PropertyVetoException - If the property change is vetoed.
See Also:
getName()

setSystem

public void setSystem(AS400 system)
               throws java.beans.PropertyVetoException
Sets the system. This cannot be changed if the object has established a connection to the server.

Parameters:
system - The system.
Throws:
java.beans.PropertyVetoException - If the property change is vetoed.
See Also:
getSystem()

toString

public java.lang.String toString()
Returns the string representation of this User object.

Overrides:
toString in class java.lang.Object
Returns:
The user profile name.