EJBLocalObject
, Serializable
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.
EJBLocalObject
, Serializable
Method Summary |
public void |
|
public void |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public void |
|
public void |
|
Methods from interface javax.ejb. |
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
Method Detail |
public void checkIn(Checks in the node with the specified id. Only the user who has checked out the node will be allowed to check in. This will unlock the node after checking it in to allow other users to perform checkout operations. The following rules for setting the assignedToUser and assignedToRole fields will be applied for different status transitions during a checkin : Please review the javadoc forContentContext
context,ID
nodeId,VersionableContent
versionableContent)
throwsNoSuchNodeException
,RepositoryException
LifeCycle
to better understand
the available status transitions on checkin and what occurs for different transitions.
NoSuchNodeException
RepositoryException
public void checkIn(Checks in the latest version of the node with the specified id. Only the user who has checked out the node will be allowed to check in. This will unlock the node after checking it in to allow other users to perform checkout operations. Please review the javadoc forContentContext
context,ID
nodeId)
throwsNoSuchNodeException
,RepositoryException
LifeCycle
to better understand
the available status transitions on checkin and what occurs for different transitions.
NoSuchNodeException
RepositoryException
publicCheck out the specified version of a content node. This method will lock the virtual node such that only the user who checked it out or the super user may be able to revert the operation. If the virtual node requires the user to be in specified role before checking out, only that user may checkout the node, even though the node may not be checked out. A node can only be checked once. Multiple checkouts of a node is not allowed.VirtualNode
checkOut(ContentContext
context,ID
nodeId,String
version)
throwsAuthorizationException
,NoSuchNodeException
,RepositoryException
AuthorizationException
NoSuchNodeException
RepositoryException
publicCheck out the specified version of a content node. This method will lock the virtual node such that only the user who checked it out or the super user may be able to revert the operation. If the virtual node requires the user to be in specified role before checking out, only that user may checkout the node, even though the node may not be checked out. A node can only be checked once. Multiple checkouts of a node is not allowed.VirtualNode
checkOut(ContentContext
context,ID
nodeId)
throwsAuthorizationException
,NoSuchNodeException
,RepositoryException
AuthorizationException
NoSuchNodeException
RepositoryException
publicCreates the Node and then checks it in with the given status. Because this is a new Node, checkin in with a REJECTED status is not valid. Please review the javadoc forVirtualNode
createAndCheckIn(ContentContext
context,ID
parentId,String
newNodeName,ID
objectClassId,Property
[] properties, int type, int lifeCycleStatus)
throwsAuthorizationException
,NodeExistsException
,NoSuchObjectClassException
,RepositoryException
LifeCycle
to better understand
the available statuses, status transitions on checkin and what occurs for different transitions.
AuthorizationException
NodeExistsException
NoSuchObjectClassException
RepositoryException
publicReturn the virtual node for the given ID.VirtualNode
getNode(ContentContext
context,ID
nodeId)
throwsNoSuchNodeException
,RepositoryException
NoSuchNodeException
RepositoryException
publicGets the Binary data for the given Property Id.InputStream
getPropertyBytes(ContentContext
context,String
propertyId)
throwsNoSuchPropertyException
,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
.
NoSuchPropertyException
RepositoryException
publicReturns a specific version for the given Virtual Node. If the node is checked out by the user calling this method, it will also return the working version if so called. For everybody else this method will not return the working version if the user tries to find that version.Version
getVersion(ContentContext
context,ID
nodeId,String
versionName)
throwsNoSuchNodeException
,RepositoryException
NoSuchNodeException
RepositoryException
publicReturns all versions for the given Virtual Node. If the node is checked out by the user calling this method, it will also return the working version in the iterator. For everybody else this method will not return all versions except the working version of that node.VersionIterator
getVersions(ContentContext
context,ID
nodeId)
throwsNoSuchNodeException
,RepositoryException
NoSuchNodeException
RepositoryException
publicReturn all the nodes which belong to the user's workspace. This includes nodes which can belong in any of the following category : a) Nodes checked out by the user. b) Nodes not checked out by the user, but which still belong to the user (ie checked in item in DRAFT state, items REJECTED by a publisher) c) Nodes which are waiting to be approved if a user is in a publisher role. (The nodes for which assignedToRole matches the role of the user).VirtualNodeIterator
getWorkingNodes(ContentContext
context)
throwsRepositoryException
RepositoryException
public void revert(This method removes the working version of the node and unlocks it. It also sets the assignedToUser field to null. The node must be checked out before it can be reverted. Only the user who has the node checked out, or the System administrator can perform a revert operation on a node.ContentContext
context,ID
nodeId)
throwsNoSuchNodeException
,RepositoryException
NoSuchNodeException
RepositoryException
public void save(Updates the node with the specified data. The node must be checked out before this method is called on it. Only the user who has the node checked out can perform a save on the node. The status should not change as part of the save. After the save, the node will remain in a locked state as before.ContentContext
context,ID
nodeId,VersionableContent
versionableContent)
throwsNoSuchNodeException
,RepositoryException
NoSuchNodeException
RepositoryException