|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
LibraryOps is a service for performing library functionality on virtual nodes. Nodes that are either versionable, and or have a life cycle may be managed through this api. Versionable and non-versionable nodes are handled the same through the life cycle. They are also handled the same through the versioning api, the only difference being that for versionable nodes, the version history is maintained. Both versionable and non-versionable nodes have a working version that is maintained through the life cycle.
This api only supports versioning and life cycle of content nodes. Hierarchy nodes may be created and deleted, but they will be published/unpublished at the same time and will not have version history.
Method Summary | |
void |
checkIn(ContentContext context,
ID nodeId)
Checks in the latest version of the node with the specified id. |
void |
checkIn(ContentContext context,
ID nodeId,
VersionableContent versionableContent)
Checks in the node with the specified id. |
VirtualNode |
checkOut(ContentContext context,
ID nodeId)
Check out the specified version of a content node. |
VirtualNode |
checkOut(ContentContext context,
ID nodeId,
String version)
Check out the specified version of a content node. |
VirtualNode |
createAndCheckIn(ContentContext context,
ID parentId,
String newNodeName,
ID objectClassId,
Property[] properties,
int type,
int lifeCycleStatus)
Creates the Node and then checks it in with the given status. |
VirtualNode |
getNode(ContentContext context,
ID nodeId)
Return the virtual node for the given ID. |
InputStream |
getPropertyBytes(ContentContext context,
String propertyId)
Gets the Binary data for the given Property Id. |
Version |
getVersion(ContentContext context,
ID nodeId,
String versionName)
Returns a specific version for the given Virtual Node. |
VersionIterator |
getVersions(ContentContext context,
ID nodeId)
Returns all versions for the given Virtual Node. |
VirtualNodeIterator |
getWorkingNodes(ContentContext context)
Return all the nodes which belong to the user's workspace. |
void |
revert(ContentContext context,
ID nodeId)
This method removes the working version of the node and unlocks it. |
void |
save(ContentContext context,
ID nodeId,
VersionableContent versionableContent)
Updates the node with the specified data. |
Methods inherited from interface javax.ejb.EJBLocalObject |
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
Method Detail |
public void checkIn(ContentContext context, ID nodeId) throws NoSuchNodeException, RepositoryException
LifeCycle
to better understand
the available status transitions on checkin and what occurs for different transitions.
context
- The content context object which contains the user profile information.nodeId
- The id of the node being checked in.
properties as defined by the node type, or else a validation error will be thrown by the system.
NoSuchNodeException
- If the node does not exist
RepositoryException
public void checkIn(ContentContext context, ID nodeId, VersionableContent versionableContent) throws NoSuchNodeException, RepositoryException
LifeCycle
to better understand
the available status transitions on checkin and what occurs for different transitions.
context
- The content context object which contains the user profile information.nodeId
- The id of the node being checked in.versionableContent
- The node data to be checked in. This data should contain the same
properties as defined by the node type, or else a validation error will be thrown by the system.
NoSuchNodeException
- If the node does not exist
RepositoryException
public VirtualNode checkOut(ContentContext context, ID nodeId) throws AuthorizationException, NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node to check out
AuthorizationException
- if user is not authorized to perform action
NoSuchNodeException
- If the node does not exist
RepositoryException
public VirtualNode checkOut(ContentContext context, ID nodeId, String version) throws AuthorizationException, NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node to check outversion
- The version to be checked out, null if the latest version is desired.
AuthorizationException
- if user is not authorized to perform action
NoSuchNodeException
- If the node does not exist
RepositoryException
public VirtualNode createAndCheckIn(ContentContext context, ID parentId, String newNodeName, ID objectClassId, Property[] properties, int type, int lifeCycleStatus) throws AuthorizationException, NodeExistsException, NoSuchObjectClassException, RepositoryException
LifeCycle
to better understand
the available statuses, status transitions on checkin and what occurs for different transitions.
context
- The content context object which contains the user profile information.parentId
- The parent Id of the node to create the new Node under.newNodeName
- The name of the new NodeobjectClassId
- The Id of the ObjectClass to assign to the new Nodeproperties
- The properties for the Nodetype
- The type of Node, either Hierarchy or ContentlifeCycleStatus
- The lifecycle status to checkin the node as.
AuthorizationException
NodeExistsException
NoSuchObjectClassException
RepositoryException
public VirtualNode getNode(ContentContext context, ID nodeId) throws NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node being retrieved.
NoSuchNodeException
- If the node does not exist
RepositoryException
public InputStream getPropertyBytes(ContentContext context, String propertyId) throws NoSuchPropertyException, RepositoryException
After calling this method and retrieving the InputStream, you must close the InputStream when finished reading it in a finally block.
WARNING: If using this interface to retrieve binary content from
a BEA Repository, please read the javadoc for
RepositoryConfig
.
propertyId
- - the ID for the Property that contains the binary data. The
ID must include the repositoryName.
NoSuchPropertyException
- - if the Property does not exist.
RepositoryException
public Version getVersion(ContentContext context, ID nodeId, String versionName) throws NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node for the version being retrieved.versionName
- The version name (number) that should be retrieved.
NoSuchNodeException
- If the node version does not exist.
RepositoryException
public VersionIterator getVersions(ContentContext context, ID nodeId) throws NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node for the versions being retrieved.
NoSuchNodeException
- If the node does not exist
RepositoryException
public VirtualNodeIterator getWorkingNodes(ContentContext context) throws RepositoryException
context
- The content context object which contains the user profile information.
RepositoryException
public void revert(ContentContext context, ID nodeId) throws NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node being reverted.
NoSuchNodeException
- If the node does not exist
RepositoryException
public void save(ContentContext context, ID nodeId, VersionableContent versionableContent) throws NoSuchNodeException, RepositoryException
context
- The content context object which contains the user profile information.nodeId
- The id of the node being saved.versionableContent
- The node data to be checked in. This data should contain the same
properties as defined by the node type, or else a validation error will be thrown by the system.
NoSuchNodeException
- If the node does not exist
RepositoryException
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |