|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.coci.CheckOutCheckInServiceImpl
public class CheckOutCheckInServiceImpl
Check out check in service implementation
Constructor Summary | |
---|---|
CheckOutCheckInServiceImpl()
|
Method Summary | |
---|---|
NodeRef |
cancelCheckout(NodeRef workingCopyNodeRef)
Cancels the checkout for a given working copy. |
NodeRef |
checkin(NodeRef workingCopyNodeRef,
java.util.Map versionProperties)
If no content url is specified then current content set on the working copy is understood to be current. |
NodeRef |
checkin(NodeRef workingCopyNodeRef,
java.util.Map versionProperties,
java.lang.String contentUrl)
By default the checked in node is not keep checked in. |
NodeRef |
checkin(NodeRef workingCopyNodeRef,
java.util.Map versionProperties,
java.lang.String contentUrl,
boolean keepCheckedOut)
Checks in the working node specified. |
NodeRef |
checkout(NodeRef nodeRef)
Checks out the working copy of the node into the same parent node with the same child associations details. |
NodeRef |
checkout(NodeRef nodeRef,
NodeRef destinationParentNodeRef,
QName destinationAssocTypeQName,
QName destinationAssocQName)
Checks out the given node placing a working copy in the destination specified. |
java.lang.String |
createWorkingCopyName(java.lang.String name)
Create working copy name |
NodeRef |
getWorkingCopy(NodeRef nodeRef)
Helper method to retrieve the working copy node reference for a checked out node. |
java.lang.String |
getWorkingCopyLabel()
Get the working copy label. |
void |
init()
Initialise method |
void |
setAuthenticationService(AuthenticationService authenticationService)
Sets the authentication service |
void |
setCopyService(CopyService copyService)
Sets the copy service |
void |
setFileFolderService(FileFolderService fileFolderService)
Set the file folder service |
void |
setLockService(LockService lockService)
Sets the lock service |
void |
setNodeService(NodeService nodeService)
Set the node service |
void |
setPolicyComponent(PolicyComponent policyComponent)
|
void |
setSearchService(SearchService searchService)
Set the search service |
void |
setVersionableAspect(VersionableAspect versionableAspect)
Sets the versionable aspect behaviour implementation |
void |
setVersionService(VersionService versionService)
Set the version service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CheckOutCheckInServiceImpl()
Method Detail |
---|
public void setNodeService(NodeService nodeService)
nodeService
- the node servicepublic void setVersionService(VersionService versionService)
versionService
- the version servicepublic void setLockService(LockService lockService)
lockService
- the lock servicepublic void setCopyService(CopyService copyService)
copyService
- the copy servicepublic void setAuthenticationService(AuthenticationService authenticationService)
authenticationService
- the authentication servicepublic void setSearchService(SearchService searchService)
searchService
- the search servicepublic void setFileFolderService(FileFolderService fileFolderService)
fileFolderService
- the file folder servicepublic void setVersionableAspect(VersionableAspect versionableAspect)
versionableAspect
- the versionable aspect behaviour implementationpublic void setPolicyComponent(PolicyComponent policyComponent)
policyComponent
- policy componentpublic void init()
public NodeRef checkout(NodeRef nodeRef, NodeRef destinationParentNodeRef, QName destinationAssocTypeQName, QName destinationAssocQName)
CheckOutCheckInService
When a node is checked out a read-only lock is placed on the original node and a working copy is placed in the destination specified.
The copy aspect is applied to the working copy so that the original node can be identified.
The working copy aspect is applied to the working copy so that it can be identified as the working copy of a checked out node.
The working copy node reference is returned to the caller.
checkout
in interface CheckOutCheckInService
nodeRef
- a reference to the node to checkoutdestinationParentNodeRef
- the destination node reference for the working
copydestinationAssocTypeQName
- the destination child assoc type for the working
copydestinationAssocQName
- the destination child assoc qualified name for
the working copy
CheckOutCheckInService.checkout(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName)
public NodeRef checkout(NodeRef nodeRef)
CheckOutCheckInService
checkout
in interface CheckOutCheckInService
nodeRef
- a reference to the node to checkout
CheckOutCheckInService.checkout(org.alfresco.service.cmr.repository.NodeRef)
public NodeRef checkin(NodeRef workingCopyNodeRef, java.util.Map versionProperties, java.lang.String contentUrl, boolean keepCheckedOut)
CheckOutCheckInService
When a working copy is checked in the current state of the working copy is copied to the original node. This will include any content updated in the working node.
If version properties are provided the original node will be versioned and updated accordingly.
If a content Url is provided it will be used to update the content of the working node before the checkin operation takes place.
Once the operation has completed the read lock applied to the original node during checkout will be removed and the working copy of the node deleted from the repository, unless the operation is instructed to keep the original node checked out. In which case the lock and the working copy will remain.
The node reference to the original node is returned.
checkin
in interface CheckOutCheckInService
workingCopyNodeRef
- the working copy node referenceversionProperties
- the version properties. If null is passed then the original node
is NOT versioned during the checkin operation.contentUrl
- a content url that should be set on the working copy before
the checkin operation takes place. If null then the current working
copy content is copied back to the original node.keepCheckedOut
- indicates whether the node should remain checked out after the checkin
has taken place. When the node remains checked out the working node
reference remains the same.
org.alfresco.repo.version.operations.VersionOperationsService#checkin(org.alfresco.repo.ref.NodeRef, Map, java.lang.String, boolean)
public NodeRef checkin(NodeRef workingCopyNodeRef, java.util.Map versionProperties, java.lang.String contentUrl)
CheckOutCheckInService
checkin
in interface CheckOutCheckInService
workingCopyNodeRef
- the working copy node referenceversionProperties
- the version properties. If null is passed then the original node
is NOT versioned during the checkin operation.contentUrl
- a content url that should be set on the working copy before
the checkin operation takes place. If null then the current working
copy content is copied back to the original node.
CheckOutCheckInService.checkin(org.alfresco.service.cmr.repository.NodeRef, Map, java.lang.String)
public NodeRef checkin(NodeRef workingCopyNodeRef, java.util.Map versionProperties)
CheckOutCheckInService
checkin
in interface CheckOutCheckInService
workingCopyNodeRef
- the working copy node referenceversionProperties
- the version properties. If null is passed then the original node
is NOT versioned during the checkin operation.
CheckOutCheckInService.checkin(org.alfresco.service.cmr.repository.NodeRef, Map)
public NodeRef cancelCheckout(NodeRef workingCopyNodeRef)
CheckOutCheckInService
The read-only lock on the original node is removed and the working copy is removed.
Note that all modification made to the working copy will be lost and the original node will remain unchanged.
A reference to the original node reference is returned.
cancelCheckout
in interface CheckOutCheckInService
workingCopyNodeRef
- the working copy node reference
CheckOutCheckInService.cancelCheckout(org.alfresco.service.cmr.repository.NodeRef)
public NodeRef getWorkingCopy(NodeRef nodeRef)
CheckOutCheckInService
A null node reference is returned if the node is not checked out.
getWorkingCopy
in interface CheckOutCheckInService
nodeRef
- a node reference
CheckOutCheckInService.getWorkingCopy(org.alfresco.service.cmr.repository.NodeRef)
public java.lang.String createWorkingCopyName(java.lang.String name)
name
- name
public java.lang.String getWorkingCopyLabel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |