|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.as400.access.User
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.
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 |
public static final java.lang.String NONE
getGroupProfileName(),
getAttentionKeyHandlingProgram(),
getGroupAuthority(),
getInitialProgram(),
getLocaleJobAttributes(),
getLocalePathName(),
getObjectAuditingValue(),
getSpecialEnvironment(),
Constant Field Valuespublic static final java.lang.String SPECIAL_AUTHORITY_ALL_OBJECT
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_AUDIT
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_JOB_CONTROL
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_SAVE_SYSTEM
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_SERVICE
getSpecialAuthority()public static final java.lang.String SPECIAL_AUTHORITY_SPOOL_CONTROL
getSpecialAuthority()| Constructor Detail |
public User()
public User(AS400 system,
java.lang.String name)
throws AS400Exception,
AS400SecurityException,
ConnectionDroppedException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
ObjectDoesNotExistException,
java.io.IOException,
java.io.UnsupportedEncodingException
system - The system.name - The user profile name.
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 |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
propertyChange()
method will be called each time the value of any bound property is changed.
listener - The listener.removePropertyChangeListener(java.beans.PropertyChangeListener)public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
vetoableChange()
method will be called each time the value of any constrained property is changed.
listener - The listener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public boolean exists()
throws AS400Exception,
AS400SecurityException,
ConnectionDroppedException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
ObjectDoesNotExistException,
java.io.IOException,
java.io.UnsupportedEncodingException
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.
AS400Exception
AS400SecurityException
ConnectionDroppedException
ErrorCompletingRequestException
java.lang.InterruptedException
ObjectDoesNotExistException
java.io.IOException
java.io.UnsupportedEncodingExceptionpublic java.lang.String getAccountingCode()
public java.lang.String getAssistanceLevel()
public java.lang.String getAttentionKeyHandlingProgram()
User.NONE - No attention key handling program is used.
QSYSObjectPathNamepublic int getCCSID()
public java.lang.String getCHRIDControl()
public java.lang.String getCountryID()
public java.lang.String getCurrentLibraryName()
public int getDaysUntilPasswordExpire()
public java.lang.String getDescription()
public DirectoryEntry getDirectoryEntry()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.lang.InterruptedException
java.io.IOException
ObjectDoesNotExistExceptionpublic java.lang.String getDisplaySignOnInformation()
public java.lang.String getGroupAuthority()
User.NONE - The group profile has no authority to the objects the user creates,
or the user does not have a group profile.
public java.lang.String getGroupAuthorityType()
public long getGroupID()
public int getGroupIDNumber()
getGroupID() which
returns a long.
public java.lang.String getGroupProfileName()
User.NONE - If the user does not have a group profile.
public int getHighestSchedulingPriority()
throws java.lang.NumberFormatException
Note this method no longer throws a NumberFormatException, but the exception declaration remains for compatibility.
java.lang.NumberFormatExceptionpublic java.lang.String getHomeDirectory()
public java.lang.String[] getIASPNames()
getIASPStorageAllowed(java.lang.String),
getIASPStorageUsed(java.lang.String),
AS400.getVRM(),
AS400.generateVRM(int, int, int)public int getIASPStorageAllowed(java.lang.String iaspName)
getIASPNames(),
getIASPStorageUsed(java.lang.String)public int getIASPStorageUsed(java.lang.String iaspName)
getIASPNames(),
getIASPStorageAllowed(java.lang.String)public java.lang.String getInitialMenu()
QSYSObjectPathNamepublic java.lang.String getInitialProgram()
User.NONE - If the user does not have an initial program.
QSYSObjectPathNamepublic java.lang.String getJobDescription()
QSYSObjectPathNamepublic java.lang.String getKeyboardBuffering()
public java.lang.String getLanguageID()
public java.lang.String getLimitCapabilities()
public java.lang.String getLimitDeviceSessions()
public java.lang.String[] getLocaleJobAttributes()
User.NONE - No job attributes are used from the locale path name at the time a job is
started for this user profile.
public java.lang.String getLocalePathName()
User.NONE - No locale path name is assigned.
public int getMaximumStorageAllowed()
public java.lang.String getMessageQueue()
QSYSObjectPathNamepublic java.lang.String getMessageQueueDeliveryMethod()
public int getMessageQueueSeverity()
public java.lang.String getName()
setName(java.lang.String)public java.lang.String getObjectAuditingValue()
User.NONE - No additional object auditing is done for the user.
public java.lang.String getOutputQueue()
QSYSObjectPathNamepublic java.lang.String getOwner()
public java.util.Date getPasswordExpireDate()
public int getPasswordExpirationInterval()
public java.util.Date getPasswordLastChangedDate()
public java.util.Date getPreviousSignedOnDate()
public java.lang.String getPrintDevice()
public int getSignedOnAttemptsNotValid()
public java.lang.String getSortSequenceTable()
QSYSObjectPathNamepublic java.lang.String[] getSpecialAuthority()
User.SPECIAL_AUTHORITY_ALL_OBJECT - All object.
User.SPECIAL_AUTHORITY_SECURITY_ADMINISTRATOR - Security administrator.
User.SPECIAL_AUTHORITY_JOB_CONTROL - Job control.
User.SPECIAL_AUTHORITY_SPOOL_CONTROL - Spool control.
User.SPECIAL_AUTHORITY_SAVE_SYSTEM - Save system.
User.SPECIAL_AUTHORITY_SERVICE - Service.
User.SPECIAL_AUTHORITY_AUDIT - Audit.
User.SPECIAL_AUTHORITY_IO_SYSTEM_CONFIGURATION - Input/output system configuration.
public java.lang.String getSpecialEnvironment()
User.NONE - The user operates in the OS/400 environment.
public java.lang.String getStatus()
public int getStorageUsed()
public java.lang.String[] getSupplementalGroups()
public int getSupplementalGroupsNumber()
This method simply returns getSupplementalGroups().length.
getSupplementalGroups()public AS400 getSystem()
setSystem(com.ibm.as400.access.AS400)public java.lang.String[] getUserActionAuditLevel()
public java.lang.String getUserClassName()
public long getUserID()
public int getUserIDNumber()
getUserID() which
returns a long.
public java.lang.String[] getUserOptions()
public java.lang.String getUserProfileName()
public boolean hasSpecialAuthority(java.lang.String authority)
authority - The authority to check. It must be one of the following special authority
values:
public boolean isGroupHasMember()
For User objects, this should always return false. For UserGroup objects, this should return true if the group profile has members.
UserGrouppublic boolean isNoPassword()
public boolean isPasswordSetExpire()
public boolean isWithDigitalCertificates()
public void loadUserInformation()
throws AS400Exception,
AS400SecurityException,
ConnectionDroppedException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
ObjectDoesNotExistException,
java.io.IOException,
java.io.UnsupportedEncodingException
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.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener - The listener.
public void setName(java.lang.String name)
throws java.beans.PropertyVetoException
name - The user profile name.
java.beans.PropertyVetoException - If the property change is vetoed.getName()
public void setSystem(AS400 system)
throws java.beans.PropertyVetoException
system - The system.
java.beans.PropertyVetoException - If the property change is vetoed.getSystem()public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||