public class ObjectEntry
extends java.lang.Object
implements java.io.Serializable
An ObjectEntry is a lightweight representation of a named object in a namespace. This class is made final so that it cannot be subclassed. Each ObjectEntry contains a reference to an ObjectType.
ObjectType,
Serialized Form| Constructor and Description |
|---|
ObjectEntry(java.lang.String name,
ObjectType type)
Contructs an ObjectEntry of the specified ObjectType.
|
ObjectEntry(java.lang.String name,
ObjectType type,
long objectFlags)
Contructs an ObjectEntry of the specified ObjectType with objectFlags.
|
ObjectEntry(java.lang.String name,
ObjectType type,
ObjectEntry parent)
Contructs an ObjectEntry of the specified ObjectType with
the object parent.
|
ObjectEntry(java.lang.String name,
ObjectType type,
ObjectEntry parent,
long objectFlags)
Contructs an ObjectEntry of the specified ObjectType with objectFlags
and object parent.
|
ObjectEntry(java.lang.String oeName,
ObjectType oeType,
ObjectEntry parent,
long objectFlags,
boolean nameMayBeComplex)
Contructs an ObjectEntry of the specified ObjectType with objectFlags
and object parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubType(ObjectType type)
Adds an ObjectType to the array of subtypes for this entry.
|
boolean |
equals(java.lang.Object object)
Compares this ObjectEntry to the ObjectEntry passed in and returns
true if their full names, ObjectType names, and namespace unique
IDs are the same.
|
boolean |
equalsIgnoreCase(java.lang.Object object)
Compares this ObjectEntry to the ObjectEntry passed in and returns
true if their full names, ObjectType names, and Namespace unique
IDs are the same.
|
AdminNamespace |
getAdminNamespace()
Returns the namespace used in this ObjectEntry.
|
java.lang.String |
getAsIsName()
Returns the object's name as it was passed in at construct time.
|
ObjectEntry |
getAsIsParent()
Returns the specified ObjectEntry's parent object as it was passed in at construct time.
|
java.lang.String |
getFullName()
Returns the object's full name as a String.
|
java.lang.String |
getName()
Returns the object's name as a String.
|
NamespaceSnapin |
getNamespace()
Returns the namespace used in this ObjectEntry as a NamespaceSnapin object.
|
java.lang.String |
getNamespaceUniqueID()
Returns a short string identifying the namespace protocol.
|
long |
getObjectFlags()
Returns the flags associated with an object.
|
ObjectType |
getObjectType()
Returns the object's class or type as an ObjectType.
|
ObjectType[] |
getObjectTypes()
Deprecated.
As of ConsoleOne version 1.2, use
getSubTypes() instead. |
ObjectEntry |
getParent()
Returns the specified ObjectEntry's parent object.
|
ObjectEntry |
getRoot()
Returns the root object in the lineage of this ObjectEntry.
|
int |
getSubordinateCount()
Returns the subordinate count of this ObjectEntry.
|
ObjectType[] |
getSubTypes()
Returns the subtypes of this ObjectEntry.
|
java.lang.String |
getTypeName()
Returns the object's type as a String.
|
int |
hashCode()
Returns the hash code for this ObjectEntry for use in hash tables.
|
boolean |
isComplexName()
Returns true if the object's name is complex like "name.c.b"
else returns false because it is a simple name.
|
boolean |
removeSubType(ObjectType type)
Removes an ObjectType from the array of subtypes for this entry.
|
void |
setObjectFlags(long objectFlags)
Sets the flags to be associated with an object.
|
void |
setSubordinateCount(int count)
Sets the subordinate count for this ObjectEntry.
|
void |
setSubTypes(ObjectType[] types)
Sets all of the subtypes for this ObjectEntry.
|
java.lang.String |
toString()
Returns the object's name as a String.
|
public ObjectEntry(java.lang.String name,
ObjectType type)
name - The name (RDN) of the object.type - The ObjectType of the object.public ObjectEntry(java.lang.String name,
ObjectType type,
long objectFlags)
name - The name (RDN) of the object.type - The ObjectType of the object.objectFlags - The flags associated with the object.public ObjectEntry(java.lang.String name,
ObjectType type,
ObjectEntry parent)
name - The name (RDN) of the object.type - The ObjectType of the object.parent - The parent of the object.public ObjectEntry(java.lang.String name,
ObjectType type,
ObjectEntry parent,
long objectFlags)
name - The name (RDN) of the object.type - The ObjectType of the object.parent - The parent of the object.objectFlags - The flags associated with the object.public ObjectEntry(java.lang.String oeName,
ObjectType oeType,
ObjectEntry parent,
long objectFlags,
boolean nameMayBeComplex)
The passed-in name may be a complex name that spans across several containers ("name.c.b.a"), but it should never contain the tree name as part of the complex string. A tree OE should always be built separately as a single entity so that when you call getParent() and the result is null you are guaranteed to have a tree name and only a tree name. The getRoot() call depends on this. This is the requirement for all root level OE's that are created.
While this handles complex names with dot's it does not handle any strings that have the tree name (dot or slash form) as part of the name. The user must create the tree OE with appropriate constructor calls.
oeName - The name (RDN or FDN) of the object without the tree name.oeType - The ObjectType of the object.parent - The parent of the object.objectFlags - The flags associated with the object.nameMayBeComplex - The name may or may not have multiple RDNs in it.
It is parsed to determine if there are any delimiters.public void setSubTypes(ObjectType[] types)
types - The array of ObjectTypes that represent this entry's subtypes.public ObjectType[] getSubTypes()
public void addSubType(ObjectType type)
type - The ObjectType to add as a subtype for this entry.public boolean removeSubType(ObjectType type)
type - The ObjectType to remove as a subtype for this entry.public java.lang.String getName()
public java.lang.String getAsIsName()
public boolean isComplexName()
public java.lang.String getFullName()
public ObjectType getObjectType()
public long getObjectFlags()
setObjectFlags(long)public void setObjectFlags(long objectFlags)
objectFlags - The flags to be associated with the object.getObjectFlags()public ObjectEntry getParent()
When the getParent() method is called it assumes the first ObjectType is being used. If there is no parent to return, ObjectEntry returns null.
public ObjectEntry getAsIsParent()
public ObjectEntry getRoot()
The root is defined as the object with a null parent or the object that returns a parent object from another namespace.
public boolean equals(java.lang.Object object)
This is preferred over == for comparing ObjectEntries because there may be two different instances of the same logical ObjectEntry.
equals in class java.lang.Objectobject - The ObjectEntry passed in to be used in the comparison.public boolean equalsIgnoreCase(java.lang.Object object)
object - ObjectEntry passed in to be used in the comparison.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getTypeName()
public java.lang.String getNamespaceUniqueID()
See the method AdminNamespace.isSupported() for ways to detect if specific features are present, as well as determining if the target server is eDirectory vs NVDS.
public NamespaceSnapin getNamespace()
public AdminNamespace getAdminNamespace()
public int getSubordinateCount()
public void setSubordinateCount(int count)
public ObjectType[] getObjectTypes()
getSubTypes() instead.
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}.