com.wles.blm
Class BLMDirectoryManager

java.lang.Object
  extended bycom.wles.blm.BLMComponentManager
      extended bycom.wles.blm.BLMDirectoryManager

public class BLMDirectoryManager
extends BLMComponentManager

Manages operations on identity directories. Identity directories act as containers for users and groups. Each directory has its own attribute schema which defines which attributes may be assigned to subjects within the directory. Use a BLMContextManager to obtain an instance of a BLMDirectoryManager.

See Also:
BLMContextManager

Method Summary
 void addSchemaAttribute(java.lang.String aDirName, java.lang.String attrName, boolean isList)
          Adds an attribute declaration to the directory's attribute schema.
 void create(java.lang.String aDirName)
          Creates an identity directory
 java.lang.String filter(java.lang.String findPattern)
          Finds directories matching the specified filter pattern.
 boolean find(java.lang.String cID, java.lang.String name)
          Check for the existense of a directory in a collection.
 java.lang.String findDirectIdentitiesMatchingPattern(java.lang.String queryPattern)
          Finds direct identity directories matching the given query pattern.
 int getCount(java.lang.String cID)
          Gets the size of a directory or attribute schema collection.
 java.lang.String[] getReport(java.lang.String cID)
          Returns a report on a directory collection.
 java.lang.String[] getReport(java.lang.String cID, int iStart, int iCount)
          Returns a report on a subset of a directory collection.
 java.lang.String getSchema(java.lang.String aDirName)
          Get a collection of the attributes making up the specified directory's schema.
 AttributeElement getSchemaAttributeTemplate(java.lang.String aDirName, java.lang.String attrName)
          Get the attribute's template value for a directory's schema.
 AttributeElement[] getSchemaReport(java.lang.String cID)
          Returns a report of the attribute schma collection.
 AttributeElement[] getSchemaReport(java.lang.String cID, int iStart, int iCount)
          Returns a report on a subset of an attribute schema collection.
 java.lang.String queryWithoutPrefix(java.lang.String findPattern)
           
 void release(java.lang.String cID)
          Releases a reference to a directory or attribute schema collection.
 void remove(java.lang.String name)
          Removes a directory from the system.
 void removeCascade(java.lang.String name)
          Removes a directory and all associated entities from the system.
 void removeSchemaAttribute(java.lang.String aDirName, java.lang.String attrName)
          Removes an attribute declaration from the directory's attribute schema.
 void removeSchemaAttributeTemplate(java.lang.String aDirName, java.lang.String attrName)
          Removes the template value for a directory's schema.
 void rename(java.lang.String oldName, java.lang.String newName)
          Renames a Directory.
 void setSchemaAttributeTemplate(java.lang.String aDirName, AttributeElement attrElem)
          Set or reset the value of a templated attribute for a directory's attribute schema.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addSchemaAttribute

public void addSchemaAttribute(java.lang.String aDirName,
                               java.lang.String attrName,
                               boolean isList)
                        throws com.wles.blm.BLMException
Adds an attribute declaration to the directory's attribute schema. Once added to the direcotries schema users and groups in the directory may have values for this attribute assigned to their profile. Attributes may be single or multi-valued.

Parameters:
aDirName - name of the Directory
attrName - name of the attribute to be added to the directory's schema
isList - specifies if this is a multi-valued attribute
Returns:
boolean true = success
Throws:
BLMException

create

public void create(java.lang.String aDirName)
            throws com.wles.blm.BLMException
Creates an identity directory

Specified by:
create in class BLMComponentManager
Parameters:
aDirName - name of the Directory to be created
Throws:
BLMException

filter

public java.lang.String filter(java.lang.String findPattern)
                        throws com.wles.blm.BLMException
Finds directories matching the specified filter pattern.

Specified by:
filter in class BLMComponentManager
Parameters:
findPattern - pattern for the filter
Returns:
directory collection ID
Throws:
com.wles.blm.BLMException
See Also:
getReport(String cID), getReport(String cID, int iStart, int iCount), getCount(String CID), release(String cID), find(String cID, String name)

find

public boolean find(java.lang.String cID,
                    java.lang.String name)
             throws com.wles.blm.BLMException
Check for the existense of a directory in a collection.

Specified by:
find in class BLMComponentManager
Parameters:
cID - directory collection ID
name - name of the Directory
Returns:
boolean found = true
Throws:
BLMException

findDirectIdentitiesMatchingPattern

public java.lang.String findDirectIdentitiesMatchingPattern(java.lang.String queryPattern)
                                                     throws com.wles.blm.BLMException
Finds direct identity directories matching the given query pattern. For a pattern that looks like //dir/orgA!OrgB!* - a direct directory will be //dir/OrgA!OrgB!MyDir1 but NEITHER of //dir/OrgA!parentScopeDir NOR //dir/OrgA!OrgB!OrgC!childScopeDir1.

Parameters:
queryPattern - The query pattern to use. Currently only * and ? can be used for wild-cards.
Returns:
A collection Id.
Throws:
BLMException

getCount

public int getCount(java.lang.String cID)
             throws com.wles.blm.BLMException
Gets the size of a directory or attribute schema collection.

Specified by:
getCount in class BLMComponentManager
Parameters:
cID - ID of the collection
Returns:
the count in the collection
Throws:
BLMException

getReport

public java.lang.String[] getReport(java.lang.String cID)
                             throws com.wles.blm.BLMException
Returns a report on a directory collection.

Parameters:
cID - ID of the collection
Returns:
An String array of directory names from the collection.
Throws:
BLMException

getReport

public java.lang.String[] getReport(java.lang.String cID,
                                    int iStart,
                                    int iCount)
                             throws com.wles.blm.BLMException
Returns a report on a subset of a directory collection.

Parameters:
cID - ID of the collection
iStart - the start index of subset to report on
iCount - the number of elements to include in the report
Returns:
An String array of directory names from the collection.
Throws:
BLMException

getSchema

public java.lang.String getSchema(java.lang.String aDirName)
                           throws com.wles.blm.BLMException
Get a collection of the attributes making up the specified directory's schema. Returns an attribute schema collection ID.

Parameters:
aDirName - directory name
Returns:
string unique collection id
Throws:
BLMException
See Also:
getSchemaReport(String cID), getSchemaReport(String cID, int iStart, int iCount), getCount(String cID), release(String cID)

getSchemaAttributeTemplate

public AttributeElement getSchemaAttributeTemplate(java.lang.String aDirName,
                                                   java.lang.String attrName)
                                            throws com.wles.blm.BLMException,
                                                   BadParameterException
Get the attribute's template value for a directory's schema.

Parameters:
aDirName - String name of the Directory
attrName - String name of the attribute to be mapped to the directory
Returns:
AttributeElement containing the default value.
Throws:
BLMException
BadParameterException

getSchemaReport

public AttributeElement[] getSchemaReport(java.lang.String cID)
                                   throws com.wles.blm.BLMException,
                                          BadParameterException
Returns a report of the attribute schma collection.

Parameters:
cID - attribute schema collection ID
Returns:
An array of AttributeElements from the collection.
Throws:
BLMException
BadParameterException

getSchemaReport

public AttributeElement[] getSchemaReport(java.lang.String cID,
                                          int iStart,
                                          int iCount)
                                   throws com.wles.blm.BLMException,
                                          BadParameterException
Returns a report on a subset of an attribute schema collection.

Parameters:
cID - attribute schema collection ID
iStart - Start index in the collection
iCount - Number of objects
Returns:
An array of AttributeElements from the collection.
Throws:
BLMException
BadParameterException

queryWithoutPrefix

public java.lang.String queryWithoutPrefix(java.lang.String findPattern)
                                    throws com.wles.blm.BLMException
Throws:
com.wles.blm.BLMException

release

public void release(java.lang.String cID)
             throws com.wles.blm.BLMException
Releases a reference to a directory or attribute schema collection. Supplying a null collection id will cause all held collections to be released.

Specified by:
release in class BLMComponentManager
Parameters:
cID - ID of the collection
Returns:
void
Throws:
BLMException

remove

public void remove(java.lang.String name)
            throws com.wles.blm.BLMException
Removes a directory from the system.

Specified by:
remove in class BLMComponentManager
Parameters:
name - the directory to remove
Throws:
com.wles.blm.BLMException

removeCascade

public void removeCascade(java.lang.String name)
                   throws com.wles.blm.BLMException
Removes a directory and all associated entities from the system.

Parameters:
name - name of the Directory to be removed
Throws:
BLMException

removeSchemaAttribute

public void removeSchemaAttribute(java.lang.String aDirName,
                                  java.lang.String attrName)
                           throws com.wles.blm.BLMException
Removes an attribute declaration from the directory's attribute schema.

Parameters:
aDirName - name of the Directory
attrName - specifies the name of the attribute to remove from the schema
Throws:
BLMException

removeSchemaAttributeTemplate

public void removeSchemaAttributeTemplate(java.lang.String aDirName,
                                          java.lang.String attrName)
                                   throws com.wles.blm.BLMException
Removes the template value for a directory's schema.

Parameters:
aDirName - String name of the Directory
attrName - String name of the attribute template to remove
Throws:
BLMException

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
            throws com.wles.blm.BLMException
Renames a Directory. All subjects in the directory will automatically be updated, as will all rules referencing these subjects.

Specified by:
rename in class BLMComponentManager
Parameters:
oldName - old name of the directory to be renamed
newName - new name of the directory to be renamed
Throws:
BLMException

setSchemaAttributeTemplate

public void setSchemaAttributeTemplate(java.lang.String aDirName,
                                       AttributeElement attrElem)
                                throws com.wles.blm.BLMException,
                                       BadParameterException
Set or reset the value of a templated attribute for a directory's attribute schema. The supplied attribute value will be used as the default value for new members of the specified directory. This method will have no effect on existing directory members. The specified attribute must have already been added to the directory's schema using the addSchemaAttribute method. Use a blank or null value to clear the template value.

Parameters:
aDirName - name of the Directory
attrElem - an AttributeElement containing the name and new default value
Throws:
BLMException
BadParameterException
See Also:
addSchemaAttribute(java.lang.String, java.lang.String, boolean)


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.