|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ldap.util.LDAPEntry
oracle.ldap.util.User
public class User
This class represents a valid User. It allows the browsing and setting of properties for this user.
Field Summary | |
---|---|
static int |
CREDTYPE_PASSWD Using userpassword to authenticate |
static java.lang.String[] |
extPrefRefObjList |
static int |
EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR Extended Preference Type to be used with getExtendedProperties() - Resource Access Descriptor |
static java.lang.String[] |
radContainerObjList |
static java.lang.String[] |
radObjList |
Fields inherited from class oracle.ldap.util.LDAPEntry |
---|
entryDN, entryIdType, entryPsc, inEntryId, validated |
Constructor Summary | |
---|---|
|
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, boolean validate) |
|
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, boolean validate, java.util.logging.Logger lgr) Constructs a User by specifying the user information and the subscriber information if required. |
protected |
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, Subscriber inSubscriber, java.lang.String inSpecifiedSearchBase, java.lang.String[] inUserSearchBase, java.lang.String inUserNickNameAttr, java.lang.String[] inAttrList, boolean toBeAutoProvisioned, boolean validateNow) |
protected |
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, Subscriber inSubscriber, java.lang.String inSpecifiedSearchBase, java.lang.String[] inUserSearchBase, java.lang.String inUserNickNameAttr, java.lang.String[] inAttrList, boolean toBeAutoProvisioned, boolean validateNow, java.util.logging.Logger lgr) |
|
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, Subscriber inSubscriber, boolean validate) |
|
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, Subscriber inSubscriber, boolean validate, java.util.logging.Logger lgr) Constructs a User by specifying the user information and the subscriber information if required. |
protected |
User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, PropertySet inPs) |
protected |
User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, PropertySet inPs, java.util.logging.Logger lgr) |
protected |
User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, java.lang.String inEnumBase, Subscriber inSubscr, javax.naming.directory.SearchResult inEnum) |
protected |
User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, java.lang.String inEnumBase, Subscriber inSubscr, javax.naming.directory.SearchResult inEnum, java.util.logging.Logger lgr) |
Method Summary | |
---|---|
void |
authenticateUser(javax.naming.directory.DirContext ctx, int authType, java.lang.Object cred) Authenticates User using the appropriate credentials. |
void |
authenticateUser(javax.naming.directory.DirContext ctx, java.lang.String attrName, java.lang.String attrValue) Authenticates the user using an attribute-value pair. |
void |
createExtendedProperties(javax.naming.directory.DirContext ctx, int propType, ModPropertySet mps) Creates new extended properties for the user. |
java.lang.String |
getDn() Deprecated. use getDN(DirContext ctx) |
java.lang.String |
getDN() Deprecated. use getDN(DirContext ctx) |
java.lang.String |
getDn(javax.naming.directory.DirContext ctx) Deprecated. use getDN(DirContext ctx) |
java.lang.String |
getDN(javax.naming.directory.DirContext ctx) Returns the DN of this user. |
PropertySetCollection |
getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList) Returns a property set collection of all the extended properties of this user based on the property type specified. |
PropertySetCollection |
getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList, java.lang.String filter) Returns a property set collection of the extended properties of this user based on the property type specified |
Group[] |
getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String[] attrList, boolean nested) Returns an array of Group objects of which this user is a member. |
java.lang.String |
getGUID() Deprecated. use getGUID(DirContext ctx) |
java.lang.String |
getGUID(javax.naming.directory.DirContext ctx) Returns the GUID of the entry (resolves the name if necessary). |
PropertySetCollection |
getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList) Returns the attributes specified from this user. |
PropertySetCollection |
getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList, boolean usecache) Returns the attributes specified from this user. |
boolean |
isProvisioned() |
java.lang.String |
locateSubscriber(javax.naming.directory.DirContext ctx) Locates and returns the subscriber DN of the subscriber this user belongs to |
void |
resolve(javax.naming.directory.DirContext ctx) Validates the user by identifying its DN |
void |
setExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String filter, ModPropertySet mps) Sets extended properties of this user. |
void |
setProperties(javax.naming.directory.DirContext ctx, javax.naming.directory.ModificationItem[] mods) Sets the properties of this user using JNDI ModificationItem . |
void |
setProperties(javax.naming.directory.DirContext ctx, ModPropertySet mps) Sets the properties of this user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] radContainerObjList
public static final java.lang.String[] extPrefRefObjList
public static final java.lang.String[] radObjList
public static int CREDTYPE_PASSWD
public static int EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
Constructor Detail |
---|
protected User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, PropertySet inPs, java.util.logging.Logger lgr)
protected User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, PropertySet inPs)
protected User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, java.lang.String inEnumBase, Subscriber inSubscr, javax.naming.directory.SearchResult inEnum, java.util.logging.Logger lgr)
protected User(javax.naming.directory.DirContext inCtx, java.lang.String inUserDN, java.lang.String inUserGUID, java.lang.String inEnumBase, Subscriber inSubscr, javax.naming.directory.SearchResult inEnum)
public User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, Subscriber inSubscriber, boolean validate, java.util.logging.Logger lgr) throws UtilException
ctx
- A valid DirContextinUserIdType
- The type of user id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE or Util.IDTYPE_GUIDinUserIdName
- User IDinSubscriber
- A valid Subscriber objectvalidate
- Set to true to validate the user by the constructorUtilException
Util
public User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, Subscriber inSubscriber, boolean validate) throws UtilException
UtilException
public User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, boolean validate, java.util.logging.Logger lgr) throws UtilException
ctx
- A valid DirContextinUserIdType
- The type of user id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE or Util.IDTYPE_GUIDinUserIdName
- User IDinSubIdType
- The type of subscriber id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE Util.IDTYPE_GUID, Util.IDTYPE_DEFAULTinSubIdName
- Subscriber IDvalidate
- Set to true to validate the user by the constructorUtilException
Util
public User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, boolean validate) throws UtilException
UtilException
protected User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, Subscriber inSubscriber, java.lang.String inSpecifiedSearchBase, java.lang.String[] inUserSearchBase, java.lang.String inUserNickNameAttr, java.lang.String[] inAttrList, boolean toBeAutoProvisioned, boolean validateNow, java.util.logging.Logger lgr) throws UtilException
UtilException
protected User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, Subscriber inSubscriber, java.lang.String inSpecifiedSearchBase, java.lang.String[] inUserSearchBase, java.lang.String inUserNickNameAttr, java.lang.String[] inAttrList, boolean toBeAutoProvisioned, boolean validateNow) throws UtilException
UtilException
Method Detail |
---|
public PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList, java.lang.String filter) throws UtilException
ctx
- a valid DirContextpropType
- currently only supporting EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTORattrList
- a String array of attributes to be retrieved; null indicates that all attributes should be retrieved; an empty array indicates that none should be retrievedfilter
- a search filter to identify an particular applications whose properties is to be retrievedUtilException
EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
public PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList) throws UtilException
ctx
- a valid DirContextpropType
- currently only supporting EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTORattrList
- a String array of attributes to be retrieved; null indicates that all attributes should be retrieved; an empty array indicates that none should be retrievedUtilException
public void setExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String filter, ModPropertySet mps) throws UtilException
EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
is supported.
Here is an example to modify the orclpasswordattribute of the resource whose orclresourcname is "db9i". // Define ModPropertySet ModPropertySet mps = new ModPropertySet(); // Setting new orclpasswordattribute value mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_REPLACE, "orclpasswordattribute", "newpw"); // execute the modification user.setExtendedProperties( ctx, User.EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR, "orclresourcename=db9i", mps );
ctx
- a valid DirContextpropType
- only EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
is supportedfilter
- a filter used in locating the extended propertiesmps
- a ModPropertySet
containing the modificationsUtilException
public void createExtendedProperties(javax.naming.directory.DirContext ctx, int propType, ModPropertySet mps) throws UtilException
EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
is supported.
Here is an example to creating a new resource access descriptor for an orclresourcename="db9i" whose orclresourcetypename is "OracleDB". Various other attributes are also set. // Define ModPropertySet ModPropertySet mps = new ModPropertySet(); // Setting property values mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_REPLACE, "orclpasswordattribute", "newpw"); mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD, "orclpasswordattribute", "testpw"); mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD, "orcluseridattribute", "uid"); mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD, "orclresourcename", "db9i"); mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD, "orclresourcetypename", "OracleDB"); mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD, "orclusermodifiable", "true"); mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD, "orclownerguid", "BDD1DBD7748F24BEE034080020AB67AA"); // Create user.createExtendedProperties( ctx, User.EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR, mps );
ctx
- a valid DirContextpropType
- only EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR</ code> is supported
mps
- a ModPropertySet
containing the modificatio ns
UtilException
public void setProperties(javax.naming.directory.DirContext ctx, javax.naming.directory.ModificationItem[] mods) throws UtilException
ModificationItem
.ctx
- A valid DirContextmods
- A valid array of ModificationItem
UtilException
public void setProperties(javax.naming.directory.DirContext ctx, ModPropertySet mps) throws UtilException
See documentation on ModPropertySet
on how to construct a ModPropertySet
object.
If the modification involves user password modification, PasswordPolicyException
might be thrown. See documentation on PasswordPolicyException
for more details.
setProperties
in class LDAPEntry
ctx
- a valid DirContextmps
- a valid PropertySet containing the items to be modifiedUtilException
public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList) throws UtilException
ctx
- a valid DirContextattrList
- an array of attributes to be returnedUtilException
public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList, boolean usecache) throws UtilException
getProperties
in class LDAPEntry
ctx
- a valid DirContextattrList
- an array of attributes to be returnedusecache
- Set to true if previously cached values are to be usedUtilException
public void resolve(javax.naming.directory.DirContext ctx) throws UtilException
resolve
in class LDAPEntry
ctx
- A valid DirContextUtilException
public java.lang.String getDN(javax.naming.directory.DirContext ctx) throws UtilException
getDN
in class LDAPEntry
ctx
- a valid DirContextUtilException
public java.lang.String getDn(javax.naming.directory.DirContext ctx) throws UtilException
getDN(DirContext ctx)
ctx
- a valid DirContextUtilException
public java.lang.String getDn() throws UtilException
getDN(DirContext ctx)
UtilException
public java.lang.String getDN() throws UtilException
getDN(DirContext ctx)
UtilException
public java.lang.String locateSubscriber(javax.naming.directory.DirContext ctx) throws UtilException
UtilException
public java.lang.String getGUID() throws UtilException
getGUID(DirContext ctx)
UtilException
public java.lang.String getGUID(javax.naming.directory.DirContext ctx) throws UtilException
ctx
- a valid DirContextUtilException
public void authenticateUser(javax.naming.directory.DirContext ctx, int authType, java.lang.Object cred) throws UtilException
UtilException
is thrown. The UtilException
could be a PasswordPolicyException
. See documentation on the various PasswordPolicyException
s for more details.
Authentication succeeds if no exception is thrown.
ctx
- a valid DirContextauthType
- User.CREDTYPE_PASSWD is the only one supported at the momentcred
- the credentials based on the authTypeUtilException
public void authenticateUser(javax.naming.directory.DirContext ctx, java.lang.String attrName, java.lang.String attrValue) throws UtilException
ctx
- a valid DirContextattrName
- the name of the attributeattrValue
- the value of the attributeUtilException
public Group[] getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String[] attrList, boolean nested) throws UtilException
Group
objects of which this user is a member.ctx
- a valid DirContextattrList
- an array of attributes to be returned from each groupnested
- set to true to return nested group membershipUtilException
public boolean isProvisioned()
|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |