org.alfresco.repo.node.archive
Interface NodeArchiveService

All Known Implementing Classes:
NodeArchiveServiceImpl

public interface NodeArchiveService

A service interface providing methods that map onto the low-level node restore functionality.


Method Summary
 NodeRef getArchivedNode(NodeRef originalNodeRef)
          Get the likely node reference for the original node.
 NodeRef getStoreArchiveNode(StoreRef originalStoreRef)
          Get the parent node that holds all nodes archived from the given store.
 void purgeAllArchivedNodes(StoreRef originalStoreRef)
          Permanently delete all archived nodes.
 void purgeArchivedNode(NodeRef archivedNodeRef)
          Permanently delete the archived node.
 void purgeArchivedNodes(java.util.List archivedNodes)
          Permanently delete the archived nodes.
 java.util.List restoreAllArchivedNodes(StoreRef originalStoreRef)
          Attempt to restore all archived nodes into their original locations.
 java.util.List restoreAllArchivedNodes(StoreRef originalStoreRef, NodeRef destinationNodeRef, QName assocTypeQName, QName assocQName)
          Attempt to restore all archived nodes into a new location.
 RestoreNodeReport restoreArchivedNode(NodeRef archivedNodeRef)
          Attempt to restore the given archived node into its original location.
 RestoreNodeReport restoreArchivedNode(NodeRef archivedNodeRef, NodeRef destinationNodeRef, QName assocTypeQName, QName assocQName)
          Attempt to restore the given archived node into a new location.
 java.util.List restoreArchivedNodes(java.util.List archivedNodeRefs)
          Attempt to restore a list of archived nodes into their original locations, using the original association types and names.
 java.util.List restoreArchivedNodes(java.util.List archivedNodeRefs, NodeRef destinationNodeRef, QName assocTypeQName, QName assocQName)
          Attempt to restore a list of archived nodes into a new location.
 

Method Detail

getStoreArchiveNode

NodeRef getStoreArchiveNode(StoreRef originalStoreRef)
Get the parent node that holds all nodes archived from the given store.

Parameters:
storeRef - the original store of the archived nodes. This is the store where the currently archived nodes could originally be found.
Returns:
Returns the parent of the archived nodes, or null if archiving is not configured for the store

getArchivedNode

NodeRef getArchivedNode(NodeRef originalNodeRef)
Get the likely node reference for the original node. There is no guarantee that the node exists in the archive store.

Parameters:
originalNodeRef - the original node reference
Returns:
Returns the node ref of the node if it was archived.

restoreArchivedNode

RestoreNodeReport restoreArchivedNode(NodeRef archivedNodeRef)
Attempt to restore the given archived node into its original location.

TRANSACTIONS: This method will execute in a new transaction.

Parameters:
archivedNodeRef - the node's reference in the archive
Returns:
Returns the results of the restore operation

restoreArchivedNode

RestoreNodeReport restoreArchivedNode(NodeRef archivedNodeRef,
                                      NodeRef destinationNodeRef,
                                      QName assocTypeQName,
                                      QName assocQName)
Attempt to restore the given archived node into a new location.

TRANSACTIONS: This method will execute in a new transaction.

Parameters:
archivedNodeRef - the node's reference in the archive. This must be valid.
destinationNodeRef - the parent of the restored node, or null to use the original parent node reference
assocTypeQName - the type of the primary association to link the restored node to the destination parent, or null to use the orginal association type
assocQName - the name of the primary association to be created, or null to use the original association name
Returns:
Returns the results of the restore operation

restoreArchivedNodes

java.util.List restoreArchivedNodes(java.util.List archivedNodeRefs)
Attempt to restore a list of archived nodes into their original locations, using the original association types and names.

TRANSACTIONS: This method will execute in a new transaction.

Parameters:
archivedNodeRefs - the nodes' references in the archive. These must be valid.
Returns:
Returns the results of the each attempted restore operation

restoreArchivedNodes

java.util.List restoreArchivedNodes(java.util.List archivedNodeRefs,
                                    NodeRef destinationNodeRef,
                                    QName assocTypeQName,
                                    QName assocQName)
Attempt to restore a list of archived nodes into a new location.

TRANSACTIONS: This method will execute in a new transaction.

Parameters:
archivedNodeRefs - the nodes' references in the archive. These must be valid.
destinationNodeRef - the parent of the restored nodes, or null to use the original parent node references
assocTypeQName - the type of the primary associations to link the restored node to the destination parent, or null to use the orginal association types
assocQName - the name of the primary associations to be created, or null to use the original association names
Returns:
Returns the results of the each attempted restore operation

restoreAllArchivedNodes

java.util.List restoreAllArchivedNodes(StoreRef originalStoreRef)
Attempt to restore all archived nodes into their original locations.

TRANSACTIONS: This method will execute in a new transaction.

Parameters:
originalStoreRef - the store that the items originally came from
Returns:
Returns the results of the each attempted restore operation

restoreAllArchivedNodes

java.util.List restoreAllArchivedNodes(StoreRef originalStoreRef,
                                       NodeRef destinationNodeRef,
                                       QName assocTypeQName,
                                       QName assocQName)
Attempt to restore all archived nodes into a new location.

TRANSACTIONS: This method will execute in a new transaction.

Parameters:
originalStoreRef - the store that the items originally came from
destinationNodeRef - the parent of the restored nodes, or null to use the original parent node references
assocTypeQName - the type of the primary associations to link the restored node to the destination parent, or null to use the orginal association types
assocQName - the name of the primary associations to be created, or null to use the original association names
Returns:
Returns the results of the each attempted restore operation

purgeArchivedNode

void purgeArchivedNode(NodeRef archivedNodeRef)
Permanently delete the archived node.

Parameters:
archivedNodeRef - the archived node to delete.

purgeArchivedNodes

void purgeArchivedNodes(java.util.List archivedNodes)
Permanently delete the archived nodes.

Parameters:
archivedNodes - the archived nodes to delete.

purgeAllArchivedNodes

void purgeAllArchivedNodes(StoreRef originalStoreRef)
Permanently delete all archived nodes.

Parameters:
originalStoreRef - the store that the items originally came from


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.