|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.content.ContentEntity
com.bea.content.Node
A Node represents an element in a hieararchy.
A Node can either be Hierarchy or Content Node. A Hierarchy Node can contain both other Hierarchy and Content Nodes while a Content Node can only contain other Content Nodes.
Nodes have a few system properties that are set by the repository. Nodes also may contain Properties based on the ObjectClass (type) defined for it. Both Content and Hierarchy Nodes may contain an ObjectClass and Properties.
Nodes are uniquely identified in a repository by the uid on their ID. The uid could be a uuid, database id, the path, etc. All nodes also have a path that uniquely identifies it within the repository. The path should be in unix-like format such as /a/b/c where / is the root and a is the root's child. The path must always begin with / and never end with it. So neither of the following are valid: a/b/c/d or /a/b/d/d/.
Node names must not contain either forward, or backslashes.
A Node's Properties may be lazy loaded, depending on the implementation of the underyling operation that retrieved the Node.
Field Summary | |
static int |
CONTENT
This defines a Node that represents content, such as a file with metadata. |
static int |
HIERARCHY
This defines a Node as a container, like a Folder. |
static int |
NODE
This could either be a HIERARCHY or CONTENT Node.
|
Fields inherited from class com.bea.content.ContentEntity |
id |
Constructor Summary | |
Node(Calendar createdDate,
String createdBy,
boolean hasChildren,
ID id,
String modifiedBy,
Calendar modifiedDate,
ObjectClass objectClass,
ID parentId,
String path,
Property[] properties,
int type)
Constructor with all attributes. |
Method Summary | |
Node[] |
getChildren()
Returns the children of this node. |
Node[] |
getContentChildren()
Returns the Content children of this node. |
String |
getCreatedBy()
The user who created this node. |
Calendar |
getCreatedDate()
The date this node was created on. |
Node[] |
getHierarchyChildren()
Returns the Hierarchy children of this node. |
int |
getLifeCycleStatus()
Returns the status for this node. |
String |
getModifiedBy()
The user who last modified this Node. |
Calendar |
getModifiedDate()
The Date when this Node was last modified. |
String |
getName()
The Node name. |
ObjectClass |
getObjectClass()
The ObjectClass to which this Node is associated. |
ID |
getParentId()
Gets the id for the parent of this node. |
String |
getPath()
The path where this Node resides. |
Property |
getPrimaryProperty()
Gets the primary property for this Node, or null if there isn't one or when the node doesn't have an object class (such as HIERARCHY nodes). |
Property[] |
getProperties()
Gets the Properties for this node. |
Property |
getProperty(String name)
Returns the property referenced by name or null if the property does not exist. |
InputStream |
getPropertyBytes(ID propertyId)
Returns the bytes for the given property. |
int |
getType()
The type of the Node. |
boolean |
hasChildren()
True if this node has children. |
void |
hasChildren(boolean hasChildren)
Set true if the node has children, false if not. |
boolean |
isPropertiesNull()
Returns true if the properties have not been set in memory. |
boolean |
isRetired()
|
void |
isRetired(boolean isRetired)
|
void |
setCreatedBy(String createdBy)
Sets the user who created this node. |
void |
setCreatedDate(Calendar createdDate)
Sets the date this node was created on. |
void |
setLifeCycleStataus(int lifeCycleStatus)
Sets the lifecycle status. |
void |
setModifiedBy(String modifiedBy)
Sets the user who last modified this Node. |
void |
setModifiedDate(Calendar modifiedDate)
Sets the Date when this Node was last modified. |
void |
setNodeOps(NodeOps nodeOps)
Sets the NodeOps to perform operations on the repository. |
void |
setObjectClass(ObjectClass objectClass)
Sets the ObjectClass to which this Node is associated. |
void |
setParentId(ID parentId)
Sets this Node's parent id. |
void |
setPath(String path)
Sets the path of this Node. |
void |
setProperties(Property[] properties)
Sets the Properties for this node. |
void |
setType(int type)
Gets the Node type. |
String |
toString()
Returns the attributes of this Node in a String. |
Methods inherited from class com.bea.content.ContentEntity |
getId, setId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CONTENT
public static final int HIERARCHY
public static final int NODE
HIERARCHY
or CONTENT
Node.
This is not a valid definition for a Node (getType()
should never return this value), but may be used as a description.
Constructor Detail |
public Node(Calendar createdDate, String createdBy, boolean hasChildren, ID id, String modifiedBy, Calendar modifiedDate, ObjectClass objectClass, ID parentId, String path, Property[] properties, int type)
Method Detail |
public Node[] getChildren() throws AuthorizationException
AuthorizationException
- - if the user attempting the
operation is not authrorized.public Node[] getContentChildren() throws AuthorizationException
AuthorizationException
- - if the user attempting the
operation is not authrorized.public String getCreatedBy()
public Calendar getCreatedDate()
public Node[] getHierarchyChildren() throws AuthorizationException
AuthorizationException
- - if the user attempting the
operation is not authrorized.public int getLifeCycleStatus()
public String getModifiedBy()
public Calendar getModifiedDate()
public String getName()
public ObjectClass getObjectClass()
public ID getParentId()
public String getPath()
public Property getPrimaryProperty() throws RepositoryException
RepositoryException
public Property[] getProperties() throws AuthorizationException
AuthorizationException
- - if the user attempting the
operation is not authrorized.public Property getProperty(String name) throws AuthorizationException
isPropertiesNull()
.
AuthorizationException
- - if the user attempting the
operation is not authrorized.public InputStream getPropertyBytes(ID propertyId) throws AuthorizationException, NoSuchPropertyException
WARNING: If using this interface to retrieve binary content from
a BEA Repository, please read the javadoc for
RepositoryConfig
.
AuthorizationException
- - if the user attempting the
operation is not authrorized.
NoSuchPropertyException
- - if the propertyId is not a valid one.public int getType()
HIERARCHY
or CONTENT
.
public boolean hasChildren()
public void hasChildren(boolean hasChildren)
public boolean isPropertiesNull()
public boolean isRetired()
public void isRetired(boolean isRetired)
public void setCreatedBy(String createdBy)
public void setCreatedDate(Calendar createdDate)
public void setLifeCycleStataus(int lifeCycleStatus)
public void setModifiedBy(String modifiedBy)
public void setModifiedDate(Calendar modifiedDate)
public void setNodeOps(NodeOps nodeOps)
public void setObjectClass(ObjectClass objectClass)
public void setParentId(ID parentId)
public void setPath(String path)
public void setProperties(Property[] properties)
public void setType(int type)
HIERARCHY
or CONTENT
.
public String toString()
toString
in class ContentEntity
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |