|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.emframe.dev.DirUtils
Utility methods for accessing the directory.
| Constructor Summary | |
DirUtils()
|
|
| Method Summary | |
void |
addASXMLFilterInfoToRM(FilterResultModifier rm,
java.lang.String filterXML,
TaskContext context)
Parses filterXML (produced by AdvancedSelection widget) and adds filter to an FilterResultModifier. |
void |
addASXMLFilterInfoToRM(NDSFilterResultModifier rm,
java.lang.String filterXML,
TaskContext context)
Parses filterXML (produced by AdvancedSelection widget) and adds filter to an NDSFilterResultModifier. |
static java.lang.String[] |
attributeReader(ObjectEntry oe,
java.lang.String[] attr)
Reads attribute values of an eDirectory object. |
static void |
attributeWriter(ObjectEntry oe,
java.lang.String[] attr,
java.lang.String[] attrVal)
Sets attributes of an eDirectory object. |
static NSObject |
createObject(ObjectEntry parentEntry,
java.lang.String objectName,
java.lang.String className,
java.lang.String namingAttr)
Simple API for creating eDirectory objects. |
void |
createSortedTypeArrays(java.util.ArrayList types,
java.util.ArrayList localizedTypes,
TaskContext context)
Takes a list of ds types (classes) and returns a sorted list of localized types. |
static NSObject |
createUser(java.lang.String className,
ObjectEntry parentEntry,
java.lang.String userStr,
java.lang.String surname)
Simple API for creating user objects. |
java.util.ArrayList |
getAllSubClasses(java.lang.String[] superTypes)
Inspects the eDirectory schema and finds all sub classes (not just direct children). |
java.lang.String |
getAttributeDisplayName(java.lang.String attributeName,
PluginContext context)
Used for getting localized display name for an attributeName. |
java.lang.String[] |
getContainerTypes()
Returns a list of all container object classes in the tree. |
static java.lang.String |
getLeftMostName(java.lang.String objectName)
Gets the left most part of a NDAP DN name. |
MappingObject |
getMappingObject()
Table that maps ldap and ndap attribute names. |
java.lang.String |
getObjectEntryImageName(ObjectEntry oe)
Returns a relative path to an icon matching the objectEntry. |
java.lang.String |
getObjectTypeDisplayName(java.lang.String objectTypeName,
PluginContext context)
Used for getting localized display name for an objectTypeName. |
java.lang.String |
getObjectTypeImageName(java.lang.String typeName)
Returns a relative path to an icon matching the objectEntry. |
java.lang.String |
getRealName(java.lang.String strSafeName)
Returns the real object name from a typename which contains no alpha-numeric characters. |
static java.lang.String[] |
getRights(ObjectEntry targetOE,
ObjectEntry trusteeOE,
java.lang.String[] attrib)
Reads eDirectory rights. |
java.lang.String |
getSafeName(java.lang.String typeName)
Returns typename which contains no alpha-numeric characters. |
java.lang.String[] |
getSelectableContainerTypes()
Returns a list of the selectable container types. |
java.lang.String[] |
getSelectableContainerTypes(java.util.HashSet excludeTypes)
Returns a list of the selectable container types except for the excluded list passed in. |
java.lang.String[] |
getSelectableLeafTypes()
Returns a list of selectable leaf object types. |
java.lang.String[] |
getSelectableLeafTypes(java.util.HashSet excludeTypes)
Returns a list of selectable leaf object types except for the excluded list passed in. |
java.lang.String[] |
getSelectableTypes()
Returns a list of all selectable object types. |
java.lang.String[] |
getSelectableTypes(java.util.HashSet excludeTypes)
Returns a list of all selectable object types except for the excluded list passed in. |
java.lang.String[] |
getSortedAttributeDisplayNames(TaskContext context)
Returns a sorted list of attribute display names. |
java.lang.String[] |
getSortedAttrs()
Returns a sorted list of attributes. |
java.lang.String[] |
getSortedClasses()
Returns a sorted list of class names. |
java.lang.String[] |
getSubClasses(java.lang.String strName)
Inspects schema and finds direct and indirect children sub classes (supports inheritance). |
java.lang.String[] |
getSuperClasses(java.lang.String strName)
Inspects the eDirectory schema and finds all super classes (not just direct parents). |
boolean |
getUniversalPwdState(java.lang.String containerStr)
Returns whether Universal Passwords are set for a specific container. |
boolean |
isAuxClass(java.lang.String typeName)
Determines whether a specified type/class is an auxiliary class. |
boolean |
isContainer(java.lang.String objectType)
Returns whether an object type is a container. |
static boolean |
isObjectInThisTree(ObjectEntry oeTree,
java.lang.String objectFullName)
Tests if the DN has the tree name represnted by the ObjectEntry at the end of the DN. |
boolean |
isOfAuxClass(ObjectEntry oe,
java.lang.String auxClass)
Determines whether a specified ObjectEntry has been extended with a specific auxClass. |
static boolean |
isOfType(ObjectType type,
java.lang.String strKnownType,
boolean bDerivedOK)
Determines whether a given object type is of a known type or, optionally, whether it is derived from a known type. |
static boolean |
MoveObject(ObjectEntry objectEntry,
ObjectEntry destObjectEntry,
boolean createAliasFlag)
Simple API for moving eDirectory object to a new container. |
static java.lang.String |
readAttributeXML(TaskContext context,
java.lang.Object theObj,
java.lang.String attrName)
API for reading attributes and receiving values as XML; Used by EDAS. |
static java.lang.String |
removeRightMostName(java.lang.String objectName)
Removed the right most part of a NDAP DN name. |
static java.lang.String |
removeTreeFromFullName(ObjectEntry oeTree,
java.lang.String objectFullName)
Removes the tree name from a full DN (admin.novell.baggins_tree => admin.novell). |
void |
setSimplePassword(java.lang.String treeName,
java.lang.String userName,
java.lang.String newPassword,
boolean doDelay)
Sets the eDirectory simple password. |
static void |
writeAttributeXML(TaskContext context,
java.lang.Object theObj,
java.lang.String attrName,
java.lang.String value)
API for writing values to NSObject or MOOManager thought XML; Used by EDAS. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DirUtils()
| Method Detail |
public void addASXMLFilterInfoToRM(FilterResultModifier rm,
java.lang.String filterXML,
TaskContext context)
rm - FilterResultModifier filter to be used with get children callfilterXML - XML String produced by AdvancedSelection widgetcontext - TaskContext of the plug-in
public void addASXMLFilterInfoToRM(NDSFilterResultModifier rm,
java.lang.String filterXML,
TaskContext context)
rm - NDSFilterResultModifier filter to be used with get children callfilterXML - XML String produced by AdvancedSelection widgetcontext - TaskContext of the plug-in
public static java.lang.String[] attributeReader(ObjectEntry oe,
java.lang.String[] attr)
throws SPIException
This is a simple helper routine for easier reading of eDirectory attributes. This API does not support setting multi values for attributes. This API supports a limited set of attribute syntaxes (any syntax whose strategy can convert a attribute value to a String).
Supports Strings syntaxes like: Case Exact String, Case Ignore String, Email Address, etc Supports Boolean: values should be "true" or "false" Doesn't support many other syntaxes: Network Address, OctectList, Hold, etc For specific syntaxes view the javadoc for the appropriate Strategy (com.novell.admin.ns.nds package).
NOTE: this API is not recommend for use. While it is more simplistic, its current implemention is expensive (especially if only one or two attributes are being read).
oe - ObjectEntry for the object where the attribute residesattr - String array containing the attributes to be read
SPIException - thrown by the Java layerattributeWriter(com.novell.application.console.snapin.ObjectEntry, java.lang.String[], java.lang.String[])
public static void attributeWriter(ObjectEntry oe,
java.lang.String[] attr,
java.lang.String[] attrVal)
throws NamespaceException,
SPIException,
SnapinVetoException,
ComponentCreationException
This is a simple helper routine for easier setting of eDirectory attributes. This API does not support setting multi values for attributes. This API supports a limited set of attribute syntaxes (any syntax whose strategy can convert a String to an appriate value).
Supports Strings syntaxes like: Case Exact String, Case Ignore String, Email Address, etc Supports Boolean: values should be "true" or "false" Doesn't support many other syntaxes: Network Address, OctectList, Hold, etc For specific syntaxes view the javadoc for the appropriate Strategy (com.novell.admin.ns.nds package).
NOTE: this API is not recommend for use. While it is more simplistic, its current implemention is expensive (especially if only one or two attributes are being read).
oe - ObjectEntry representing the object to write toattr - String array that contains the names attributes to be writtenattrVal - String array that contains the values of attribute to write
NamespaceException - thrown from the eMFrame Namespace
SPIException - thrown by the Java layer
SnapinVetoException - thrown by the eMFrame shell
ComponentCreationExceptionattributeReader(com.novell.application.console.snapin.ObjectEntry, java.lang.String[])
public static NSObject createObject(ObjectEntry parentEntry,
java.lang.String objectName,
java.lang.String className,
java.lang.String namingAttr)
throws NamespaceException,
SPIException,
SnapinVetoException
parentEntry - ObjectEntry containing the parent entry of the objectobjectName - String containing the name of the object to be createdclassName - String containing the class name of the object to be creatednamingAttr - String containing the naming attribute for the object to be created (mandatory attribute)
NamespaceException - thrown from the eMFrame Namespace
SPIException - thrown by the Java layer
SnapinVetoException - thrown by the eMFrame shell
public void createSortedTypeArrays(java.util.ArrayList types,
java.util.ArrayList localizedTypes,
TaskContext context)
types - ArrayList containing a list of ds types. Will be reordered to match the order in the localized
types array.localizedTypes - ArrayList that is empty where sorted localizated ds types (classes) will be placed.context - TaskContext of the plug-in
public static NSObject createUser(java.lang.String className,
ObjectEntry parentEntry,
java.lang.String userStr,
java.lang.String surname)
throws NamespaceException,
SPIException,
SnapinVetoException
className - String containing class name of the user object to createparentEntry - ObjectEntry of the parent entry of the objectuserStr - String containing the user's name (mandatory attribute)surname - String containing the user's surname/last name (mandatory attribute)
NamespaceException - thrown from the eMFrame Namespace
SPIException - thrown by the Java layer
SnapinVetoException - thrown by the eMFrame shellpublic java.util.ArrayList getAllSubClasses(java.lang.String[] superTypes)
superTypes - String array containing names of types
public java.lang.String getAttributeDisplayName(java.lang.String attributeName,
PluginContext context)
attributeName - String containing the attribute type namecontext - PluginContext of the plug-in
public java.lang.String[] getContainerTypes()
public static java.lang.String getLeftMostName(java.lang.String objectName)
objectName - String containing the NDAP DN name
public MappingObject getMappingObject()
public java.lang.String getObjectEntryImageName(ObjectEntry oe)
oe - ObjectEntry for which an icon is requested
public java.lang.String getObjectTypeDisplayName(java.lang.String objectTypeName,
PluginContext context)
objectTypeName - String containing the object type namecontext - PluginContext of the plug-in
public java.lang.String getObjectTypeImageName(java.lang.String typeName)
typeName - object class for which an icon is requested
public java.lang.String getRealName(java.lang.String strSafeName)
DirUtils.getSafeName.
strSafeName - String containing safe name for class or attribute
getSafeName(java.lang.String)
public static final java.lang.String[] getRights(ObjectEntry targetOE,
ObjectEntry trusteeOE,
java.lang.String[] attrib)
throws PageException
The possible return values are:
targetOE - ObjectEntry of the targettrusteeOE - ObjectEntry of the trusteeattrib - String array containing attribute names
PageExceptionpublic java.lang.String getSafeName(java.lang.String typeName)
typeName - String containing the typen name
public java.lang.String[] getSelectableContainerTypes()
public java.lang.String[] getSelectableContainerTypes(java.util.HashSet excludeTypes)
excludeTypes - HashSet of object class names to not include in the list of selectable container types
public java.lang.String[] getSelectableLeafTypes()
public java.lang.String[] getSelectableLeafTypes(java.util.HashSet excludeTypes)
excludeTypes - HashSet of object class names to not include in the list of selectable leaf types
public java.lang.String[] getSelectableTypes()
public java.lang.String[] getSelectableTypes(java.util.HashSet excludeTypes)
excludeTypes - HashSet of object class names to not include in the list of selectable types
public java.lang.String[] getSortedAttributeDisplayNames(TaskContext context)
context - TaskContext of the plug-in
getSortedAttrs()public java.lang.String[] getSortedAttrs()
getSortedAttributeDisplayNames(com.novell.emframe.dev.TaskContext)public java.lang.String[] getSortedClasses()
public java.lang.String[] getSubClasses(java.lang.String strName)
strName - String containing name of object class
public java.lang.String[] getSuperClasses(java.lang.String strName)
throws NamespaceException
strName - String containing the name of objectClass
NamespaceException
public boolean getUniversalPwdState(java.lang.String containerStr)
throws PluginException
containerStr - String containing a "." formated string representing the container where to
begin checking if universal password is enabled
PluginException - if an error occurs trying to determine if Univeral Password is enabledpublic boolean isAuxClass(java.lang.String typeName)
typeName - String containing the object type
true if the object type is an auxiliary class, false if otherwisepublic boolean isContainer(java.lang.String objectType)
objectType - String containing the object type
public static boolean isObjectInThisTree(ObjectEntry oeTree,
java.lang.String objectFullName)
oeTree - ObjectEntry containing the treeobjectFullName - String containing full DN including the tree name (ex. admin.novell.baggins_tree)
public boolean isOfAuxClass(ObjectEntry oe,
java.lang.String auxClass)
oe - ObjectEntry in questionauxClass - String containing the auxClass to be checked for.
true if the object type has been extended with the auxiliary class,
false if otherwise
public static boolean isOfType(ObjectType type,
java.lang.String strKnownType,
boolean bDerivedOK)
type - ObjectType to be checkedstrKnownType - String containing the name of the type to look forbDerivedOK - boolean set to true if the object type can be derived from the known type,
otherwise set to false
true if the object type is of the known type, false if otherwise
public static boolean MoveObject(ObjectEntry objectEntry,
ObjectEntry destObjectEntry,
boolean createAliasFlag)
throws NamespaceException,
SPIException,
SnapinVetoException
objectEntry - ObjectEntry of the source objectdestObjectEntry - ObjectEntry of the destination objectcreateAliasFlag - boolean indicates whether an alias should be created for the moved object
NamespaceException - thrown from the eMFrame Namespace
SPIException - thrown by the Java layer
SnapinVetoException - thrown by the eMFrame shell
public static final java.lang.String readAttributeXML(TaskContext context,
java.lang.Object theObj,
java.lang.String attrName)
throws eDirAccessServiceException
context - TaskContext of the plug-intheObj - Object must be NSObject of MOOManager to read data fromattrName - String containing the attribute to read
eDirAccessServiceExceptionwriteAttributeXML(com.novell.emframe.dev.TaskContext, java.lang.Object, java.lang.String, java.lang.String)public static java.lang.String removeRightMostName(java.lang.String objectName)
objectName - String containing the NDAP DN name
public static java.lang.String removeTreeFromFullName(ObjectEntry oeTree,
java.lang.String objectFullName)
oeTree - ObjectEntry containing the treeobjectFullName - String containing full DN including the tree name (ex. admin.novell.baggins_tree)
public void setSimplePassword(java.lang.String treeName,
java.lang.String userName,
java.lang.String newPassword,
boolean doDelay)
throws PluginException
treeName - String containing the treename. This parameter is not used by the called routines but may not
be null.userName - String representing the user name in "." format without the tree name.
For example: "admin.provo.novell".newPassword - String containing the new password (extented characters should be fine)doDelay - boolean - if doing a create the object may not have been replicated to the partition
the LDAP extension is talking to. If true, this will wait and retry if a -601 occurs.
PluginException - if there is a problem setting the passworld.
public static void writeAttributeXML(TaskContext context,
java.lang.Object theObj,
java.lang.String attrName,
java.lang.String value)
throws eDirAccessServiceException
context - TaskContext of the plug-intheObj - Object must be NSObject or MOOManagerattrName - String containing the name of attribute to setvalue - String containing the attribute value to set
eDirAccessServiceExceptionreadAttributeXML(com.novell.emframe.dev.TaskContext, java.lang.Object, java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||