Remove redundant setter and related bean injection (deprecated in 3.0)

Remove deprecated NodeArchive-related methods

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@132100 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2016-11-02 14:40:24 +00:00
parent 1a8c5236b2
commit 6451543233
4 changed files with 0 additions and 145 deletions

View File

@@ -393,102 +393,6 @@ public class NodeArchiveServiceImpl implements NodeArchiveService
return results;
}
/**
* Uses batch processing and job locking to purge all archived nodes
*
* @deprecated In 3.4: to be removed
*/
public List<RestoreNodeReport> restoreAllArchivedNodes(StoreRef originalStoreRef)
{
final String user = AuthenticationUtil.getFullyAuthenticatedUser();
if (user == null)
{
throw new IllegalStateException("Cannot restore as there is no authenticated user.");
}
final List<RestoreNodeReport> results = Collections.synchronizedList(new ArrayList<RestoreNodeReport>(1000));
/**
* Worker that restores each node
*/
BatchProcessWorker<NodeRef> worker = new BatchProcessor.BatchProcessWorkerAdaptor<NodeRef>()
{
@Override
public void beforeProcess() throws Throwable
{
AuthenticationUtil.pushAuthentication();
}
public void process(NodeRef entry) throws Throwable
{
AuthenticationUtil.setFullyAuthenticatedUser(user);
if (nodeService.exists(entry))
{
RestoreNodeReport report = restoreArchivedNode(entry);
// Append the results (it is synchronized)
results.add(report);
}
}
@Override
public void afterProcess() throws Throwable
{
AuthenticationUtil.popAuthentication();
}
};
doBulkOperation(user, originalStoreRef, worker);
return results;
}
/**
* Finds the archive location for nodes that were deleted from the given store
* and attempt to restore each node.
*
* @see NodeService#getStoreArchiveNode(StoreRef)
* @see #restoreArchivedNode(NodeRef, NodeRef, QName, QName)
*
* @deprecated In 3.4: to be removed
*/
public List<RestoreNodeReport> restoreAllArchivedNodes(
final StoreRef originalStoreRef,
final NodeRef destinationNodeRef,
final QName assocTypeQName,
final QName assocQName)
{
final String user = AuthenticationUtil.getFullyAuthenticatedUser();
if (user == null)
{
throw new IllegalStateException("Cannot restore as there is no authenticated user.");
}
final List<RestoreNodeReport> results = Collections.synchronizedList(new ArrayList<RestoreNodeReport>(1000));
/**
* Worker that restores each node
*/
BatchProcessWorker<NodeRef> worker = new BatchProcessor.BatchProcessWorkerAdaptor<NodeRef>()
{
@Override
public void beforeProcess() throws Throwable
{
AuthenticationUtil.pushAuthentication();
}
public void process(NodeRef nodeRef) throws Throwable
{
AuthenticationUtil.setFullyAuthenticatedUser(user);
if (nodeService.exists(nodeRef))
{
RestoreNodeReport report = restoreArchivedNode(nodeRef, destinationNodeRef, assocTypeQName, assocQName);
// Append the results (it is synchronized)
results.add(report);
}
}
@Override
public void afterProcess() throws Throwable
{
AuthenticationUtil.popAuthentication();
}
};
doBulkOperation(user, originalStoreRef, worker);
return results;
}
/**
* This is the primary purge methd that all purge methods fall back on. It isolates the delete
* work in a new transaction.