public interface AdminNamespace extends NamespaceSnapin, NamespaceSnapinRev2, DeferParentNamespace, AuthenticationNamespace
| Modifier and Type | Field and Description |
|---|---|
static int |
EVENT_POST_NOTIFICATION |
static int |
EVENT_PRE_NOTIFICATION |
static int |
GETATTR_CONTEXTSTATICVALUES |
static int |
GETATTR_READFROMWRITABLEREPLICA |
static int |
GETATTR_USEEXCEPTIONREFERENCE |
| Modifier and Type | Method and Description |
|---|---|
void |
addDirectoryEventListener(com.novell.admin.event.DirectoryEventListener listener,
int operation,
java.lang.String objectType)
This method is used to add directory event listeners to the namespace
implementation.
|
boolean |
compareAttribute(ObjectEntry obj,
ObjectAttribute objAttr)
Determines if an object contains the specified attribute with the
specified value.
|
void |
create(NSObject obj)
Creates a new object in the namespace.
|
NSObject |
createNSObject(ObjectEntry objEntry,
java.util.Vector attributes)
Creates a new NSObject.
|
NSObject |
createNSObject(ObjectEntry objEntry,
java.util.Vector attributes,
boolean bValidate)
Creates a new NSObject.
|
NSObject |
createNSObject(ObjectEntry objEntry,
java.util.Vector attributes,
long revision)
Deprecated.
Please use createNSObject(ObjectEntry objEntry, Vector attributes).
|
ObjectEntry |
createObjectEntry(ObjectEntry parent,
java.lang.String child,
java.lang.String className)
Creates an ObjectEntry for a child object that does not exist in the namespace.
|
SPIException |
createSPIException(int errCode) |
void |
delete(ObjectEntry obj)
Deletes an object from the namespace.
|
void |
deleteAttributeValues(ObjectEntry obj,
ObjectAttribute attr)
Deletes an object attribute value.
|
boolean |
doesExist(ObjectEntry parentEntry,
java.lang.String objStr)
Checks to see if an object exists in the namespace.
|
void |
freeDetails(java.lang.Object key)
Removes an NSObject from the cache.
|
ObjectAttribute |
getAttribute(ObjectEntry obj,
java.lang.String attrStr)
Get the attribute value(s) for a namespace objects particular attribute.
|
AttributeDefinition |
getAttributeDefinition(ObjectEntry ctxObj,
java.lang.String attrName)
Returns an attribute definition for a specific attribute in
a specific context.
|
ObjectAttribute[] |
getAttributes(ObjectEntry obj,
java.lang.String[] attrStrings)
Reads an existing object in the namespace and returns an array containing
the object's attributes, including their values.
|
ObjectAttribute[] |
getAttributes(ObjectEntry obj,
java.lang.String[] attrStrings,
int getAttrFlags,
AdminNamespaceExceptionReference aneRef,
ObjectEntry serverOE) |
ObjectAttribute[] |
getAttributes(ObjectEntry obj,
java.lang.String[] attrStrings,
int getAttrFlags,
ObjectEntry serverOE) |
ObjectAttribute[] |
getAttributes(ObjectEntry obj,
java.lang.String[] attrStrings,
ObjectEntry serverOE)
Reads an existing object in the namespace and returns an array containing
the object's attributes, including their values.
|
java.lang.String[] |
getAttributesPresent(ObjectEntry useOE,
java.lang.String[] attributeNames)
This method takes in an ObjectEntry and a array of attributes and returns an array of only those attributes
which are present for the ObjectEntry.This only returns the names of existing attributes not their
values.
|
ObjectEntryEnumeration |
getChildren(ObjectEntry obj)
Returns an ObjectEntry's child objects.
|
ObjectEntryEnumeration |
getChildren(ObjectEntry obj,
ResultModifier modifiers)
Returns an ObjectEntry's child objects according to a filtered request.
|
ClassDefinition |
getClassDefinition(ObjectEntry ctxObj,
java.lang.String className)
Reads the namespace schema and returns a class definition for a specific class.
|
java.lang.Object |
getContext(ObjectEntry oe)
Helper method to get the LDAP connection
|
java.util.Date |
getCreationTime(ObjectEntry objectEntry)
Returns the time of the creation of the object in the Directory.
|
NSObject |
getDelayedAttibuteDetails(ObjectEntry objEntry,
java.lang.String[] delayedAttrStrings) |
NSObject |
getDelayedAttibuteDetails(ObjectEntry objEntry,
java.lang.String[] delayedAttrStrings,
ObjectEntry serverOE) |
java.lang.String |
getDereferencedAliasObjectDN(ObjectEntry oe)
Retrieves the DN of the object the alias is pointing to.
|
NSObject |
getDetails(ObjectEntry obj)
Reads the details for an existing object and returns an NSObject for that object.
|
NSObject |
getDetails(ObjectEntry obj,
java.lang.Object key)
Reads the details for an existing object and returns an NSObject
for that object.
|
java.lang.String |
getFullName(ObjectEntry objEntry)
Returns the full name or path of an object.
|
java.lang.String |
getFullyTypedName(ObjectEntry objectEntry)
Returns the object's fully typed name, not including the root entry.
|
java.util.Date |
getLastModificationTime(ObjectEntry objectEntry)
Returns the time of the last modification of the object in the Directory.
|
int |
getMaxNameLength(ObjectEntry parentOE,
AttributeDefinition attrDef)
Returns the maximum character length for a new object name, depending on the
namespace.
|
java.lang.String[] |
getNameComponents(ObjectEntry oe)
Parses an object's full name into components.
|
Rights |
getObjectEffectiveRights(ObjectEntry objForInquire,
ObjectEntry trustee)
Returns the effective rights of an object to a target object.
|
ObjectEntry |
getObjectEntry(ObjectEntry parentEntry,
java.lang.String objEntryStr)
Returns an ObjectEntry for a valid object name.
|
ObjectEntry |
getObjectEntry(java.lang.String objEntryStr)
Returns an ObjectEntry for a valid object name.
|
ObjectType |
getObjectType(ObjectEntry obj,
java.lang.String className)
Returns an object type for the given object entry.
|
ObjectType[] |
getObjectType(ObjectEntry tree,
java.lang.String[] objectFDN)
Get an ObjectType for each object FDN.
|
ObjectType[] |
getObjectTypes(ObjectEntry obj)
Returns all of the possible object types for this namespace.
|
java.util.Map<java.lang.String,NDSPropertyRights> |
getOrderedPropertyEffectiveRights(ObjectEntry objForInquire,
ObjectEntry trustee,
java.lang.String[] attrNames)
Reads the details for an existing object and returns an NSObject for that object.
|
Rights[] |
getPropertyEffectiveRights(ObjectEntry objForInquire,
ObjectEntry trustee,
java.lang.String[] attrNames)
Returns the effective rights of an object to a target object's attributes.
|
SchemaDefinition |
getSchemaDefinition(ObjectEntry ctxObj)
Returns the schema definition from a given context.
|
boolean |
isSupported(java.lang.String key)
Determines if a particular feature is supported on this platform.
|
boolean |
isSupported(java.lang.String key,
java.lang.Object param)
Determines if a particular feature is supported on this platform.
|
boolean |
isSupported(java.lang.String key,
java.lang.Object param,
ObjectEntry oe)
Determines if a particular feature is supported on this platform.
Features are identified by a key and an optional parameter. This method has an ObjectEntry parameter from which to obtain the schema definition to use. |
ObjectEntry |
move(ObjectEntry objToMove,
ObjectEntry destination)
Moves an object to another location in the namespace.
|
void |
removeDirectoryEventListener(com.novell.admin.event.DirectoryEventListener listener)
This method is used to remove directory event listeners from the namespace
implementation.
|
ObjectEntry |
rename(ObjectEntry fromObjEntry,
java.lang.String newName)
Renames an object.
|
void |
setAttribute(ObjectEntry obj,
ObjectAttribute attribute)
Set the attribute value for a namespace objects particular attribute.
|
void |
setAttributes(ObjectEntry obj,
ObjectAttribute[] attributes)
Writes attributes, including values, to an existing object.
|
void |
update(NSObject obj)
Writes object changes to the namespace.
|
getChildContainers, getInitialObjectEntries, getUniqueID, getUnrootedNamegetSnapinDescription, getSnapinName, initSnapin, shutdownSnapingetInitialObjectEntriesgetParentAndSimpleNameauthenticate, authenticate, authenticateServer, changePassword, changePassword, getAuthenticatedIdentity, getLoginCache, setPassword, setPassword, setPassword, unAuthenticate, unAuthenticatestatic final int GETATTR_CONTEXTSTATICVALUES
static final int GETATTR_READFROMWRITABLEREPLICA
static final int GETATTR_USEEXCEPTIONREFERENCE
static final int EVENT_PRE_NOTIFICATION
static final int EVENT_POST_NOTIFICATION
void create(NSObject obj) throws SPIException, SnapinVetoException
obj - The object to create. This object must be complete
with its attributes and values.SPIException - Thrown when the service provider returns an error.SnapinVetoException - Another snapin has disallowed the create.NSObject createNSObject(ObjectEntry objEntry, java.util.Vector attributes) throws NamespaceException
Use this method to create an NSObject when the object does not exist in the namespace. Then use the create method to write the object to the namespace.
objEntry - The object entry representing the new NSObject.attributes - Vector of ObjectAttributes for the object.NamespaceException - Thrown when the namespace detects an error.NSObject createNSObject(ObjectEntry objEntry, java.util.Vector attributes, long revision) throws NamespaceException
objEntry - The object entry representation.attributes - Vector of ObjectAttributes.revision - Always pass 0 here since there is no previous revision.NamespaceException - Thrown when the namespace detects an error.NSObject createNSObject(ObjectEntry objEntry, java.util.Vector attributes, boolean bValidate) throws NamespaceException
objEntry - The object entry representation.attributes - Vector of ObjectAttributes.bValidate - true to validate the object for mandatory and naiming attributesNamespaceException - Thrown when the namespace detects an error.ObjectEntry createObjectEntry(ObjectEntry parent, java.lang.String child, java.lang.String className) throws NamespaceException, SPIException
parent - The ObjectEntry of the child's parent.child - The name of the child object.className - The class type of the child object.SPIException - Thrown when the service provider returns an error.NamespaceException - Thrown when the namespace detects an error.void delete(ObjectEntry obj) throws SPIException, SnapinVetoException
obj - The object entry representing the object to delete.SPIException - Thrown when the service provider returns an error.SnapinVetoException - Another snapin has disallowed the delete.boolean doesExist(ObjectEntry parentEntry, java.lang.String objStr) throws SPIException
parentEntry - The parent of the object being checked.objStr - A string representing the object being checked.SPIException - Thrown when the service provider returns an error.int getMaxNameLength(ObjectEntry parentOE, AttributeDefinition attrDef) throws SPIException
This method is used most often before creating a new object to determine a valid length of the object's name.
Some namespaces may limit the number of characters in an object name. For example, NDS limits a full distinguished name, including delimiters, to 256 characters.
parentOE - The parent under which the object will be created.attrDef - The attribute definition of the naming attribute for the
object to be created.SPIException - Thrown when the service provider returns an error.java.lang.Object getContext(ObjectEntry oe) throws SPIException
oe - The object entry.SPIException - Refer to SPIException documentation.ObjectType[] getObjectType(ObjectEntry tree, java.lang.String[] objectFDN) throws SPIException
tree - An object entry for the tree containing the object FDN's.objectFDN - An array of object FDN's.SPIException - see documentation.java.lang.String[] getNameComponents(ObjectEntry oe)
The first element is the leaf object. The remaining elements in the array are the hierarchy of the leaf's parent object.
An NDAP namespace returns typeless names, for example: "bob" "Sales" "Novell"
An LDAP namespace returns typed names, for example : "cn=bob" "ou=Sales" "o=Novell"
oe - The object entry.ObjectAttribute getAttribute(ObjectEntry obj, java.lang.String attrStr) throws SPIException
obj - The object that contains the attribute.attrStr - The attribute to get values for.SPIException - Refer to SPIException documentation.void setAttribute(ObjectEntry obj, ObjectAttribute attribute) throws SPIException
obj - The object that contains the attribute.attribute - The attribute to set.SPIException - Refer to SPIException documentation.ObjectType[] getObjectTypes(ObjectEntry obj) throws SPIException
getObjectTypes in interface NamespaceSnapinobj - The context in the namespace from which to get the object types.SPIException - Thrown when the service provider returns an error.ObjectTypeObjectType getObjectType(ObjectEntry obj, java.lang.String className) throws SPIException
obj - The context for which to get the object type.className - The name of the class for which to get the object type.SPIException - Thrown when the service provider returns an error.ObjectAttribute[] getAttributes(ObjectEntry obj, java.lang.String[] attrStrings) throws SPIException, NamespaceException
obj - The object to obtain attributes for.attrStrings - The object attributes to obtain, null for all attributes.SPIException - Thrown when the service provider returns an error.
Refer to SPIException documentation.NamespaceExceptionObjectAttribute[] getAttributes(ObjectEntry obj, java.lang.String[] attrStrings, ObjectEntry serverOE) throws SPIException, NamespaceException
obj - The object to obtain attributes for.attrStrings - The object attributes to obtain, null for all attributes.serverOE - the server to read from. If null then any server may be used.SPIException - Thrown when the service provider returns an error.NamespaceExceptionObjectAttribute[] getAttributes(ObjectEntry obj, java.lang.String[] attrStrings, int getAttrFlags, ObjectEntry serverOE) throws SPIException, NamespaceException
obj - The object to obtain attributes for.attrStrings - The object attributes to obtain, null for all attributes.getAttrFlags - Currently supported flags are:
GETATTR_CONTEXTSTATICVALUES - to only get static values (members) for dynamic groups
GETATTR_READFROMWRITABLEREPLICA - to cause the read to go to a writeable replica
GETATTR_USEEXCEPTIONREFERENCE - Use the lower level protocol's API that returns
partial results (dynamic group timeout) instead of throwing an exception.serverOE - the server to read from. If null then any server may be used.SPIException - may be thrownNamespaceException - NamespaceException.UNSUPPORTED_OPERATION will
be thrown if the namespace does not support the specific mode.ObjectAttribute[] getAttributes(ObjectEntry obj, java.lang.String[] attrStrings, int getAttrFlags, AdminNamespaceExceptionReference aneRef, ObjectEntry serverOE) throws SPIException, NamespaceException
obj - The object to obtain attributes for.attrStrings - The object attributes to obtain, null for all attributes.getAttrFlags - Currently supported flags are:
GETATTR_CONTEXTSTATICVALUES - to only get static values (members) for dynamic groups
GETATTR_READFROMWRITABLEREPLICA - to cause the read to go to a writeable replica
GETATTR_USEEXCEPTIONREFERENCE - Use the lower level protocol's API that returns
partial results (dynamic group timeout) instead of throwing an exception.aneRef - an AdminNamespaceExceptionReference which may contain an AdminNamespaceException.
If this parameter is NOT null, then any Exception that occured will be returned in this
object and will NOT be thrown. It will still return an ObjectAttribute[] which may or may
not have values depending on what was read. If no error occurs then this will contain
null. This is useful with the USEEXCEPTIONREFERENCE flag which allows dynamic group
members to return partitial results. This is for Exceptions. Any Errors (AdminError)
may still be thrown.serverOE - the server to read from. If null then any server may be used.SPIException - may be thrownNamespaceException - NamespaceException.UNSUPPORTED_OPERATION will
be thrown if the namespace does not support the specific mode.void setAttributes(ObjectEntry obj, ObjectAttribute[] attributes) throws SPIException
obj - The object to which the attributes are being written.attributes - The attributes being written.SPIException - Refer to SPIException documentation.ClassDefinition getClassDefinition(ObjectEntry ctxObj, java.lang.String className) throws SPIException, NamespaceException
ctxObj - The context from which the class definition is being retrieved.className - The name of the class whose definition is being retrieved.SPIException - Thrown when the service provider returns an error.NamespaceException - Thrown when the namespace detects an error.AttributeDefinition getAttributeDefinition(ObjectEntry ctxObj, java.lang.String attrName) throws SPIException, NamespaceException
ctxObj - The context from which the attribute definition is being retrieved.attrName - The name of the attribute whose definition is being retrieved.SPIException - Thrown when the service provider returns an error.NamespaceException - Thrown when the namespace detects an error.SchemaDefinition getSchemaDefinition(ObjectEntry ctxObj) throws SPIException
ctxObj - The context from which the schema definition is being retrieved.SPIException - if an error occures in the SPI layer.ObjectEntryEnumeration getChildren(ObjectEntry obj) throws SPIException
obj - The ObjectEntry for which to return the child objects.SPIException - Thrown when the service provider returns an error.ObjectEntryEnumeration getChildren(ObjectEntry obj, ResultModifier modifiers) throws SPIException
The modifiers parameter by default allows the objects to be returned by name and object type.
getChildren in interface NamespaceSnapinobj - The ObjectEntry for which to return the child objects.modifiers - Determines how the child list is built.SPIException - Thrown when the service provider returns an error.ObjectEntryEnumerationRights getObjectEffectiveRights(ObjectEntry objForInquire, ObjectEntry trustee) throws SPIException
objForInquire - The target object.trustee - The trustee for the target object.SPIException - Thrown when the service provider returns an error.Rights[] getPropertyEffectiveRights(ObjectEntry objForInquire, ObjectEntry trustee, java.lang.String[] attrNames) throws SPIException
objForInquire - The target object whose attributes are being checked.trustee - The trustee for the target object.attrNames - The names of the attributes on the target object.SPIException - Thrown when the service provider returns an error.java.util.Map<java.lang.String,NDSPropertyRights> getOrderedPropertyEffectiveRights(ObjectEntry objForInquire, ObjectEntry trustee, java.lang.String[] attrNames) throws SPIException
obj - The ObjectEntry for which to return the NSObject.SPIException - Thrown when the service provider returns an error.NSObject getDetails(ObjectEntry obj) throws SPIException
obj - The ObjectEntry for which to return the NSObject.SPIException - Thrown when the service provider returns an error.NSObject getDelayedAttibuteDetails(ObjectEntry objEntry, java.lang.String[] delayedAttrStrings) throws SPIException
objEntry - The ObjectEntry object to get details for.delayedAttrStrings - array of attribute names to delay the reading of.
This should not be null - if there are no attributes to be delayed
getDetails() should be used.SPIException - Refer to SPIException documentation.NSObject getDelayedAttibuteDetails(ObjectEntry objEntry, java.lang.String[] delayedAttrStrings, ObjectEntry serverOE) throws SPIException
objEntry - The ObjectEntry object to get details for.delayedAttrStrings - array of attribute names to delay the reading of.
This should not be null - if there are no attributes to be delayed
getDetails() should be used.serverOE - the server to read the object information from for the current
attributes being read. However, reading the delayed attributes will not be directed.SPIException - Refer to SPIException documentation.NSObject getDetails(ObjectEntry obj, java.lang.Object key) throws SPIException
This method provides the option of caching the NSObjects using the "key" parameter. This allows the NSObject to be retrieved from the cache rather than searching the namespace.
obj - The ObjectEntry for which to return the NSObject.key - The key into the hash table where the NSObject is stored.SPIException - Thrown when the service provider returns an error.java.lang.String getDereferencedAliasObjectDN(ObjectEntry oe) throws SPIException
oe - The ObjectEntry of the dereferenced alias.SPIException - Thrown by the service provider.void freeDetails(java.lang.Object key)
key - The key into the hash table where the NSObject is stored.java.lang.String getFullName(ObjectEntry objEntry)
getFullName in interface NamespaceSnapinobjEntry - The object whose name is being retrieved.ObjectEntry getObjectEntry(java.lang.String objEntryStr) throws SPIException
The object must exist in the namespace, or this method will fail.
getObjectEntry in interface NamespaceSnapinobjEntryStr - A String representing the full name of an existing object.SPIException - Thrown when the service provider returns an error.ObjectEntry getObjectEntry(ObjectEntry parentEntry, java.lang.String objEntryStr) throws SPIException
The object must exist in the namespace, or this method will fail.
getObjectEntry in interface NamespaceSnapinRev2parentEntry - The parent ObjectEntry of the object being retrieved.objEntryStr - A String representing the name of the child object.SPIException - Refer to SPIException documentation.ObjectEntry move(ObjectEntry objToMove, ObjectEntry destination) throws SPIException, SnapinVetoException
objToMove - The object to move.destination - The destination location.SPIException - Thrown when the service provider returns an error.SnapinVetoException - Another snapin has disallowed the move.ObjectEntry rename(ObjectEntry fromObjEntry, java.lang.String newName) throws SPIException, SnapinVetoException
fromObjEntry - The object to rename.newName - The new name for the object.SPIException - Thrown when the service provider returns an error.SnapinVetoException - Another snapin has disallowed the rename.void update(NSObject obj) throws SPIException, SnapinVetoException
obj - The namespace object being updated.SPIException - Thrown when the service provider returns an error.SnapinVetoException - Another snapin has disallowed the update.java.lang.String getFullyTypedName(ObjectEntry objectEntry)
NDAP example: CN=admin.OU=engineering.O=novell
LDAP example: cn=admin,ou=engineering,o=novell
For LDAP this is identical to AdminNamespace.getFullName(oe) or getUnrootedName(oe)objectEntry - The object that is to be fully typed.java.util.Date getLastModificationTime(ObjectEntry objectEntry) throws SPIException
objectEntry - The object.SPIException - Thrown by the service provider.java.util.Date getCreationTime(ObjectEntry objectEntry) throws SPIException
objectEntry - The object.SPIException - Thrown by the service provider.boolean compareAttribute(ObjectEntry obj, ObjectAttribute objAttr) throws NamespaceException, SPIException
obj - The object to test.objAttr - The attribute and value to test for.SPIException - Thrown when the service provider returns an error.NamespaceException - Thrown when the namespace detects an error.void deleteAttributeValues(ObjectEntry obj, ObjectAttribute attr) throws SPIException
obj - The object that contains the attribute.attr - The attribute.SPIException - Thrown by the service provider.boolean isSupported(java.lang.String key)
throws NamespaceException,
SPIException
key - A String indicating the feature being queried.NamespaceException - Thrown when the namespace detects an error. Not currently used.SPIException - Thrown when the service provider returns an error. Not currently used.boolean isSupported(java.lang.String key,
java.lang.Object param)
throws NamespaceException,
SPIException
key - A String indicating the feature being queried.param - The parameter required by some keys.NamespaceException - Thrown when the namespace detects an error. Not currently used.SPIException - Thrown when the service provider returns an error. Not currently used.boolean isSupported(java.lang.String key,
java.lang.Object param,
ObjectEntry oe)
throws NamespaceException,
SPIException
key - A String indicating the feature being queried.param - The parameter required by some keys.oe - The ObjectEntry from which to obtain the schema definition.NamespaceException - Thrown when the namespace detects an error.SPIException - Thrown when the service provider returns an error. Not currently used.SPIException createSPIException(int errCode)
void addDirectoryEventListener(com.novell.admin.event.DirectoryEventListener listener,
int operation,
java.lang.String objectType)
listener - - The listener to addoperation - - The operation that is being performedobjectType - - The type of the object the operation is being performed on. *
to the namespace, so that DirectoryEventListeners can get authentication specific data.void removeDirectoryEventListener(com.novell.admin.event.DirectoryEventListener listener)
listener - - The listener to removejava.lang.String[] getAttributesPresent(ObjectEntry useOE, java.lang.String[] attributeNames) throws SPIException
useOE, - ObjectEntry of the object.attributeNames, - the array of attributes to be checked for existence.if this is null then
names of all the existing attributes will be returned.SPIException
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.