|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.content.adapter.BaseOps com.bea.p13n.content.adapter.NodeOpsImpl
A WLP Content Repository-to-ContentManager node ops.
The uid of IDs for Nodes from this will be the Content identifier.
The uid of IDs for Propertys from Nodes from this will be contentidentifier/propname
.Additionlly, Documents will have a magic Property "content" which will refer to the bytes of the Document, plus getMimeType(), getProperty("encoding"), getSize(), and getName().
Field Summary | |
protected ObjectClassOpsImpl |
objectClassOps
|
Fields inherited from class com.bea.p13n.content.adapter.BaseOps |
CONTENT_MANAGER_HOME, credentials, PATH_IS_ID, PATH_STARTS_WITH_SLASH, pathIsId, pathStartsWithSlash, properties |
Constructor Summary | |
NodeOpsImpl(Credentials credentials,
Properties properties,
ObjectClassOpsImpl objectClassOps)
|
Method Summary | |
Node |
addNodeContent(ID nodeId,
ID objectClassId,
Property[] properties)
Updates the node with the given id to contain the given objectClass and properties. |
Node |
convert(String reponame,
Content content)
Convert a Content object to a Node. |
Node |
copyNode(ID sourceId,
ID destinationId)
This method copies a Node to a new location (Folder) in the hierarchy along with all its descendants. |
Property |
createContentProperty(String reponame,
String contentId,
Document doc)
Create a Property for the magic "content" property for a Document. |
Node |
createNode(ID parentId,
String newNodeName,
int type)
This method creates a new Node underneath the parent. |
Node |
createNode(ID parentId,
String newNodeName,
int type,
ID objectClassId,
Property[] properties)
This method creates a new Node underneath the parent. |
Property |
createProperty(String reponame,
String contentId,
String name,
Object val)
Create a Property object. |
Value |
createValue(Object val)
Create a Value object for the given object value. |
void |
deleteNode(ID nodeId)
This method performs a full cascade delete on a Node. |
Node |
getNode(ID nodeId)
This method gets a particular Node based on its id. |
Node |
getNode(String path)
This method gets a particular Node based on its id. |
Node[] |
getNodeChildren(ID parentId,
int type)
This method returns an array of Nodes based on the parent Folder. |
Node[] |
getNodes(ID[] nodeIds)
This method gets the Node for each node ID passed in. |
String |
getPath(Content content)
Get the new CM API path for a Content object. |
Property[] |
getProperties(ID nodeId)
Gets all Properties for a Node. |
Property[] |
getProperties(String reponame,
Content content)
Get Property objects representing (potentially) all of the metadata attributes of the Node. |
InputStream |
getPropertyBytes(ID propertyId)
Gets the Binary data for the given Property Id. |
Node |
moveNode(ID sourceId,
ID destinationId)
This method moves a Node to a new location (Folder) in the hierarchy along with all its descendants. |
Node |
removeNodeContent(ID nodeId)
Removes the ObjectClass from the given Node. |
Node |
renameNode(ID nodeId,
String newName)
This method renames a node and implicitly all of its descendants paths. |
Node |
updateProperties(ID nodeId,
Property[] properties)
Updates the node with the given id with the given properties. |
Methods inherited from class com.bea.p13n.content.adapter.BaseOps |
getContentManager, unsupported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ObjectClassOpsImpl objectClassOps
Constructor Detail |
public NodeOpsImpl(Credentials credentials, Properties properties, ObjectClassOpsImpl objectClassOps)
Method Detail |
public Node addNodeContent(ID nodeId, ID objectClassId, Property[] properties)
addNodeContent
in interface NodeOps
nodeId
- - the ID for the node to update.
public Node convert(String reponame, Content content)
public Node copyNode(ID sourceId, ID destinationId)
copyNode
in interface NodeOps
sourceId
- - the id of the Node to be copieddestinationId
- - the id of the Node under which
the sourceId Node is copied
public Property createContentProperty(String reponame, String contentId, Document doc)
public Node createNode(ID parentId, String newNodeName, int type) throws RepositoryException
createNode
in interface NodeOps
parentId
- - the id for the parent of the node. The uid is null
if the parent is root.newNodeName
- - the name of Node to create.type
- - the type of node - either com.bea.content.Node.HIERARCHY or
com.bea.content.Node.CONTENT.
NodeExistsException-
- if the name for the node
already exists as a child of the parent.
RepositoryException-
- if system error occurs.
RepositoryException
- - if validation error occurs.public Node createNode(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties) throws RepositoryException
createNode
in interface NodeOps
parentId
- - the id for the parent of the node. It is null
if the parent is root.newNodeName
- - the name of Node to create.type
- - the type of node- either HIERARCHY or CONTENT.objectClassId
- - the ID for the ObjectClass to associate the new Node to.properties
- - the properties to add to the new Node.
RepositoryException
- - if a system error occurs.public Property createProperty(String reponame, String contentId, String name, Object val)
public Value createValue(Object val)
public void deleteNode(ID nodeId)
deleteNode
in interface NodeOps
nodeId
- - the id of the Node to be deletedpublic Node getNode(ID nodeId) throws NoSuchNodeException
getNode
in interface NodeOps
nodeId
- - the id for the node to get.
NoSuchNodeException-
- if the node to get can't be found.
NoSuchNodeException
- - if the node to get can't be found.public Node getNode(String path) throws NoSuchNodeException
getNode
in interface NodeOps
path
- - the path for the node to get.
NoSuchNodeException-
- if the node to get can't be found.
NoSuchNodeException
- - if the node to get can't be found.public Node[] getNodeChildren(ID parentId, int type)
getNodeChildren
in interface NodeOps
parentId
- - the Node which may have childrentype
- - the type of children to return, either
com.bea.content.Node.HIERARCHY, com.bea.content.Node.CONTENT or
or com.bea.content.Node.NODE.
If the type is com.bea.content.Node.NODE then all children (both HIERARCHY
and CONTENT) will be returned.
public Node[] getNodes(ID[] nodeIds) throws NoSuchNodeException
getNodes
in interface NodeOps
nodeIds
- - the Node IDs to retrieve the Nodes for.
NoSuchNodeException-
- if a node to get can't be found.
NoSuchNodeException
- - if a node to get can't be found.public String getPath(Content content)
public Property[] getProperties(ID nodeId) throws NoSuchNodeException
getProperties
in interface NodeOps
nodeId
- - the id for the node.
NoSuchNodeException-
- if the node can't be found.
NoSuchNodeException
- - if the node can't be found.public Property[] getProperties(String reponame, Content content)
This only fully supports Content object from the old SPI implementation. If someone reimplemented the ContentManager/DocumentManager interface instead, then this will only return Property object representing the known getter methods on Content and/or Document.
public InputStream getPropertyBytes(ID propertyId) throws NoSuchPropertyException
getPropertyBytes
in interface NodeOps
propertyId
- - the id for the Property that contains the binary data.
NoSuchPropertyException-
- if the Property does not exist.
NoSuchPropertyException
- - if the Property does not exist.public Node moveNode(ID sourceId, ID destinationId)
moveNode
in interface NodeOps
sourceId
- - the id of the Node to be moveddestinationId
- - the id of the Node under which
the sourceId Node is moved
public Node removeNodeContent(ID nodeId)
removeNodeContent
in interface NodeOps
nodeId
- - the id for the Node to remove the ObjectClass from.
public Node renameNode(ID nodeId, String newName)
renameNode
in interface NodeOps
nodeId
- - the id for the node to renamenewName
- - a String for the new node name
public Node updateProperties(ID nodeId, Property[] properties)
NodeOps
updateProperties
in interface NodeOps
nodeId
- - the ID of the node to update. The ID must include the repositoryName.properties
- - the properties to update on the Node.
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |