public class NodeArchiveServiceImpl extends Object implements NodeArchiveService
| Modifier and Type | Field and Description |
|---|---|
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
QNAME_ARCHIVED_ITEM| Constructor and Description |
|---|
NodeArchiveServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.alfresco.service.cmr.repository.NodeRef |
getArchivedNode(org.alfresco.service.cmr.repository.NodeRef originalNodeRef)
Get the likely node reference for the original node.
|
org.alfresco.service.cmr.repository.NodeRef |
getStoreArchiveNode(org.alfresco.service.cmr.repository.StoreRef originalStoreRef)
Get the parent node that holds all nodes archived from the given store.
|
protected Set<org.alfresco.service.namespace.QName> |
getTypeAndAspectQNames(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get all aspect and node type qualified names
|
protected boolean |
hasAdminAccess(String userID) |
boolean |
hasFullAccess(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Check if the current user has authority to access the archived node.
|
void |
init() |
protected void |
invokeBeforePurgeNode(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> |
listArchivedNodes(ArchivedNodesCannedQueryBuilder cannedQueryBuilder)
Get the archived nodes deleted by the current user.
|
void |
purgeAllArchivedNodes(org.alfresco.service.cmr.repository.StoreRef originalStoreRef)
Uses batch processing and job locking to purge all archived nodes
|
void |
purgeArchivedNode(org.alfresco.service.cmr.repository.NodeRef archivedNodeRef)
This is the primary purge methd that all purge methods fall back on.
|
void |
purgeArchivedNodes(List<org.alfresco.service.cmr.repository.NodeRef> archivedNodes)
Permanently delete the archived nodes.
|
List<RestoreNodeReport> |
restoreAllArchivedNodes(org.alfresco.service.cmr.repository.StoreRef originalStoreRef)
Deprecated.
In 3.4: to be removed
|
List<RestoreNodeReport> |
restoreAllArchivedNodes(org.alfresco.service.cmr.repository.StoreRef originalStoreRef,
org.alfresco.service.cmr.repository.NodeRef destinationNodeRef,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
Deprecated.
In 3.4: to be removed
|
RestoreNodeReport |
restoreArchivedNode(org.alfresco.service.cmr.repository.NodeRef archivedNodeRef)
Attempt to restore the given archived node into its original location.
|
RestoreNodeReport |
restoreArchivedNode(org.alfresco.service.cmr.repository.NodeRef archivedNodeRef,
org.alfresco.service.cmr.repository.NodeRef destinationNodeRef,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
This is the primary restore method that all
restore methods fall back on. |
List<RestoreNodeReport> |
restoreArchivedNodes(List<org.alfresco.service.cmr.repository.NodeRef> archivedNodeRefs)
Attempt to restore a list of archived nodes into their original locations,
using the original association types and names.
|
List<RestoreNodeReport> |
restoreArchivedNodes(List<org.alfresco.service.cmr.repository.NodeRef> archivedNodeRefs,
org.alfresco.service.cmr.repository.NodeRef destinationNodeRef,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
Attempt to restore a list of archived nodes into a new location.
|
void |
setAuthorityService(AuthorityService authorityService) |
void |
setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<ArchivedNodeEntity>> cannedQueryRegistry) |
void |
setJobLockService(JobLockService jobLockService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
void |
setTransactionService(TransactionService transactionService) |
void |
setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive) |
public void setPolicyComponent(PolicyComponent policyComponent)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setTransactionService(TransactionService transactionService)
public org.alfresco.service.cmr.repository.NodeRef getStoreArchiveNode(org.alfresco.service.cmr.repository.StoreRef originalStoreRef)
NodeArchiveServicegetStoreArchiveNode in interface NodeArchiveServicepublic void setJobLockService(JobLockService jobLockService)
public void init()
public void setAuthorityService(AuthorityService authorityService)
public void setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<ArchivedNodeEntity>> cannedQueryRegistry)
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
public org.alfresco.service.cmr.repository.NodeRef getArchivedNode(org.alfresco.service.cmr.repository.NodeRef originalNodeRef)
NodeArchiveServicegetArchivedNode in interface NodeArchiveServiceoriginalNodeRef - the original node referencepublic RestoreNodeReport restoreArchivedNode(org.alfresco.service.cmr.repository.NodeRef archivedNodeRef, org.alfresco.service.cmr.repository.NodeRef destinationNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
restore methods fall back on.
It executes the restore for the node in a separate transaction and attempts to catch
the known conditions that can be reported back to the client.restoreArchivedNode in interface NodeArchiveServicearchivedNodeRef - 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 referenceassocTypeQName - the type of the primary association to link the
restored node to the destination parent, or null to use
the orginal association typeassocQName - the name of the primary association to be created,
or null to use the original association namepublic RestoreNodeReport restoreArchivedNode(org.alfresco.service.cmr.repository.NodeRef archivedNodeRef)
NodeArchiveServiceTRANSACTIONS: This method will execute in a new transaction.
restoreArchivedNode in interface NodeArchiveServicearchivedNodeRef - the node's reference in the archiverestoreArchivedNode(NodeRef, NodeRef, QName, QName)public List<RestoreNodeReport> restoreArchivedNodes(List<org.alfresco.service.cmr.repository.NodeRef> archivedNodeRefs)
NodeArchiveServiceTRANSACTIONS: This method will execute in a new transaction.
restoreArchivedNodes in interface NodeArchiveServicearchivedNodeRefs - the nodes' references in the archive. These
must be valid.restoreArchivedNodes(List, NodeRef, QName, QName)public List<RestoreNodeReport> restoreArchivedNodes(List<org.alfresco.service.cmr.repository.NodeRef> archivedNodeRefs, org.alfresco.service.cmr.repository.NodeRef destinationNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
NodeArchiveServiceTRANSACTIONS: This method will execute in a new transaction.
restoreArchivedNodes in interface NodeArchiveServicearchivedNodeRefs - 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 referencesassocTypeQName - the type of the primary associations to link the
restored node to the destination parent, or null to use
the orginal association typesassocQName - the name of the primary associations to be created,
or null to use the original association namesrestoreArchivedNode(NodeRef, NodeRef, QName, QName)public List<RestoreNodeReport> restoreAllArchivedNodes(org.alfresco.service.cmr.repository.StoreRef originalStoreRef)
restoreAllArchivedNodes in interface NodeArchiveServiceoriginalStoreRef - the store that the items originally came frompublic List<RestoreNodeReport> restoreAllArchivedNodes(org.alfresco.service.cmr.repository.StoreRef originalStoreRef, org.alfresco.service.cmr.repository.NodeRef destinationNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
restoreAllArchivedNodes in interface NodeArchiveServiceoriginalStoreRef - the store that the items originally came fromdestinationNodeRef - the parent of the restored nodes, or
null to use the original parent node referencesassocTypeQName - the type of the primary associations to link the
restored node to the destination parent, or null to use
the orginal association typesassocQName - the name of the primary associations to be created,
or null to use the original association namesNodeService.getStoreArchiveNode(StoreRef),
restoreArchivedNode(NodeRef, NodeRef, QName, QName)public void purgeArchivedNode(org.alfresco.service.cmr.repository.NodeRef archivedNodeRef)
purgeArchivedNode in interface NodeArchiveServicearchivedNodeRef - the archived node to delete.public void purgeArchivedNodes(List<org.alfresco.service.cmr.repository.NodeRef> archivedNodes)
NodeArchiveServicepurgeArchivedNodes in interface NodeArchiveServicearchivedNodes - the archived nodes to delete.purgeArchivedNode(NodeRef)public void purgeAllArchivedNodes(org.alfresco.service.cmr.repository.StoreRef originalStoreRef)
purgeAllArchivedNodes in interface NodeArchiveServiceoriginalStoreRef - the store that the items originally came frompublic org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> listArchivedNodes(ArchivedNodesCannedQueryBuilder cannedQueryBuilder)
listArchivedNodes in interface NodeArchiveServicecannedQueryBuilder - the object that holds the required and optional
parameters to perform the canned querypublic boolean hasFullAccess(org.alfresco.service.cmr.repository.NodeRef nodeRef)
hasFullAccess in interface NodeArchiveServiceprotected boolean hasAdminAccess(String userID)
protected void invokeBeforePurgeNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
protected Set<org.alfresco.service.namespace.QName> getTypeAndAspectQNames(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef - the node we are interested inCopyright © 2005–2014 Alfresco Software. All rights reserved.