com.novell.admin.ns
Interface AdminNamespace

All Known Subinterfaces:
NDSNamespace

public interface AdminNamespace

This interface describes a namespace service for object administration.


Method Summary
 void create(NSObject obj)
          Creates a new object in the namespace.
 NSObject createNSObject(com.novell.application.console.snapin.ObjectEntry objEntry, java.util.Vector attributes)
          Creates a new NSObject.
 NSObject createNSObject(com.novell.application.console.snapin.ObjectEntry objEntry, java.util.Vector attributes, long revision)
          Deprecated. Please use createNSObject(ObjectEntry objEntry, Vector attributes).
 com.novell.application.console.snapin.ObjectEntry createObjectEntry(com.novell.application.console.snapin.ObjectEntry parent, java.lang.String child, java.lang.String className)
          Creates an ObjectEntry for a child object that does not exist in the namespace.
 void delete(com.novell.application.console.snapin.ObjectEntry obj)
          Deletes an object from the namespace.
 boolean doesExist(com.novell.application.console.snapin.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.
 AttributeDefinition getAttributeDefinition(com.novell.application.console.snapin.ObjectEntry ctxObj, java.lang.String attrName)
          Returns an attribute definition for a specific attribute in a specific context.
 ObjectAttribute[] getAttributes(com.novell.application.console.snapin.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.
 com.novell.application.console.snapin.ObjectEntryEnumeration getChildren(com.novell.application.console.snapin.ObjectEntry obj)
          Returns an ObjectEntry's child objects.
 com.novell.application.console.snapin.ObjectEntryEnumeration getChildren(com.novell.application.console.snapin.ObjectEntry obj, com.novell.application.console.snapin.ResultModifier modifiers)
          Returns an ObjectEntry's child objects according to a filtered request.
 ClassDefinition getClassDefinition(com.novell.application.console.snapin.ObjectEntry ctxObj, java.lang.String className)
          Reads the namespace schema and returns a class definition for a specific class.
 NSObject getDetails(com.novell.application.console.snapin.ObjectEntry obj)
          Reads the details for an existing object and returns an NSObject for that object.
 NSObject getDetails(com.novell.application.console.snapin.ObjectEntry obj, java.lang.Object key)
          Reads the details for an existing object and returns an NSObject for that object.
 java.lang.String getFullName(com.novell.application.console.snapin.ObjectEntry objEntry)
          Returns the full name or path of an object.
 int getMaxNameLength(com.novell.application.console.snapin.ObjectEntry parentOE, AttributeDefinition attrDef)
          Returns the maximum character length for a new object name, depending on the namespace.
 Rights getObjectEffectiveRights(com.novell.application.console.snapin.ObjectEntry objForInquire, com.novell.application.console.snapin.ObjectEntry trustee)
          Returns the effective rights of an object to a target object.
 com.novell.application.console.snapin.ObjectEntry getObjectEntry(com.novell.application.console.snapin.ObjectEntry parentEntry, java.lang.String objEntryStr)
          Returns an ObjectEntry for a valid object name.
 com.novell.application.console.snapin.ObjectEntry getObjectEntry(java.lang.String objEntryStr)
          Returns an ObjectEntry for a valid object name.
 com.novell.application.console.snapin.ObjectType getObjectType(com.novell.application.console.snapin.ObjectEntry obj, java.lang.String className)
          Returns an object type for the given object entry.
 com.novell.application.console.snapin.ObjectType[] getObjectTypes(com.novell.application.console.snapin.ObjectEntry obj)
          Returns all of the possible object types for this namespace.
 Rights[] getPropertyEffectiveRights(com.novell.application.console.snapin.ObjectEntry objForInquire, com.novell.application.console.snapin.ObjectEntry trustee, java.lang.String[] attrNames)
          Returns the effective rights of an object to a target object's attributes.
 SchemaDefinition getSchemaDefinition(com.novell.application.console.snapin.ObjectEntry ctxObj)
          Returns the schema definition from a given context.
 com.novell.application.console.snapin.ObjectEntry move(com.novell.application.console.snapin.ObjectEntry objToMove, com.novell.application.console.snapin.ObjectEntry destination)
          Moves an object to another location in the namespace.
 com.novell.application.console.snapin.ObjectEntry rename(com.novell.application.console.snapin.ObjectEntry fromObjEntry, java.lang.String newName)
          Renames an object.
 void setAttributes(com.novell.application.console.snapin.ObjectEntry obj, ObjectAttribute[] attributes)
          Writes attributes, including values, to an existing object.
 void update(NSObject obj)
          Writes object changes to the namespace.
 

Method Detail

create

public void create(NSObject obj)
            throws SPIException,
                   com.novell.application.console.snapin.SnapinVetoException
Creates a new object in the namespace.
Parameters:
obj - The object to create. This object must be complete with its attributes and values.
Throws:
SPIException - Thrown when the service provider returns an error.
com.novell.application.console.snapin.SnapinVetoException - Another snapin has disallowed the create.

createNSObject

public NSObject createNSObject(com.novell.application.console.snapin.ObjectEntry objEntry,
                               java.util.Vector attributes)
                        throws NamespaceException
Creates a new NSObject.

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.

Parameters:
objEntry - The object entry representing the new NSObject.
attributes - Vector of ObjectAttributes for the object.
Returns:
The created NSObject.
Throws:
NamespaceException - Thrown when the namespace detects an error.

createNSObject

public NSObject createNSObject(com.novell.application.console.snapin.ObjectEntry objEntry,
                               java.util.Vector attributes,
                               long revision)
                        throws NamespaceException
Deprecated. Please use createNSObject(ObjectEntry objEntry, Vector attributes).
Creates a new NSObject.
Parameters:
objEntry - The object entry representation.
attributes - Vector of ObjectAttributes.
revision - Always pass 0 here since there is no previous revision.
Returns:
The created NSObject.
Throws:
NamespaceException - Thrown when the namespace detects an error.

createObjectEntry

public com.novell.application.console.snapin.ObjectEntry createObjectEntry(com.novell.application.console.snapin.ObjectEntry parent,
                                                                           java.lang.String child,
                                                                           java.lang.String className)
                                                                    throws NamespaceException,
                                                                           SPIException
Creates an ObjectEntry for a child object that does not exist in the namespace.
Parameters:
parent - The ObjectEntry of the child's parent.
child - The name of the child object.
className - The class type of the child object.
Returns:
The object entry for the child object.
Throws:
SPIException - Thrown when the service provider returns an error.
NamespaceException - Thrown when the namespace detects an error.

delete

public void delete(com.novell.application.console.snapin.ObjectEntry obj)
            throws SPIException,
                   com.novell.application.console.snapin.SnapinVetoException
Deletes an object from the namespace.
Parameters:
obj - The object entry representing the object to delete.
Throws:
SPIException - Thrown when the service provider returns an error.
com.novell.application.console.snapin.SnapinVetoException - Another snapin has disallowed the delete.

doesExist

public boolean doesExist(com.novell.application.console.snapin.ObjectEntry parentEntry,
                         java.lang.String objStr)
                  throws SPIException
Checks to see if an object exists in the namespace.
Parameters:
parentEntry - The parent of the object being checked.
objStr - A string representing the object being checked.
Returns:
True if the object exists, or false if the object does not exist.
Throws:
SPIException - Thrown when the service provider returns an error.

getMaxNameLength

public int getMaxNameLength(com.novell.application.console.snapin.ObjectEntry parentOE,
                            AttributeDefinition attrDef)
                     throws SPIException
Returns the maximum character length for a new object name, depending on the namespace.

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.

Parameters:
parentOE - The parent under which the object will be created.
attrDef - The attribute definition of the naming attribute for the object to be created.
Returns:
The max length of the name that can be used for the object.
Throws:
SPIException - Thrown when the service provider returns an error.

getObjectTypes

public com.novell.application.console.snapin.ObjectType[] getObjectTypes(com.novell.application.console.snapin.ObjectEntry obj)
                                                                  throws SPIException
Returns all of the possible object types for this namespace.
Parameters:
obj - The context in the namespace from which to get the object types.
Returns:
The object types for this namespace.
Throws:
SPIException - Thrown when the service provider returns an error.

getObjectType

public com.novell.application.console.snapin.ObjectType getObjectType(com.novell.application.console.snapin.ObjectEntry obj,
                                                                      java.lang.String className)
                                                               throws SPIException
Returns an object type for the given object entry.
Parameters:
obj - The context for which to get the object type.
className - The name of the class for which to get the object type.
Returns:
The object types for this namespace.
Throws:
SPIException - Thrown when the service provider returns an error.

getAttributes

public ObjectAttribute[] getAttributes(com.novell.application.console.snapin.ObjectEntry obj,
                                       java.lang.String[] attrStrings)
                                throws SPIException,
                                       NamespaceException
Reads an existing object in the namespace and returns an array containing the object's attributes, including their values.
Parameters:
obj - The object for which to obtain attributes.
attrStrings - The object attributes to obtain.
Returns:
An array of ObjectAttribute objects.
Throws:
SPIException - Thrown when the service provider returns an error.
NamespaceException - Thrown when the namespace detects an error.

setAttributes

public void setAttributes(com.novell.application.console.snapin.ObjectEntry obj,
                          ObjectAttribute[] attributes)
                   throws SPIException
Writes attributes, including values, to an existing object.
Parameters:
obj - The object to which the attributes are being written.
attribute - The attributes being written.
Throws:
SPIException - Refer to SPIException documentation.

getClassDefinition

public ClassDefinition getClassDefinition(com.novell.application.console.snapin.ObjectEntry ctxObj,
                                          java.lang.String className)
                                   throws SPIException,
                                          NamespaceException
Reads the namespace schema and returns a class definition for a specific class.
Parameters:
ctxObj - The context from which the class definition is being retrieved.
className - The name of the class whose definition is being retrieved.
Returns:
The class definition.
Throws:
SPIException - Thrown when the service provider returns an error.
NamespaceException - Thrown when the namespace detects an error.

getAttributeDefinition

public AttributeDefinition getAttributeDefinition(com.novell.application.console.snapin.ObjectEntry ctxObj,
                                                  java.lang.String attrName)
                                           throws SPIException,
                                                  NamespaceException
Returns an attribute definition for a specific attribute in a specific context.
Parameters:
ctxObj - The context from which the attribute definition is being retrieved.
attrName - The name of the attribute whose definition is being retrieved.
Returns:
The attribute definition.
Throws:
SPIException - Thrown when the service provider returns an error.
NamespaceException - Thrown when the namespace detects an error.

getSchemaDefinition

public SchemaDefinition getSchemaDefinition(com.novell.application.console.snapin.ObjectEntry ctxObj)
                                     throws SPIException
Returns the schema definition from a given context.
Parameters:
ctxObj - The context from which the schema definition is being retrieved.
Returns:
The schema definition.
Throws:
SPIException - if an error occures in the SPI layer.

getChildren

public com.novell.application.console.snapin.ObjectEntryEnumeration getChildren(com.novell.application.console.snapin.ObjectEntry obj)
                                                                         throws SPIException
Returns an ObjectEntry's child objects.
Parameters:
obj - The ObjectEntry for which to return the child objects.
Returns:
An enumeration of the ObjectEntry's child objects.
Throws:
SPIException - Thrown when the service provider returns an error.

getChildren

public com.novell.application.console.snapin.ObjectEntryEnumeration getChildren(com.novell.application.console.snapin.ObjectEntry obj,
                                                                                com.novell.application.console.snapin.ResultModifier modifiers)
                                                                         throws SPIException
Returns an ObjectEntry's child objects according to a filtered request.

The modifiers parameter by default allows the objects to be returned by name and object type.

Parameters:
obj - The ObjectEntry for which to return the child objects.
modifiers - Determines how the child list is built.
Returns:
An enumeration of the ObjectEntry's child objects.
Throws:
SPIException - Thrown when the service provider returns an error.

getObjectEffectiveRights

public Rights getObjectEffectiveRights(com.novell.application.console.snapin.ObjectEntry objForInquire,
                                       com.novell.application.console.snapin.ObjectEntry trustee)
                                throws SPIException
Returns the effective rights of an object to a target object.
Parameters:
objForInquire - The target object.
trustee - The trustee for the target object.
Returns:
The trustee's effective rights.
Throws:
SPIException - Thrown when the service provider returns an error.

getPropertyEffectiveRights

public Rights[] getPropertyEffectiveRights(com.novell.application.console.snapin.ObjectEntry objForInquire,
                                           com.novell.application.console.snapin.ObjectEntry trustee,
                                           java.lang.String[] attrNames)
                                    throws SPIException
Returns the effective rights of an object to a target object's attributes.
Parameters:
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.
Returns:
The object effective rights for each attribute.
Throws:
SPIException - Thrown when the service provider returns an error.

getDetails

public NSObject getDetails(com.novell.application.console.snapin.ObjectEntry obj)
                    throws SPIException
Reads the details for an existing object and returns an NSObject for that object.
Parameters:
obj - The ObjectEntry for which to return the NSObject.
Returns:
The NSObject for the namespace object.
Throws:
SPIException - Thrown when the service provider returns an error.

getDetails

public NSObject getDetails(com.novell.application.console.snapin.ObjectEntry obj,
                           java.lang.Object key)
                    throws SPIException
Reads the details for an existing object and returns an NSObject for that object.

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.

Parameters:
obj - The ObjectEntry for which to return the NSObject.
key - The key into the hash table where the NSObject is stored.
Returns:
The NSObject for the namespace object.
Throws:
SPIException - Thrown when the service provider returns an error.

freeDetails

public void freeDetails(java.lang.Object key)
Removes an NSObject from the cache.
Parameters:
key - The key into the hash table where the NSObject is stored.

getFullName

public java.lang.String getFullName(com.novell.application.console.snapin.ObjectEntry objEntry)
Returns the full name or path of an object.
Parameters:
objEntry - The object whose name is being retrieved.
Returns:
The full name or path of the object.

getObjectEntry

public com.novell.application.console.snapin.ObjectEntry getObjectEntry(java.lang.String objEntryStr)
                                                                 throws SPIException
Returns an ObjectEntry for a valid object name.

The object must exist in the namespace, or this method will fail.

Parameters:
objEntryStr - A String representing the full name of an existing object.
Returns:
The ObjectEntry associated with the object name.
Throws:
SPIException - Thrown when the service provider returns an error.

getObjectEntry

public com.novell.application.console.snapin.ObjectEntry getObjectEntry(com.novell.application.console.snapin.ObjectEntry parentEntry,
                                                                        java.lang.String objEntryStr)
                                                                 throws SPIException
Returns an ObjectEntry for a valid object name.

The object must exist in the namespace, or this method will fail.

Parameters:
parentEntry - The parent ObjectEntry of the object being retrieved.
objEntryStr - A String representing the name of the child object.
Returns:
The ObjectEntry.
Throws:
SPIException - Refer to SPIException documentation.

move

public com.novell.application.console.snapin.ObjectEntry move(com.novell.application.console.snapin.ObjectEntry objToMove,
                                                              com.novell.application.console.snapin.ObjectEntry destination)
                                                       throws SPIException,
                                                              com.novell.application.console.snapin.SnapinVetoException
Moves an object to another location in the namespace.
Parameters:
objToMove - The object to move.
destination - The destination location.
Returns:
The ObjectEntry for the object in the new location.
Throws:
SPIException - Thrown when the service provider returns an error.
com.novell.application.console.snapin.SnapinVetoException - Another snapin has disallowed the move.

rename

public com.novell.application.console.snapin.ObjectEntry rename(com.novell.application.console.snapin.ObjectEntry fromObjEntry,
                                                                java.lang.String newName)
                                                         throws SPIException,
                                                                com.novell.application.console.snapin.SnapinVetoException
Renames an object.
Parameters:
fromObjEntry - The object to rename.
newName - The new name for the object.
Returns:
The ObjectEntry of the renamed object.
Throws:
SPIException - Thrown when the service provider returns an error.
com.novell.application.console.snapin.SnapinVetoException - Another snapin has disallowed the rename.

update

public void update(NSObject obj)
            throws SPIException,
                   com.novell.application.console.snapin.SnapinVetoException
Writes object changes to the namespace.
Parameters:
obj - The namespace object being updated.
Throws:
SPIException - Thrown when the service provider returns an error.
com.novell.application.console.snapin.SnapinVetoException - Another snapin has disallowed the update.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated December 17 2003 1746.