All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.User

java.lang.Object
   |
   +----com.ibm.as400.access.User

public class User
extends Object
implements Serializable
The User class represents an AS/400 user. The default User constructor only provides a default virtual user. To retrieve the information of a real user on AS400, the methods setSystem(), setName() and loadUserInformation() should be explicitly invoked. Here is an example:

 // Constructs a AS400 system object.
 AS400 system = new AS400();
 // Create a user 
 User user = new User();
 ...
 user.setSystem(system);
 user.setName("Fred");
 user.loadUserInformation();
 ...
 System.out.println(user.getJobDescription());
 


Constructor Index

 o User()
Constructs a User object.
 o User(AS400, String)
Constructs a User object.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to be notified when the value of any bound property is changed.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener to be notified when the value of any constrained property is changed.
 o getAccountingCode()
Returns the accounting code that is associated with this user.
 o getAssistanceLevel()
Returns the user interface that the user will use.
 o getAttentionKeyHandlingProgram()
Returns the full path of the attention-key-handling program for this user.
 o getCCSID()
Returns the character code set identifier to be used by the system for this user.
 o getCountryID()
Returns the country identifier used by the system for this user.
 o getCurrentLibraryName()
Returns the name of the user's current library.
 o getDaysUntilPasswordExpire()
Returns the number of days until the password will expire.
 o getDescription()
Returns the descriptive text for the user profile.
 o getDisplaySignOnInformation()
Returns the value that indicates whether the sign-on information display is shown when the user signs on.
 o getGroupAuthority()
Returns the authority the user's group profile has to the objects the user creates.
 o getGroupAuthorityType()
Returns the type of authority the user's group profile has to the objects the user creates.
 o getGroupIDNumber()
Returns the group identifier number for the user profile.
 o getGroupProfileName()
Returns the name of the group profile.
 o getHighestSchedulingPriority()
Returns the highest scheduling priority the user is allowed to have for each job submitted to the system.
 o getHomeDirectory()
Returns the home directory for this user profile.
 o getInitialMenu()
Returns the full path of the initial menu for the user.
 o getInitialProgram()
Returns the full path of the initial program for the user.
 o getJobDescription()
Returns the full path of the job description used for jobs that start through subsystem work station entries.
 o getLanguageID()
Returns the language identifier used by the system for this user.
 o getLimitCapabilities()
Returns the value indicating whether the user has limited capabilities.
 o getLimitDeviceSessions()
Returns the value indicating whether the user is limited to one device session.
 o getLocaleJobAttributes()
Returns the job attributes that are taken from the user's locale path name.
 o getLocalePathName()
Returns the locale path name that is assigned to the user profile when a job is started.
 o getMaximumStorageAllowed()
Returns the maximum amount of auxiliary storage (in kilobytes) that can be assigned to store permanent objects owner by the user.
 o getMessageQueue()
Returns the full path of the message queue that is used by this user.
 o getMessageQueueDeliveryMethod()
Returns the message queue delivery method which indicates how the messages are delivered to the message queue used by the user.
 o getMessageQueueSeverity()
Returns the lowest severity that a message can have and still be delivered to a user in break or notify mode.
 o getName()
Returns the name of the user.
 o getObjectAuditingValue()
Returns the current user's object auditing value.
 o getOutputQueue()
Returns the full path of the output queue used by this user.
 o getOwner()
Returns the value indicating who is to own objects created by those user.
 o getPasswordExpirationInterval()
Returns the number of days (from 1 through 366) the user's password can remain active before it must be changed.
 o getPasswordExpireDate()
Returns the date the user's password expires.
 o getPasswordLastChangedDate()
Returns the date the user's password was last changed.
 o getPreviousSignedOnDate()
Returns the date and time the user last signed on.
 o getPrintDevice()
Returns the printer used to print for this user.
 o getSignedOnAttemptsNotValid()
Returns the number of the sign-on attempts that were not valid since the last successful sign-on.
 o getSortSequenceTable()
Returns the full path of the sort sequence table used for string comparisons.
 o getSpecialAuthority()
Returns the special authority of the user.
 o getSpecialEnvironment()
Returns the special environment the user operates in after signing on.
 o getStatus()
Returns the status of the user profile.
 o getStorageUsed()
Returns the amount of auxiliary storage (in kilobytes) occupied by this user's owned objects.
 o getSupplementalGroups()
Returns the array of supplemental groups for the user profile.
 o getSupplementalGroupsNumber()
Returns the number of supplemental groups returned in the array.
 o getSystem()
Returns the AS/400 system.
 o getUserActionAuditLevel()
Returns the action audit values for this user.
 o getUserClassName()
Returns the class for the user.
 o getUserIDNumber()
Returns the user identifier number for the user profile.
 o getUserProfileName()
Returns the name of the user profile for which the information is returned.
 o isGroupHasMember()
Indicates whether the user is a group that has members.
 o isNoPassword()
Indicates whether *NONE is specified for the password in the user profile.
 o isPasswordSetExpire()
Indicates whether the user's password is set to expire, requiring the user to change the pasword when signing on.
 o isWithDigitalCertificates()
Indicates whether there are digital certificates associated with this user.
 o loadUserInformation()
Loads the user information.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a property change listener.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable change listener.
 o setName(String)
Set the user profile name.
 o setSystem(AS400)
Set the AS/400 system.
 o toString()
Return the name of the user.

Constructors

 o User
 public User()
Constructs a User object.

 o User
 public User(AS400 system,
             String userProfileName) throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, ObjectDoesNotExistException, IOException, UnsupportedEncodingException
Constructs a User object.

Parameters:
system - The AS/400 system in which the user information resides.
userProfileName - The user profile name.
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: UnsupportedEncodingException
If the character encoding is not supported.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property is changed. The propertyChange() method will be called.

Parameters:
listener - The property change listener.
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property is changed. The vetoableChange() method will be called.

Parameters:
listener - The vetoable change listener.
 o getAccountingCode
 public String getAccountingCode()
Returns 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, this field is blank.
 o getAssistanceLevel
 public String getAssistanceLevel()
Returns the user interface that the user will use.

Returns:
The user interface that the user will use. The possible values are:
  • *SYSVAL - The system value QASTLVL determines which user interface the user is using.
  • *BASIC - The Operational Assistance user interface.
  • *INTERMED - The system user interface.
  • *ADVANCED - The expert system user interface.
 o getAttentionKeyHandlingProgram
 public String getAttentionKeyHandlingProgram()
Returns the full path of the attention-key-handling program for this user.

Returns:
The full path of the attention-key-handling program for this user. The special values that may be used: *SYSVAL, *NONE, or *ASSIST.
 o getCCSID
 public int getCCSID()
Returns the character code set identifier to be used by the system for this user.

Returns:
The character code set identifier to be used by the system for this user. It can be the following special values:
  • -2 - The system value QCCSID is used to determine the user's character code set identifier.
 o getCountryID
 public String getCountryID()
Returns the country identifier used by the system for this user.

Returns:
The country identifier used by the system for this user. It can be the following special values:
  • *SYSVAL - The system value QCNTRYID is used to determine the user's country identifier.
 o getCurrentLibraryName
 public String getCurrentLibraryName()
Returns the name of the user's current library.

Returns:
The name of the user's current library. It can be the following special values:
  • *CRTDFT - The user does not have have a current library.
 o getDaysUntilPasswordExpire
 public int getDaysUntilPasswordExpire()
Returns the number of days until the password will expire. 0 indicates that the password is expired.

Returns:
The number of days until the password will expire.
 o getDescription
 public String getDescription()
Returns the descriptive text for the user profile.

Returns:
The descriptive text for the user profile.
 o getDisplaySignOnInformation
 public String getDisplaySignOnInformation()
Returns the value that indicates whether the sign-on information display is shown when the user signs on.

Returns:
The value that indicates whether the sign-on information display is shown when the user signs on. The 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.
 o getGroupAuthority
 public String getGroupAuthority()
Returns the authority the user's group profile has to the objects the user creates.

Returns:
The authority the user's group profile has to the objects the user creates. The possible values are:
  • *NONE - The group profile has no authority to the object the user creates. If the user does not have a group profile, the field contains this value.
  • *ALL - The group profile has all authority to the object the user creates.
  • *CHANGE - The group profile has change authority to the object the user creates.
  • *USE - The group profile has use authority to the object the user creates.
  • *EXCLUDE - The group profile has exclude authority to the object the user creates.
 o getGroupAuthorityType
 public String getGroupAuthorityType()
Returns the type of authority the user's group profile has to the objects the user creates.

Returns:
The type of authority the user's group profile has to objects the user creates. The possible values are:
  • *PRIVATE - The group profile has a private authority to the objects the user creates. If the user does not have a group profile, return this value.
  • *PGP - The group profile will be the primary group for objects the user creates.
 o getGroupIDNumber
 public int getGroupIDNumber()
Returns the group identifier number for the user profile.

Returns:
The group identifier number for the user profile. The possible values are:
  • 0 - Same as *NONE. The user does not have a group identifier.
  • 1 through 4294967294 which is a valid group identifier.
 o getGroupProfileName
 public String getGroupProfileName()
Returns the name of the group profile. If the user does not have a group profile, this method will return *NONE.

Returns:
The name of the group profile.
 o getHighestSchedulingPriority
 public int getHighestSchedulingPriority() throws NumberFormatException
Returns 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. It is a number from 0 through 9, with 0 being the highest priority.
 o getHomeDirectory
 public String getHomeDirectory()
Returns the home directory for this user profile. This is the user's initial working directory.

Returns:
The home directory for this user profile.
 o getInitialMenu
 public String getInitialMenu()
Returns the full path of the initial menu for the user. For example the possible return value is "*LIBL/MAIN".

Returns:
The full path of the initial menu for the user.
 o getInitialProgram
 public String getInitialProgram()
Returns the full path of the initial program for the user.

Returns:
The full path of the initial program for the user.
 o getJobDescription
 public String getJobDescription()
Returns the full path of the job description used for jobs that start through subsystem work station entries.

Returns:
The full path of the job description used for jobs.
 o getLanguageID
 public String getLanguageID()
Returns the language identifier used by the system for this user.

Returns:
The language identifier used by the system for this user. It can be the following special values:
  • *SYSVAL - The system value QLANGID is used to determine the user's language identifier.
 o getLimitCapabilities
 public String getLimitCapabilities()
Returns the value indicating whether the user has limited capabilities.

Returns:
The value indicating whether the user has limited capabilities. The possible values are:
  • *PARTIAL - The user can not change his initial program or current library.
  • *YES - The user can not change his initial menu, initial program, or current library. The user can not run commands from the command line.
  • *NO - The user is not limited.
 o getLimitDeviceSessions
 public String getLimitDeviceSessions()
Returns the value indicating whether the user is limited to one device session.

Returns:
The value indicating whether the user is limited to one device session. The possible values are:
  • *SYSVAL - The system value QLMTDEVSSN determines if the user is limited to one device sessins.
  • *YES - The user is limited to one device sessions.
  • *NO - The user is not limited to one device sessions.
 o getLocaleJobAttributes
 public String[] getLocaleJobAttributes()
Returns the job attributes that are taken from the user's locale path name.

Returns:
The job attributes that are taken from the user's locale path name. The possible values are :
  • *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 dtermined 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
 o getLocalePathName
 public 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. The possible values are :
  • *C - The C locale path name is assigned.
  • *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.
 o getMaximumStorageAllowed
 public int getMaximumStorageAllowed()
Returns the maximum amount of auxiliary storage (in kilobytes) that can be assigned to store permanent objects owner by the user. The value -1 is for *NOMAX.

Returns:
The maximum amount of auxiliary storage allowed.
 o getMessageQueue
 public String getMessageQueue()
Returns the full path of the message queue that is used by this user. The default message queue name is the same as the user profile name. For example, the return value of the user "QAUTPROF" is "QAUTPROF".

Returns:
The full path of the message queue that is used by this user.
 o getMessageQueueDeliveryMethod
 public String getMessageQueueDeliveryMethod()
Returns the message queue delivery method which indicates how the messages are delivered to the message queue used by the user.

Returns:
The message queue delivery method. The 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.
 o 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. The value ranges from 0 through 99.

Returns:
The lowest severity that a message can have and still be delivered to a user in break or notify mode.
 o getName
 public String getName()
Returns the name of the user.

Returns:
The name of the user.
 o getObjectAuditingValue
 public String getObjectAuditingValue()
Returns the current user's object auditing value.

Returns:
The current user's object auditing value.
 o getOutputQueue
 public String getOutputQueue()
Returns the full path of the output queue used by this user.

Returns:
The full path of the output queue used by this user.
 o getOwner
 public String getOwner()
Returns the value indicating who is to own objects created by those user.

Returns:
The value indicating who is to own objects created by those user. The possible values are:
  • *USRPRF - The user owns any objects the user creates. If the user does not have a group profile, returns this value.
  • *GRPPRF - Yhe user's profile owns any objects the user creates.
 o getPasswordExpireDate
 public Date getPasswordExpireDate()
Returns the date the user's password expires.

Returns:
The date the user's password expires.
 o getPasswordExpirationInterval
 public int getPasswordExpirationInterval()
Returns the number of days (from 1 through 366) the user's password can remain active before it must be changed.

Returns:
The password expiration interval. It can be the following special values:
  • 0 - The system value QPWDEXPITV is used to determine the user's password expiration interval.
  • -1 - The user's password does not expire(*NOMAX).
 o getPasswordLastChangedDate
 public Date getPasswordLastChangedDate()
Returns the date the user's password was last changed.

Returns:
The date the user's password was last changed.
 o getPreviousSignedOnDate
 public Date getPreviousSignedOnDate()
Returns the date and time the user last signed on.

Returns:
The date and time the user last signed on.
 o getPrintDevice
 public String getPrintDevice()
Returns the printer used to print for this user.

Returns:
The printer used to print for this user.
 o getSignedOnAttemptsNotValid
 public int getSignedOnAttemptsNotValid()
Returns the number of the sign-on attempts that were not valid since the last successful sign-on.

Returns:
The number of the sign-on attempts that were not valid since the last successful sign-on.
 o getSortSequenceTable
 public String getSortSequenceTable()
Returns the full path of the sort sequence table used for string comparisons.

Returns:
The full path of the sort sequence table used for string comparisons.
 o getSpecialAuthority
 public String[] getSpecialAuthority()
Returns the special authority of the user.

Returns:
The special authority of the user. Possible values are :
  • *ALLOBJ - All object. Indicates the user has all object special authority.
  • *SECADM - Security administrator. Indicates the user has security administrator special authority.
  • *JOBCTL - Job control. Indicates the user has job control special authority.
  • *SPLCTL - Spool control. Indicates the user has spool control special authority.
  • *SAVSYS - Save system. Indicates the user has save system special authority.
  • *SERVICE - Service. Indicates the user has service special authority.
  • *AUDIT - Audit. Indicates the user has audit special authority.
  • *IOSYSCFG - Input/output system configuration. Indicates the user has input/output system configuration special authority.
 o getSpecialEnvironment
 public String getSpecialEnvironment()
Returns the special environment the user operates in after signing on.

Returns:
The special environment the user operates in after signing on. The possible values are:
  • *SYSVAL - The system value QSPCENV is used to determine the user's special environment.
  • *NONE - The user operates in the OS/400 environment.
  • *S36 - The user operates in the System/400 S/36 environment.
 o getStatus
 public String getStatus()
Returns the status of the user profile.

Returns:
The status of the user profile. The possible values are:
  • *ENABLED - The user profile is enabled;therefore, the user is able to sign on.
  • *DISABLED - The user profile is disabled;therefore, the user can not sign on.
 o 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.
 o getSupplementalGroups
 public String[] getSupplementalGroups()
Returns the array of supplemental groups for the user profile.

Returns:
The array of supplemental groups for the user profile.
 o getSupplementalGroupsNumber
 public int getSupplementalGroupsNumber()
Returns the number of supplemental groups returned in the array.

Returns:
The number of supplemental groups returned in the array.
 o getSystem
 public AS400 getSystem()
Returns the AS/400 system.

Returns:
The AS/400 object.
 o getUserActionAuditLevel
 public String[] getUserActionAuditLevel()
Returns the action audit values for this user.

Returns:
The action audit values for this user. The possible values 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.
 o getUserClassName
 public String getUserClassName()
Returns the class for the user.

Returns:
The class for the user. The 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.
 o getUserIDNumber
 public int getUserIDNumber()
Returns the user identifier number for the user profile.

Returns:
The user identifier number for the user profile.
 o getUserProfileName
 public String getUserProfileName()
Returns the name of the user profile for which the information is returned.

Returns:
The name of the user profile for which the information is returned.
 o isGroupHasMember
 public boolean isGroupHasMember()
Indicates whether the user is a group that has members.

Returns:
true if the user is a group that has members; false otherwise.
 o isNoPassword
 public boolean isNoPassword()
Indicates 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.
 o isPasswordSetExpire
 public boolean isPasswordSetExpire()
Indicates whether the user's password is set to expire, requiring the user to change the pasword when signing on.

Returns:
true if the user's password is set to expire; false otherwise.
 o 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.
 o loadUserInformation
 public void loadUserInformation() throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, ObjectDoesNotExistException, IOException, PropertyVetoException, UnsupportedEncodingException
Loads the user information. If you have called setName() or setSystem() or both, you should also call this method to reload the user information.

Parameters:
system - The AS/400 system in which the user information resides.
userProfileName - The user profile name.
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: PropertyVetoException
If the change is vetoed.
Throws: UnsupportedEncodingException
If the character encoding is not supported.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.

Parameters:
listener - The property change listener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable change listener.

Parameters:
listener - The vetoable change listener.
See Also:
addVetoableChangeListener
 o setName
 public void setName(String userProfileName)
Set the user profile name. The AS/400 system should have been set before calling this method.

Parameters:
userProfileName - The user profile name.
 o setSystem
 public void setSystem(AS400 system) throws Exception
Set the AS/400 system.

Parameters:
system - The AS/400 system.
Throws: Exception
If an exception occurred.
 o toString
 public String toString()
Return the name of the user.

Returns:
The name of the user.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index