mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added getArchivedNode(NodeRef originalNodeRef) method for quick retrieval of archived node reference
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3102 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,15 @@ public interface NodeArchiveService
|
|||||||
*/
|
*/
|
||||||
public NodeRef getStoreArchiveNode(StoreRef originalStoreRef);
|
public NodeRef getStoreArchiveNode(StoreRef originalStoreRef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the likely node reference for the original node. There is no
|
||||||
|
* guarantee that the node exists in the archive store.
|
||||||
|
*
|
||||||
|
* @param originalNodeRef the original node reference
|
||||||
|
* @return Returns the node ref of the node if it was archived.
|
||||||
|
*/
|
||||||
|
public NodeRef getArchivedNode(NodeRef originalNodeRef);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to restore the given archived node into its original location.
|
* Attempt to restore the given archived node into its original location.
|
||||||
* <p>
|
* <p>
|
||||||
|
@@ -72,6 +72,17 @@ public class NodeArchiveServiceImpl implements NodeArchiveService
|
|||||||
return nodeService.getStoreArchiveNode(originalStoreRef);
|
return nodeService.getStoreArchiveNode(originalStoreRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public NodeRef getArchivedNode(NodeRef originalNodeRef)
|
||||||
|
{
|
||||||
|
StoreRef orginalStoreRef = originalNodeRef.getStoreRef();
|
||||||
|
NodeRef archiveRootNodeRef = nodeService.getStoreArchiveNode(orginalStoreRef);
|
||||||
|
// create the likely location of the archived node
|
||||||
|
NodeRef archivedNodeRef = new NodeRef(
|
||||||
|
archiveRootNodeRef.getStoreRef(),
|
||||||
|
originalNodeRef.getId());
|
||||||
|
return archivedNodeRef;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the nodes that were archived <b>from</b> the given store.
|
* Get all the nodes that were archived <b>from</b> the given store.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user