|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.pd.jutil.PDEnvironmentObject
com.tivoli.pd.jadmin.PDUser
public class PDUser
This class represents a user in the Policy Directory Management Server. It may also represent a user that is defined only in the registry, but not within the the Policy Directory Management Server.
Modes: Local,Remote
Field Summary | |
---|---|
static int |
PDUSER_ADUSERREG
Constant indicating an Active Directory user registry. |
static java.lang.String |
PDUSER_ALLPATTERN
Constant used to match all names when listing users. |
static int |
PDUSER_DOMINOUSERREG
Constant indicating a Domino user registry. |
static int |
PDUSER_LDAPUSERREG
Constant indicating an LDAP user registry. |
static int |
PDUSER_MAXRETURN
Constant used to return the maximum number possible when listing users. |
static int |
PDUSER_MULTIDOMAIN_ADUSERREG
Constant indicating a multidomain Active Directory user registry. |
Constructor Summary | |
---|---|
PDUser(PDContext context,
java.lang.Object name,
PDMessages messages)
Creates a PDUser object with the specified input name. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of this object. |
static void |
createUser(PDContext context,
java.lang.String pdName,
PDRgyUserName rgyName,
java.lang.String description,
char[] pwd,
java.util.ArrayList groupNames,
boolean ssoUser,
boolean noPwdPolicy,
PDMessages messages)
Creates a user in the Policy Director Management Server. |
static void |
deleteUser(PDContext context,
java.lang.String name,
boolean deleteFromRgy,
PDMessages messages)
Deletes a user from the Policy Director Management Server and optionally delete it from the user registry. |
boolean |
equals(java.lang.Object obj)
Determines whether this PDUser is equivalent to the input object. |
java.lang.String |
getDescription()
Returns the user description from this object. |
java.lang.String |
getFirstName()
Returns the the first name for this user as defined in the user registry. |
java.util.ArrayList |
getGroups()
Returns a list of groups from this object that this user is a member of. |
java.lang.String |
getId()
Returns the name for this user as defined by Policy Director. |
java.util.Date |
getLastLogin()
Returns a setting from this object indicating the last time the user logged in. |
java.lang.String |
getLastName()
Returns the the last name for this user as defined in the user registry. |
java.util.Date |
getLastPwdChange()
Returns a setting from this object indicating the last time the user's password was changed. |
PDPolicy |
getPolicy()
Returns the account policy associated with this user from this object. |
java.lang.String |
getRgyName()
Returns the name for this user as defined in the user registry. |
static int |
getUserRgy(PDContext context,
PDMessages messages)
Returns an indicator of which type of user registry is configured for the Policy Director Management Server. |
static void |
importUser(PDContext context,
java.lang.String pdName,
PDRgyUserName rgyName,
java.lang.String groupName,
boolean ssoUser,
PDMessages messages)
Creates a user in the Policy Director Management Server by importing an existing user from the user registry. |
boolean |
isAccountValid()
Returns a setting from this object indicating whether or not this user's account is valid. |
boolean |
isPasswordValid()
Returns a setting from this object indicating whether or not this user's password is valid. |
boolean |
isPDUser()
Returns a setting from this object indicating whether or not this user is defined to Policy Director. |
boolean |
isSSOUser()
|
static java.util.ArrayList |
listUsers(PDContext context,
java.lang.String pattern,
long maxReturn,
boolean listByRgyName,
PDMessages messages)
Lists users whose names match the input pattern. |
void |
setAccountValid(PDContext context,
boolean isValid,
PDMessages messages)
Enables or disables this Policy Director user's account. |
static void |
setAccountValid(PDContext context,
java.lang.String name,
boolean isValid,
PDMessages messages)
Enables or disables the specified Policy Director user's account. |
void |
setDescription(PDContext context,
java.lang.String newDesc,
PDMessages messages)
Modifies this Policy Director user's description. |
static void |
setDescription(PDContext context,
java.lang.String name,
java.lang.String newDesc,
PDMessages messages)
Modifies the description for the specified Policy Director user. |
void |
setPassword(PDContext context,
char[] pwd,
PDMessages messages)
Modifies this Policy Director user's password and also sets the user's password valid indicator to true. |
static void |
setPassword(PDContext context,
java.lang.String name,
char[] pwd,
PDMessages messages)
Modifies the specified Policy Director user's password and also sets the user's password valid indicator to true. |
void |
setPasswordValid(PDContext context,
boolean isValid,
PDMessages messages)
Enables or disables this Policy Director user's password. |
static void |
setPasswordValid(PDContext context,
java.lang.String name,
boolean isValid,
PDMessages messages)
Enables or disables the specified Policy Director user's password. |
void |
setSSOUser(PDContext context,
boolean ssoUser,
PDMessages messages)
|
static void |
setSSOUser(PDContext context,
java.lang.String name,
boolean ssoUser,
PDMessages messages)
|
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class com.tivoli.pd.jutil.PDEnvironmentObject |
---|
getContext, setContext |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PDUSER_LDAPUSERREG
public static final int PDUSER_ADUSERREG
public static final int PDUSER_DOMINOUSERREG
public static final int PDUSER_MULTIDOMAIN_ADUSERREG
public static final java.lang.String PDUSER_ALLPATTERN
public static final int PDUSER_MAXRETURN
Constructor Detail |
---|
public PDUser(PDContext context, java.lang.Object name, PDMessages messages) throws PDException
This constructor corresponds to the ivadmin_user_get() and ivadmin_user_getbydn() C APIs.
context
- the context for communicating with the
Policy Director Management Server.name
- the name of the user to instantiate. If this is a Policy
Director user, input the Policy Director name (a String). If this is
a registry-only user, input the registry name (a
PDRgyUserName
object).messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.Method Detail |
---|
public java.util.ArrayList getGroups() throws PDException
The returned list is a copy of the list in this object.
This method corresponds to the ivadmin_user_getmemberships() C API.
PDException
public java.lang.String getId() throws PDException
This method corresponds to the ivadmin_user_getid() C API.
PDException
public java.lang.String getRgyName() throws PDException
This method corresponds to the ivadmin_user_getdn() C API.
PDException
public java.lang.String getFirstName() throws PDException
This method corresponds to the ivadmin_user_getcn() C API.
PDException
public java.lang.String getLastName() throws PDException
This method corresponds to the ivadmin_user_getsn() C API.
PDException
public java.lang.String getDescription() throws PDException
This method corresponds to the ivadmin_user_getdescription() C API.
PDException
public PDPolicy getPolicy() throws PDException
The returned policy is a copy of the policy in this object. To reflect any policy changes made through the copy back into a PDUser object, you must get a new instance of the user object.
PDException
public boolean isPDUser() throws PDException
PDException
public boolean isSSOUser()
public boolean isAccountValid() throws PDException
This method corresponds to the ivadmin_user_getaccountvalid() C API.
PDException
public java.util.Date getLastLogin() throws PDException
This method corresponds to the ivadmin_user_getlastlogin() C API.
PDException
public java.util.Date getLastPwdChange() throws PDException
This method corresponds to the ivadmin_user_getlastpwdchange() C API.
PDException
public boolean isPasswordValid() throws PDException
This method corresponds to the ivadmin_user_getpasswordvalid() C API.
PDException
public void setSSOUser(PDContext context, boolean ssoUser, PDMessages messages) throws PDException
PDException
public void setAccountValid(PDContext context, boolean isValid, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setaccountvalid() C API.
context
- the context for communicating with the
Policy Director Management Server.isValid
- true, to validate this user's account; false, to
invalidate the account.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void setPasswordValid(PDContext context, boolean isValid, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setpasswordvalid() C API.
context
- the context for communicating with the
Policy Director Management Server.isValid
- true, to validate this user's password; false, to
invalidate the password.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void setDescription(PDContext context, java.lang.String newDesc, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setdescription() C API.
context
- the context for communicating with the
Policy Director Management Server.newDesc
- the new description. The description may not be null;
use the empty String to clear the existing description.
description.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void setPassword(PDContext context, char[] pwd, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setpassword() C API.
context
- the context for communicating with the
Policy Director Management Server.pwd
- the new password. This password may not be null and must
have a non-zero length.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static void createUser(PDContext context, java.lang.String pdName, PDRgyUserName rgyName, java.lang.String description, char[] pwd, java.util.ArrayList groupNames, boolean ssoUser, boolean noPwdPolicy, PDMessages messages) throws PDException
This constructor corresponds to the ivadmin_user_create() C API.
context
- the context for communicating with the
Policy Director Management Server.pdName
- the Policy Director user name. This value may not be null
and must have a non-zero length.rgyName
- the registry user name. The registry name in this
object must be non-null and have a non-zero length.description
- this argument is currently ignored; the description
must be set explicitly using the
setDescription
method.pwd
- the user password. This password may not be null and must
have a non-zero length.groupNames
- a list of group names (Strings) to which the user
initially belongs. Can be null or empty.ssoUser
- true, if the user is capable of having single-signon
credentials; false, otherwise.noPwdPolicy
- true, if password policy will not be enforced during
creation; false, otherwise. This has no bearing on password policy
enforcement after user creation.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static void importUser(PDContext context, java.lang.String pdName, PDRgyUserName rgyName, java.lang.String groupName, boolean ssoUser, PDMessages messages) throws PDException
This constructor corresponds to the ivadmin_user_import() C API.
context
- the context for communicating with the
Policy Director Management Server.pdName
- the Policy Director user name. This value may not be null
and must have a non-zero length.rgyName
- an object specifying the registry user name. This value
may not be null or specify a null or zero-length name.groupName
- the initial group to which the user belongs. Can
be null.ssoUser
- true, if the user is capable of having single-signon
credentials; false, otherwise.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static void deleteUser(PDContext context, java.lang.String name, boolean deleteFromRgy, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_delete() C API.
context
- the context for communicating with the
Policy Director Management Server.name
- the Policy Director user name. Cannot be null.deleteFromRgy
- true, if the user should be deleted from the user
registry in addition to the Policy Director Management Server; false,
otherwise.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static java.util.ArrayList listUsers(PDContext context, java.lang.String pattern, long maxReturn, boolean listByRgyName, PDMessages messages) throws PDException
If listByRgyName is false, list the Policy Director users that match the specified pattern. If listByRgyName is true, list the registry users whose names match the specified pattern.
This method corresponds to the ivadmin_user_list() and ivadmin_user_listbydn() C APIs.
context
- the context for communicating with the
Policy Director Management Server.pattern
- the pattern for user names to match. For LDAP
registries, this pattern is interpreted as a literal string, with the
exception of the asterisk ('*') character, which is interpreted as a
metacharacter that matches zero or more characters. Asterisks can be
located at the beginning, in the middle or at the end of the pattern,
and the pattern can contain multiple asterisks.
PDUSER_ALLPATTERN
matches all names. Non-LDAP registries
that are supported in the future may not follow these pattern rules.maxReturn
- the maximum number of user names to return. This
argument must be greater than or equal to 0. The value of 0 or
PDUSER_MAXRETURN
means return all users.
This number can also be limited by the registry server so the maximum
number returned is really the minimum of the server configuration and
this value.listByRgyName
- true, if the users should be matched by their
registry names; false, if the users should be matched by their
Policy Director names.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static int getUserRgy(PDContext context, PDMessages messages) throws PDException
This method corresponds to the ivadmin_context_getuserreg() C API.
context
- the context for communicating with the
Policy Director Management Server.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDUSER_LDAPUSERREG
will be returned.
Other supported registries include Active Directory and Domino.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static void setDescription(PDContext context, java.lang.String name, java.lang.String newDesc, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setdescription() C API.
context
- the context for communicating with the
Policy Director Management Server.name
- the Policy Director user name.newDesc
- the new description. The description may not be null;
use the empty String to clear the existing description.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static void setSSOUser(PDContext context, java.lang.String name, boolean ssoUser, PDMessages messages) throws PDException
PDException
public static void setAccountValid(PDContext context, java.lang.String name, boolean isValid, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setaccountvalid() C API.
context
- the context for communicating with the
Policy Director Management Server.name
- the Policy Director user name.isValid
- true, to validate this user's account; false, to
invalidate the account.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static void setPasswordValid(PDContext context, java.lang.String name, boolean isValid, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setpasswordvalid() C API.
context
- the context for communicating with the
Policy Director Management Server.name
- the Policy Director user name.isValid
- true, to validate this user's password; false, to
invalidate the password.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public static void setPassword(PDContext context, java.lang.String name, char[] pwd, PDMessages messages) throws PDException
This method corresponds to the ivadmin_user_setpasswordvalid() C API.
context
- the authentication context for communicating with the
Policy Director Management Server.name
- the Policy Director user name.pwd
- the new password. This password may not be null and must
have a non-zero length.messages
- in/out parameter;
empty PDMessages on input;
may contain zero or more informational or warning
messages on output.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |