|
Oracle Internet Directory API Reference 10g(10.1.2) B14083-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ldap.util.Util
Util
class provides a set of static utility methods that are used throughout the oracle.ldap.util
package. Many of these APIs are generic LDAP methods that are extremely useful in performing LDAP operations.
Field Summary | |
static java.lang.String |
API_VERSION The API version number |
static int |
CREDTYPE_PASSWD Using userpassword to authenticate |
static java.lang.String |
DASURL_ACCOUNT_INFO DAS URL type - Account Info |
static java.lang.String |
DASURL_BASE DAS URL type - Base URL |
static java.lang.String |
DASURL_CREATE_GROUP DAS URL type - Create Group |
static java.lang.String |
DASURL_CREATE_RESOURCE DAS URL type - Create Resource |
static java.lang.String |
DASURL_CREATE_USER DAS URL type - Create User |
static java.lang.String |
DASURL_DELEGATION_CONSOLE DAS URL type - Delegation Console |
static java.lang.String |
DASURL_DELETE_GROUP DAS URL type - Delete Group |
static java.lang.String |
DASURL_DELETE_GROUP_GIVEN_GUID DAS URL type - Delete Group Given GUID |
static java.lang.String |
DASURL_DELETE_USER DAS URL type - Delete User |
static java.lang.String |
DASURL_DELETE_USER_GIVEN_GUID DAS URL type - Delete User Given GUID |
static java.lang.String |
DASURL_EDIT_GROUP DAS URL type - Edit Group |
static java.lang.String |
DASURL_EDIT_GROUP_GIVEN_GUID DAS URL type - Edit Group Given GUID |
static java.lang.String |
DASURL_EDIT_MY_PROFILE DAS URL type - Edit My Profile |
static java.lang.String |
DASURL_EDIT_USER DAS URL type - Edit User |
static java.lang.String |
DASURL_EDIT_USER_GIVEN_GUID DAS URL type - Edit User Given GUID |
static java.lang.String |
DASURL_EUS_CONSOLE DAS URL type - EUS Console |
static java.lang.String |
DASURL_GROUP_LOV DAS URL type - Group LOV |
static java.lang.String |
DASURL_GROUP_PRIVILEGE DAS URL type - Group Privilege |
static java.lang.String |
DASURL_GROUP_PRIVILEGE_GIVEN_GUID DAS URL type - Group Privilege Given GUID |
static java.lang.String |
DASURL_GROUP_SEARCH DAS URL type - Group Search |
static java.lang.String |
DASURL_PASSWORD_CHANGE DAS URL type - Password Change |
static java.lang.String |
DASURL_RESET_PASSWORD DAS URL type - Reset Password |
static java.lang.String |
DASURL_TIMEZONE DAS URL type - Time Zone |
static java.lang.String |
DASURL_USER_LOV DAS URL type - User Lov |
static java.lang.String |
DASURL_USER_PRIVILEGE DAS URL type - User Privilege |
static java.lang.String |
DASURL_USER_PRIVILEGE_GIVEN_GUID DAS URL type - User Privilege Given GUID |
static java.lang.String |
DASURL_USER_SEARCH DAS URL type - User Search |
static java.lang.String |
DASURL_VIEW_USER_PROFILE DAS URL type - View User Profile |
static int |
IDTYPE_DEFAULT Use default value |
static int |
IDTYPE_DN The id type used is a DN |
static int |
IDTYPE_FILTER The id type used is a filter |
static int |
IDTYPE_GUID The id type used is a GUID |
static int |
IDTYPE_KERB_PRINCIPAL The id type used is a Kerberos Principal |
static int |
IDTYPE_SIMPLE The id type used is a simple id |
static int |
IDTYPE_WINDOWS The id type used is a Windows user id |
static java.lang.String |
INTERFACE_VERSION The Interface version number |
static int |
PROPERTIES_DETACHED User detached properties |
static int |
PROPERTIES_ENTRY User entry properties |
static int |
PWD_VERIFIERTYPE_COMMON The Common Password Verifier |
Constructor Summary | |
Util() |
Method Summary | |
static java.util.Hashtable |
getAllDASUrl(javax.naming.directory.DirContext ctx) Returns a Hashtable containing all the DAS URLs. |
static java.lang.String |
getDASUrl(javax.naming.directory.DirContext ctx, java.lang.String urlTypeDN) Returns a particular DAS url identified by the urlTypeDN. |
static PropertySetCollection |
getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested) |
static PropertySetCollection |
getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested, java.lang.String memberAttribute) Returns a PropertySetCollection of groups that the dn belongs to directly or indirectly. |
static PropertySetCollection |
getGroupMembership(javax.naming.directory.DirContext ctx, User curUser, java.lang.String[] attrList, boolean nested) Return a list of groups the user belongs to directly or indirectly The groups are returned in a PropertySetCollection . |
static PropertySetCollection |
getOwnership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested) Returns a PropertySetCollection of DNs where the input DN is an owner. |
static PropertySetCollection |
getOwnership(javax.naming.directory.DirContext ctx, User curUser, java.lang.String[] attrList, boolean nested) Returns a PropertySetCollection of DNs where the user is an owner. |
static java.lang.String |
getParentDN(java.lang.String dn) Returns the parent DN of the given DN For example, if dn is "dc=acme,dc=com", getParentDN returns "dc=com". |
static java.lang.String |
getRDN(java.lang.String dn) Returns the RDN portion of the DN. |
static java.lang.String |
getSubscriberDn(javax.naming.directory.DirContext ctx, java.lang.String subId, int subIdType) Deprecated. Use Subscriber.getDN(ctx) |
static java.lang.String |
handleSpecialChars(java.lang.String filterVal) Returns a string with special characters escaped based on RFC-2254. |
static java.lang.String |
normalizeDN(java.lang.String inDN) Normalizes the DN. |
static void |
printResults(PropertySetCollection resultSet) Prints the entries represented by the PropertySetCollecition in LDIF format to Standard Output |
static java.lang.String |
resolveDuplicateDN(javax.naming.directory.DirContext ctx, java.lang.String dnString) Returns a unique DN whose value is guaranteed to be unique in the specified LDAP server. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String API_VERSION
public static java.lang.String INTERFACE_VERSION
public static int PWD_VERIFIERTYPE_COMMON
public static int IDTYPE_DN
public static int IDTYPE_SIMPLE
public static int IDTYPE_GUID
public static int IDTYPE_DEFAULT
public static int IDTYPE_FILTER
public static int IDTYPE_WINDOWS
public static int IDTYPE_KERB_PRINCIPAL
public static int PROPERTIES_ENTRY
public static int PROPERTIES_DETACHED
public static int CREDTYPE_PASSWD
public static java.lang.String DASURL_BASE
public static java.lang.String DASURL_CREATE_USER
public static java.lang.String DASURL_EDIT_GROUP
public static java.lang.String DASURL_EDIT_GROUP_GIVEN_GUID
public static java.lang.String DASURL_GROUP_SEARCH
public static java.lang.String DASURL_EDIT_USER
public static java.lang.String DASURL_GROUP_LOV
public static java.lang.String DASURL_DELETE_USER
public static java.lang.String DASURL_USER_PRIVILEGE
public static java.lang.String DASURL_CREATE_GROUP
public static java.lang.String DASURL_USER_SEARCH
public static java.lang.String DASURL_ACCOUNT_INFO
public static java.lang.String DASURL_EDIT_USER_GIVEN_GUID
public static java.lang.String DASURL_DELETE_USER_GIVEN_GUID
public static java.lang.String DASURL_DELETE_GROUP_GIVEN_GUID
public static java.lang.String DASURL_GROUP_PRIVILEGE
public static java.lang.String DASURL_USER_PRIVILEGE_GIVEN_GUID
public static java.lang.String DASURL_PASSWORD_CHANGE
public static java.lang.String DASURL_USER_LOV
public static java.lang.String DASURL_GROUP_PRIVILEGE_GIVEN_GUID
public static java.lang.String DASURL_DELETE_GROUP
public static java.lang.String DASURL_CREATE_RESOURCE
public static java.lang.String DASURL_EUS_CONSOLE
public static java.lang.String DASURL_DELEGATION_CONSOLE
public static java.lang.String DASURL_EDIT_MY_PROFILE
public static java.lang.String DASURL_RESET_PASSWORD
public static java.lang.String DASURL_VIEW_USER_PROFILE
public static java.lang.String DASURL_TIMEZONE
Constructor Detail |
public Util()
Method Detail |
public static java.lang.String getSubscriberDn(javax.naming.directory.DirContext ctx, java.lang.String subId, int subIdType) throws UtilException
Subscriber.getDN(ctx)
ctx
- a valid DirContextsubId
- Subscriber IDsubIdType
- The type of subscriber id being used - use one of IDTYPE_DN, IDTYPE_SIMPLE or Util.IDTYPE_GUIDUtilException
public static PropertySetCollection getOwnership(javax.naming.directory.DirContext ctx, User curUser, java.lang.String[] attrList, boolean nested) throws UtilException
PropertySetCollection
of DNs where the user is an owner. If nested
is set to true, the method will look for nested ownership as well.ctx
- DirContextcurUser
- a valid User
objectattrList
- a set of attributes to be fetchednested
- true if nested ownership is desiredUtilException
public static PropertySetCollection getOwnership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested) throws UtilException
PropertySetCollection
of DNs where the input DN is an owner. If nested
is set to true, the method will look for nested ownership as well.ctx
- DirContextdn
- the DN to be looked upattrList
- a set of attributes to be fetchednested
- true if nested ownership is desiredUtilException
public static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx, User curUser, java.lang.String[] attrList, boolean nested) throws UtilException
PropertySetCollection
.ctx
- a valid DirContextcurUser
- a valid User objectattrList
- a String array of attributes to be retrieved from each groupnested
- Set to true to look for nested membership. Otherwise, only direct memberships are returnedUtilException
public static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested, java.lang.String memberAttribute) throws UtilException
PropertySetCollection
. The memberAttribute
allows the choice of the uniqemember attribute or the member attribute to be used during the lookup.ctx
- a valid DirContextdn
- a valid DNattrList
- a String array of attributes to be retrieved from each groupnested
- Set to true to look for nested membership. Otherwise, only direct memberships are returnedmemberAttribute
- use "uniquemember" or "member".PropertySetCollection
UtilException
public static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested) throws UtilException
UtilException
public static java.lang.String normalizeDN(java.lang.String inDN)
inDN
- the DN to be normalizedpublic static java.lang.String getDASUrl(javax.naming.directory.DirContext ctx, java.lang.String urlTypeDN) throws UtilException
ctx
- a valid DirContexturlTypeDN
- use one of Util.DASURL_* which represents a particular URL type.String
representing the URLUtilException
public static java.util.Hashtable getAllDASUrl(javax.naming.directory.DirContext ctx) throws UtilException
ctx
- a valid DirContextUtilException
public static void printResults(PropertySetCollection resultSet)
resultSet
- A valid ProperSetCollectionpublic static java.lang.String getParentDN(java.lang.String dn)
dn
- a valid DNpublic static java.lang.String getRDN(java.lang.String dn)
For example, if dn is "dc=acme,dc=com", this returns "dc=acme".
dn
- a valid DNpublic static java.lang.String handleSpecialChars(java.lang.String filterVal)
filterVal
- the input stringpublic static java.lang.String resolveDuplicateDN(javax.naming.directory.DirContext ctx, java.lang.String dnString) throws UtilException
ctx
- a valid DirContext connected to an LDAP serverdnString
- a String representing the DNUtilException
|
Oracle Internet Directory API Reference 10g(10.1.2) B14083-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |