Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


oracle.ldap.util
Class Subscriber

java.lang.Object
  extended by oracle.ldap.util.LDAPEntry
      extended by oracle.ldap.util.Subscriber

All Implemented Interfaces:
java.io.Serializable

public class Subscriber
extends LDAPEntry
implements java.io.Serializable

This class represents an Identity Management Realm in the directory. It provides methods to manage many items within the realm itself. For example,

 - User Lookup
 - User Creation    * - Group Lookup
 - Service Lookup
 
See Also:
Serialized Form

Field Summary
static int COMMON_PROPERTIES
          Property type to retrieve the common properties of this subscriber
static int DETACHED_PROPERTIES
           
static int ENTRY_PROPERTIES
          Property type to retrieve the entry properties of this subscriber
static int EXTPROPTYPE_COMMON
          Extended Preference Type to be used with getExtendedProperties() - Common Subscriber properties
static int EXTPROPTYPE_DEFAULT_RAD
          Extended Preference Type to be used with getExtendedProperties() - Default User Extended Properties
static int EXTPROPTYPE_RESOURCE_ACCESS_TYPE
          Extended Preference Type to be used with getExtendedProperties() - Resource Access Type
protected static int PROPERTY_USER_SEARCH_BASE
           
static java.lang.String USER_NAMING_ATTR_KERBEROS
          Property name type to retrieve the Kerberos principal attribute
static java.lang.String USER_NAMING_ATTR_SIMPLE
          Property name type to retrieve the common user nickname attribute
static java.lang.String USER_NAMING_ATTR_WINDOWS
          Property name type to retrieve the Windows principal attribute
static int USER_NAMING_PROPERTIES
          Property type to retrieve user naming properties of this subscriber

 

Fields inherited from class oracle.ldap.util.LDAPEntry
entryDN, entryIdType, entryPsc, inEntryId

 

Constructor Summary
  Subscriber(javax.naming.directory.DirContext ctx, int inSubIdType, java.lang.String inSubIdName, boolean validate)
           
  Subscriber(javax.naming.directory.DirContext ctx, int inSubIdType, java.lang.String inSubIdName, boolean validate, java.util.logging.Logger lgr)
          Constructs a Subscriber using an ID type and an ID name.
protected Subscriber(javax.naming.directory.DirContext ctx, int inSubIdType, java.lang.String inSubIdName, java.lang.String inOhome, PropertySetCollection rootPsc, java.lang.String[] inAttrList)
           
protected Subscriber(javax.naming.directory.DirContext ctx, int inSubIdType, java.lang.String inSubIdName, java.lang.String inOhome, PropertySetCollection rootPsc, java.lang.String[] inAttrList, java.util.logging.Logger lgr)
           
protected Subscriber(javax.naming.directory.DirContext ctx, java.lang.String inSubDN)
           
protected Subscriber(javax.naming.directory.DirContext ctx, java.lang.String inSubDN, java.util.logging.Logger lgr)
          Constructor used within the package only.
protected Subscriber(javax.naming.directory.DirContext ctx, java.lang.String inSubDN, PropertySet inDnPs)
           
protected Subscriber(javax.naming.directory.DirContext ctx, java.lang.String inSubDN, PropertySet inDnPs, java.util.logging.Logger lgr)
          Constructor used within the package only.

 

Method Summary
 Group createGroup(javax.naming.directory.DirContext ctx, java.lang.String createGroupBase, ModPropertySet ps, boolean useMandatoryObjectclasses)
          Creates a group entry under the specified create group base.
 User createUser(javax.naming.directory.DirContext ctx, ModPropertySet ps, boolean useMandatoryObjectclasses)
           Creates a user entry under the create user base.
 User createUser(javax.naming.directory.DirContext ctx, java.lang.String createUserBase, ModPropertySet ps, boolean useMandatoryObjectclasses)
          Creates a user entry under the specified create user base.
 User createUser(javax.naming.directory.DirContext ctx, java.lang.String newUserDN, ModPropertySet ps, boolean useMandatoryObjectclasses, boolean validateDN)
          Creates a user entry using a user DN.
 void deleteGroup(javax.naming.directory.DirContext ctx, Group inGroup)
          Deletes the specified group from this subscriber.
 void deleteUser(javax.naming.directory.DirContext ctx, User inUser)
          Deletes the specified user from this subscriber.
 ServiceReference[] getAllServiceReferences(javax.naming.directory.DirContext ctx)
          Returns an array of ServiceReference objects associated with this subscriber
 ServiceReference[] getAllServiceReferences(javax.naming.directory.DirContext ctx, java.lang.String[] attrList)
          Returns an array of Service objects representing all the service instances belonging to this subscriber.
protected  java.lang.String[] getCommonAttrs(javax.naming.directory.DirContext ctx)
           
 java.lang.String getDn(javax.naming.directory.DirContext ctx)
          Deprecated. Use Subscriber.getDN(ctx) instead.
 java.lang.String getDN(javax.naming.directory.DirContext ctx)
          Returns the DN of the subscriber (resolves the name if necessary).
 PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList, java.lang.String filter)
          Retrieves Extended properties under the Oracle Context of this subscriber.
 Group getGroup(javax.naming.directory.DirContext ctx, int groupIdType, java.lang.String groupIdName, java.lang.String[] attrList)
          Returns a Group object using the specified information.
 Group getGroup(javax.naming.directory.DirContext ctx, int groupIdType, java.lang.String groupIdName, java.lang.String specifiedSearchBase, java.lang.String[] attrList)
          Returns a group object using the specified information under the specified group search base.
 Group[] getGroups(javax.naming.directory.DirContext ctx, int filterIdType, java.lang.String filter, java.lang.String specifiedSearchBase, java.lang.String[] attrList)
          Returns an array of Group[] objects using the specified information.
 java.lang.String[] getGroupSearchBase()
          Return the subscriber group search base
 PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList)
          Retrieves selected attributes associated with this subscriber
 PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList)
          Retrieves selected attributes associated with this subscriber
 java.lang.String getPwdVerifierAttributeName(javax.naming.directory.DirContext ctx, int verifierType)
          Returns the attribute name to be used during user authentication using the specified password verifier.
 java.lang.String getPwdVerifierAttributeName(javax.naming.directory.DirContext ctx, java.lang.String appID)
          Returns the attribute name to be used during user authentication using the specified password verifier.
 User getUser(javax.naming.directory.DirContext ctx, int userIdType, java.lang.String userIdName, java.lang.String[] attrList)
          Returns a User object with the specified information.
 User getUser(javax.naming.directory.DirContext ctx, int userIdType, java.lang.String userIdName, java.lang.String userSpecifiedSearchBase, java.lang.String[] attrList)
          Returns a User object with the specified information.
 User getUser(javax.naming.directory.DirContext ctx, int userIdType, java.lang.String userIdName, java.lang.String userSpecifiedSearchBase, java.lang.String[] attrList, boolean autoProvisioningEnabled)
           
 User[] getUsers(javax.naming.directory.DirContext ctx, int filterIdType, java.lang.String filter, java.lang.String userSpecifiedSearchBase, java.lang.String[] attrList)
          Returns an array of User objects with the specified information.
 User[] getUsers(javax.naming.directory.DirContext ctx, int filterIdType, java.lang.String filter, java.lang.String userSpecifiedSearchBase, java.lang.String[] attrList, javax.naming.directory.SearchControls inSctrl)
          Returns an array of User objects with the specified information.
 java.lang.String[] getUserSearchBase()
          Return the subscriber search base
 java.lang.String getVersion(javax.naming.directory.DirContext ctx)
          Returns the verion of this Subscriber
 boolean isUpToDate(javax.naming.directory.DirContext ctx, java.io.PrintStream pStream)
           
 void refresh(javax.naming.directory.DirContext ctx)
          Refreshes cached elements in the Subscriber object.
 void resolve(javax.naming.directory.DirContext ctx)
          Validates the subscriber by identifying its DN
 void setExtendedProperties(javax.naming.directory.DirContext ctx, int propType, ModPropertySet ps)
          Sets the extended properties of the subscriber.
 void setProperties(javax.naming.directory.DirContext ctx, ModPropertySet ps)
          Sets Properties of the subscriber.
 void upgrade(javax.naming.directory.DirContext ctx, java.lang.String oHome, java.io.PrintStream pStream)
           

 

Methods inherited from class oracle.ldap.util.LDAPEntry
getProperties

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

EXTPROPTYPE_COMMON

public static int EXTPROPTYPE_COMMON
Extended Preference Type to be used with getExtendedProperties() - Common Subscriber properties

EXTPROPTYPE_RESOURCE_ACCESS_TYPE

public static int EXTPROPTYPE_RESOURCE_ACCESS_TYPE
Extended Preference Type to be used with getExtendedProperties() - Resource Access Type

EXTPROPTYPE_DEFAULT_RAD

public static int EXTPROPTYPE_DEFAULT_RAD
Extended Preference Type to be used with getExtendedProperties() - Default User Extended Properties

USER_NAMING_ATTR_SIMPLE

public static final java.lang.String USER_NAMING_ATTR_SIMPLE
Property name type to retrieve the common user nickname attribute
See Also:
Constant Field Values

USER_NAMING_ATTR_WINDOWS

public static final java.lang.String USER_NAMING_ATTR_WINDOWS
Property name type to retrieve the Windows principal attribute
See Also:
Constant Field Values

USER_NAMING_ATTR_KERBEROS

public static final java.lang.String USER_NAMING_ATTR_KERBEROS
Property name type to retrieve the Kerberos principal attribute
See Also:
Constant Field Values

ENTRY_PROPERTIES

public static final int ENTRY_PROPERTIES
Property type to retrieve the entry properties of this subscriber
See Also:
Constant Field Values

DETACHED_PROPERTIES

public static final int DETACHED_PROPERTIES
See Also:
Constant Field Values

COMMON_PROPERTIES

public static final int COMMON_PROPERTIES
Property type to retrieve the common properties of this subscriber
See Also:
Constant Field Values

USER_NAMING_PROPERTIES

public static final int USER_NAMING_PROPERTIES
Property type to retrieve user naming properties of this subscriber
See Also:
Constant Field Values

PROPERTY_USER_SEARCH_BASE

protected static final int PROPERTY_USER_SEARCH_BASE
See Also:
Constant Field Values

Constructor Detail

Subscriber

protected Subscriber(javax.naming.directory.DirContext ctx,
                     java.lang.String inSubDN,
                     java.util.logging.Logger lgr)
Constructor used within the package only. The DN is known to be a valid subscriber DN - resolve() is never invoked
Parameters:
inSubDN - a valid subscriber DN

Subscriber

protected Subscriber(javax.naming.directory.DirContext ctx,
                     java.lang.String inSubDN)

Subscriber

protected Subscriber(javax.naming.directory.DirContext ctx,
                     java.lang.String inSubDN,
                     PropertySet inDnPs,
                     java.util.logging.Logger lgr)
Constructor used within the package only. The DN is known to be a valid subscriber DN - resolve() is never invoked. A PropertySet is supplied and is cached by the Subscriber object. A future getProperties() can make used of these cached attribute values.
Parameters:
inSubDN - a valid subscriber DN
inDnPs - a PropertySet containing properties (attribute values) of this subscriber

Subscriber

protected Subscriber(javax.naming.directory.DirContext ctx,
                     java.lang.String inSubDN,
                     PropertySet inDnPs)

Subscriber

public Subscriber(javax.naming.directory.DirContext ctx,
                  int inSubIdType,
                  java.lang.String inSubIdName,
                  boolean validate,
                  java.util.logging.Logger lgr)
           throws UtilException
Constructs a Subscriber using an ID type and an ID name. The type can be one of the following
 DN - the DN of the subscriber
 SIMPLE - the simple name or the nick name of the subscriber
 GUID - the GUID of the subscriber
 DEFAULT - the default subscriber - an ID name is not required
                                    in this case

 
Parameters:
ctx - a valid DirContext
inSubIdType - The type of subscriber id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE or Util.IDTYPE_GUID
inSubIdName - Subscriber ID - If this value is null and inSubIdType is Util.IDTYPE_DN, then default subscriber will be used. Otherwise, a null will cause an exception
validate - Set to true to validate the info
Throws:
UtilException

Subscriber

public Subscriber(javax.naming.directory.DirContext ctx,
                  int inSubIdType,
                  java.lang.String inSubIdName,
                  boolean validate)
           throws UtilException
Throws:
UtilException

Subscriber

protected Subscriber(javax.naming.directory.DirContext ctx,
                     int inSubIdType,
                     java.lang.String inSubIdName,
                     java.lang.String inOhome,
                     PropertySetCollection rootPsc,
                     java.lang.String[] inAttrList,
                     java.util.logging.Logger lgr)
              throws UtilException
Throws:
UtilException

Subscriber

protected Subscriber(javax.naming.directory.DirContext ctx,
                     int inSubIdType,
                     java.lang.String inSubIdName,
                     java.lang.String inOhome,
                     PropertySetCollection rootPsc,
                     java.lang.String[] inAttrList)
              throws UtilException
Throws:
UtilException

Method Detail

getProperties

public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx,
                                           java.lang.String[] attrList)
                                    throws UtilException
Retrieves selected attributes associated with this subscriber
Parameters:
ctx - a valid DirContext
attrList - an array of attributes to be retrieved
Throws:
UtilException

setProperties

public void setProperties(javax.naming.directory.DirContext ctx,
                          ModPropertySet ps)
                   throws UtilException
Sets Properties of the subscriber. You need to first create a proper ModPropertySet for the modification. See the documentation on ModPropertySet for more details.
Overrides:
setProperties in class LDAPEntry
Parameters:
ctx - a valid DirContext
ps - a valid PropertySet containing the items to be modified
Throws:
UtilException

setExtendedProperties

public void setExtendedProperties(javax.naming.directory.DirContext ctx,
                                  int propType,
                                  ModPropertySet ps)
                           throws UtilException
Sets the extended properties of the subscriber. You need to first create a proper ModPropertySet for the modification. See the documentation on ModPropertySet for more details.
Parameters:
ctx - a valid DirContext
propType - currently only supports Subscriber.EXTPROPTYPE_COMMON
ps - a valid PropertySet containing the items to be modified
Throws:
UtilException

getExtendedProperties

public PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx,
                                                   int propType,
                                                   java.lang.String[] attrList,
                                                   java.lang.String filter)
                                            throws UtilException
Retrieves Extended properties under the Oracle Context of this subscriber. Currently, only "Common", "Resource Access Type" and "Default Resource Access Descriptors" properties are supported.
Parameters:
ctx - a valid DirContext
propType - Use one of EXTPROPTYPE_COMMON, EXTPROPTYPE_RESOURCE_ACCESS_TYPE or EXTPROPTYPE_DEFAULT_RAD
attrList - an array of attributes to be retrieved
filter - a search filter to narrow search criteria. For eg. use "(orclResourceTypeName=OracleDB)" with EXTPROPTYPE_RESOURCE_ACCESS_TYPE to get only those properties of OracleDB
Returns:
a PropertySetCollection
Throws:
UtilException

resolve

public void resolve(javax.naming.directory.DirContext ctx)
             throws UtilException
Validates the subscriber by identifying its DN
Specified by:
resolve in class LDAPEntry
Parameters:
ctx - a valid DirContext
Throws:
UtilException

refresh

public void refresh(javax.naming.directory.DirContext ctx)
             throws UtilException
Refreshes cached elements in the Subscriber object.
Parameters:
ctx - a valid DirContext
Throws:
UtilException

getDN

public java.lang.String getDN(javax.naming.directory.DirContext ctx)
                       throws UtilException
Returns the DN of the subscriber (resolves the name if necessary).
Overrides:
getDN in class LDAPEntry
Parameters:
ctx - a valid DirContext
Throws:
UtilException

getDn

public java.lang.String getDn(javax.naming.directory.DirContext ctx)
                       throws UtilException
Deprecated. Use Subscriber.getDN(ctx) instead.
Returns the DN of this subscriber.
Throws:
UtilException

getUser

public User getUser(javax.naming.directory.DirContext ctx,
                    int userIdType,
                    java.lang.String userIdName,
                    java.lang.String userSpecifiedSearchBase,
                    java.lang.String[] attrList,
                    boolean autoProvisioningEnabled)
             throws UtilException
Throws:
UtilException

getUser

public User getUser(javax.naming.directory.DirContext ctx,
                    int userIdType,
                    java.lang.String userIdName,
                    java.lang.String[] attrList)
             throws UtilException
Returns a User object with the specified information. The userIDType specifies the type of userIdName used - GUID, DN or simple name. The attrList specifies the attributes to be retrieved from the user entry when the DN is being resolved. The returned values are cached in the User object for later usage.
Parameters:
ctx - a valid DirContext
userIdType - one of Util.IDTYPE_GUID, Util.IDTYPE_DN, Util.IDTYPE_SIMPLE
userIdName - the user identifier based on userIdType
attrList - an array of attributes to returned while resolving the user DN
Returns:
a User object
Throws:
UtilException

getUser

public User getUser(javax.naming.directory.DirContext ctx,
                    int userIdType,
                    java.lang.String userIdName,
                    java.lang.String userSpecifiedSearchBase,
                    java.lang.String[] attrList)
             throws UtilException
Returns a User object with the specified information. The userIDType specifies the type of userIdName used - GUID, DN or simple name. The attrList specifies the attributes to be retrieved from the user entry when the DN is being resolved. The returned values are cached in the User object for later usage. If the user search base is specified, the search is narrowed to within the specified search base. If null is specified, the search will go through all search bases.
Parameters:
ctx - a valid DirContext
userIdType - one of Util.IDTYPE_GUID, Util.IDTYPE_DN, Util.IDTYPE_SIMPLE
userIdName - the user identifier based on userIdType
userSpecifiedSearchBase - the search base under which the the user is to be looked up. If null is specified, the search will go through all the search bases
attrList - an array of attributes to returned while resolving the user DN
Throws:
UtilException

getUsers

public User[] getUsers(javax.naming.directory.DirContext ctx,
                       int filterIdType,
                       java.lang.String filter,
                       java.lang.String userSpecifiedSearchBase,
                       java.lang.String[] attrList)
                throws UtilException
Returns an array of User objects with the specified information.

The filterIdType specifies the type of filter used. This is essentially a filtered search. If filterIdType is Util.IDTYPE_SIMPLE, the filter will be created using the nick name attribute.

For example, if you want to search for all the users whose nick name begins with "John", the filter should be set to "John*".

If the filterIdType is Util.IDTYPE_FILTER, then a proper LDAP filter is expected.

For example, "(&(cn=John*)(sn=John*))".

The returned attribute values, specified in attrList are cached in each individual User object for later usage.

A user search base can also be specified. If null, then all the search bases will be used.

Parameters:
ctx - a valid DirContext
filterIdType - one of Util.IDTYPE_SIMPLE or Util.IDTYPE_FILTER.
filter - the user identifier based on userIdType.
userSpecifiedSearchBase - the search base under which the the user is to be looked up. If null is specified, the search will go through all the search bases
attrList - an array of attributes to returned while resolving the user DN
Returns:
a User[]
Throws:
UtilException

getUsers

public User[] getUsers(javax.naming.directory.DirContext ctx,
                       int filterIdType,
                       java.lang.String filter,
                       java.lang.String userSpecifiedSearchBase,
                       java.lang.String[] attrList,
                       javax.naming.directory.SearchControls inSctrl)
                throws UtilException
Returns an array of User objects with the specified information.

Functionality is the same as the other Subscribe.getUsers(). This method allows the setting of the SearchControls parameter to control the count limit and the time limit of the search.

Parameters:
ctx - a valid DirContext
filterIdType - one of Util.IDTYPE_SIMPLE or Util.IDTYPE_FILTER.
filter - the user identifier based on userIdType.
userSpecifiedSearchBase - the search base under which the the user is to be looked up. If null is specified, the search will go through all the search bases
attrList - an array of attributes to returned while resolving the user DN * getUsers
inSctrl - user specified search controls for this search Currently, only CountLimit and TimeLimit are used from the specified search controls.
Returns:
a User[]
Throws:
UtilException

getAllServiceReferences

public ServiceReference[] getAllServiceReferences(javax.naming.directory.DirContext ctx)
                                           throws UtilException
Returns an array of ServiceReference objects associated with this subscriber
Parameters:
ctx - a valid DirContext
Returns:
a ServiceReference[] of representing all the Services associated with this subscriber
Throws:
UtilException

getAllServiceReferences

public ServiceReference[] getAllServiceReferences(javax.naming.directory.DirContext ctx,
                                                  java.lang.String[] attrList)
                                           throws UtilException
Returns an array of Service objects representing all the service instances belonging to this subscriber.
Parameters:
ctx - a valid DirContext
attrList - the attribute list to be returned along with each service
Throws:
UtilException

createUser

public User createUser(javax.naming.directory.DirContext ctx,
                       ModPropertySet ps,
                       boolean useMandatoryObjectclasses)
                throws UtilException

Creates a user entry under the create user base. It assumes that there is only one create user base.

If multiple create user bases exist, the method returns a UtilException.

If useMandatoryObjectclasses is set to true, the DAS-specific required attributes will be mandatory on top of what the objectclasses enforce. Otherwise, only the mandatory attributes from the objectclasses are required.

You must include objectclasses in ModPropertySet when useMandatoryObjectclasses is set to false.

 Here is an example on how to use this code to create a user "John":

    // sub is a valid Subscriber
    // ctx is a valid DirContext

    // Create ModPropertySet with user information

    ModPropertySet mps = new ModPropertySet();
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"cn", "John");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"sn", "John");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"uid", "John");

    // Create the user
    User newUser = sub.createUser( ctx, mps, true );
    System.out.println("New User DN: " + newUser.getDN( ctx ) );
 
Parameters:
ctx - a valid DirContext
ps - a ModPropertySet defining the user attributes
useMandatoryObjectclasses - set to true if required to use the mandatory objectclasses specified by DAS
Returns:
a User object of the newly created user
Throws:
UtilException - thrown when creation can not be completed.

createUser

public User createUser(javax.naming.directory.DirContext ctx,
                       java.lang.String createUserBase,
                       ModPropertySet ps,
                       boolean useMandatoryObjectclasses)
                throws UtilException
Creates a user entry under the specified create user base. The specified create base must be a valid one or an UtilException will be thrown. If useMandatoryAttr is set to true, the DAS-specific required attributes will be mandatory on top of what the objectclasses enforce. Otherwise, only the mandatory attributes from the objectclasses are required. Objectclasses do not need to be included in ModPropertySet.
Parameters:
ctx - a valid DirContext
createUserBase - a valid create user base
ps - a ModPropertySet defining the user attributes
useMandatoryObjectclasses - set to true if required to use the mandatory objectclasses specified by DAS
Throws:
UtilException - thrown when creation can not be completed.

createUser

public User createUser(javax.naming.directory.DirContext ctx,
                       java.lang.String newUserDN,
                       ModPropertySet ps,
                       boolean useMandatoryObjectclasses,
                       boolean validateDN)
                throws UtilException
Creates a user entry using a user DN. The specified DN is used. There is no validation on whether the DN falls under the realm search base(s) or not. There will be a validation on whether the naming attribute and the nickname attribute are present in the ModPropertySet. Unlike the other createUser() methods, this one requires the client to provide all the objectclasses through the ModPropertySet.
Parameters:
ctx - a valid DirContext
newUserDN - the DN of the user to be created
ps - a ModPropertySet defining the user attributes including objectclasses.
useMandatoryObjectclasses - set to true if required to use the mandatory objectclasses specified by DAS
validateDN - set to true if DN is to be validated
Throws:
UtilException

deleteUser

public void deleteUser(javax.naming.directory.DirContext ctx,
                       User inUser)
                throws UtilException
Deletes the specified user from this subscriber. The user will also be removed from the groups of which he is a uniquemember
Parameters:
ctx - a valid DirContext
inUser - a valid user object
Throws:
UtilException

deleteGroup

public void deleteGroup(javax.naming.directory.DirContext ctx,
                        Group inGroup)
                 throws UtilException
Deletes the specified group from this subscriber. The user will also be removed from the groups of which he is a uniquemember
Parameters:
ctx - a valid DirContext
inGroup - a valid group object
Throws:
UtilException

createGroup

public Group createGroup(javax.naming.directory.DirContext ctx,
                         java.lang.String createGroupBase,
                         ModPropertySet ps,
                         boolean useMandatoryObjectclasses)
                  throws UtilException
Creates a group entry under the specified create group base. The specified create base must be a valid one or an UtilException will be thrown. Objectclasses do not need to be included in ModPropertySet.
Parameters:
ctx - a valid DirContext
createGroupBase - a valid create group base
ps - a ModPropertySet defining the group attributes
useMandatoryObjectclasses - set to true if required to use the mandatory objectclasses specified by DAS
Throws:
UtilException - thrown when creation can not be completed.

getGroup

public Group getGroup(javax.naming.directory.DirContext ctx,
                      int groupIdType,
                      java.lang.String groupIdName,
                      java.lang.String[] attrList)
               throws UtilException
Returns a Group object using the specified information. The groupIdType specifies the type of groupIdName used - GUID, DN or simple name.

When a simple name is used, the search will go through all the group search bases.

The attrList specifies the attributes to be retrieved from the group entry when the DN is being resolved. The returned values are cached in the group object for later usage.

Parameters:
ctx - a valid DirContext
groupIdType - one of Util.IDTYPE_GUID, Util.IDTYPE_DN, or Util.IDTYPE_SIMPLE
groupIdName - the group identifier based on groupIdType
attrList - a set of attributes to be fetched
Returns:
a Group object
Throws:
UtilException

getGroup

public Group getGroup(javax.naming.directory.DirContext ctx,
                      int groupIdType,
                      java.lang.String groupIdName,
                      java.lang.String specifiedSearchBase,
                      java.lang.String[] attrList)
               throws UtilException
Returns a group object using the specified information under the specified group search base.
Parameters:
ctx - a valid DirContext
groupIdType - one of Util.IDTYPE_GUID, Util.IDTYPE_DN, or Util.IDTYPE_SIMPLE
groupIdName - the group identifier based on groupIdType
specifiedSearchBase - the group search base DN
attrList - a set of attributes to be fetched
Returns:
a Group object
Throws:
UtilException

getGroups

public Group[] getGroups(javax.naming.directory.DirContext ctx,
                         int filterIdType,
                         java.lang.String filter,
                         java.lang.String specifiedSearchBase,
                         java.lang.String[] attrList)
                  throws UtilException
Returns an array of Group[] objects using the specified information.

The filterIdType specifies the type of filter used. This is essentially a filtered search. If filterIdType is Util.IDTYPE_SIMPLE, the filter will be created using the nick name attribute ("cn" by default) *

For example, if you want to search for all the groups whose nick name begins with "admin", the filter should be set to "admin*". If filterIdType is Util.IDTYPE_FILTER, then a proper LDAP filter is expected

For example, "(&(cn=admin*)(uniquemember=John*))".

The returned attribute values, specified in attrList are cached in each individual User object for later usage.

A group search base can also be specified. If null, then all the search bases will be used during the search.

Parameters:
ctx - a valid DirContext
filterIdType - one of Util.IDTYPE_SIMPLE or Util.IDTYPE_FILTER.
filter - the user identifier based on userIdType.
specifiedSearchBase - the search base under which the the group is to be looked up. If null is specified, the search will go through all the search bases
attrList - an array of attributes to returned while resolving the user DN
Returns:
a Group[]
Throws:
UtilException

getPwdVerifierAttributeName

public java.lang.String getPwdVerifierAttributeName(javax.naming.directory.DirContext ctx,
                                                    int verifierType)
                                             throws UtilException
Returns the attribute name to be used during user authentication using the specified password verifier. Currently, only Util.PWDVERIFIERTYPE_COMMON is supported
Parameters:
ctx - a valid DirContext
verifierType - currently only Util.PWDVERIFIERTYPE_COMMON is supported
Throws:
UtilException

getPwdVerifierAttributeName

public java.lang.String getPwdVerifierAttributeName(javax.naming.directory.DirContext ctx,
                                                    java.lang.String appID)
                                             throws UtilException
Returns the attribute name to be used during user authentication using the specified password verifier. The appID identifies the password verifier under this subscriber.
Parameters:
ctx - a valid DirContext
String - the appID
Returns:
a String - the password verifier attribute name
Throws:
UtilException

upgrade

public void upgrade(javax.naming.directory.DirContext ctx,
                    java.lang.String oHome,
                    java.io.PrintStream pStream)
             throws java.lang.Exception
Throws:
java.lang.Exception

getVersion

public java.lang.String getVersion(javax.naming.directory.DirContext ctx)
                            throws UtilException
Returns the verion of this Subscriber
Parameters:
ctx - a valid DirContext
Returns:
the version of this Subscriber in a string
Throws:
UtilException

isUpToDate

public boolean isUpToDate(javax.naming.directory.DirContext ctx,
                          java.io.PrintStream pStream)

getProperties

public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx,
                                           int propType,
                                           java.lang.String[] attrList)
                                    throws UtilException
Retrieves selected attributes associated with this subscriber
Parameters:
ctx - a valid DirContext
propType - Property Type Legal inputs: Subscriber.ENTRY_PROPERTIES : entry properties Subscriber.COMMON_PROPERTIES: common properties Subscriber.USER_NAMING_PROPERTIES: user naming props
attrList - an array of attributes to be retrieved.
Returns:
PropertySetCollection
Throws:
UtilException

getCommonAttrs

protected java.lang.String[] getCommonAttrs(javax.naming.directory.DirContext ctx)
                                     throws UtilException
Throws:
UtilException

getUserSearchBase

public java.lang.String[] getUserSearchBase()
Return the subscriber search base

getGroupSearchBase

public java.lang.String[] getGroupSearchBase()
Return the subscriber group search base

Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.