本文整理汇总了Java中org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode类的典型用法代码示例。如果您正苦于以下问题:Java TransferManifestDeletedNode类的具体用法?Java TransferManifestDeletedNode怎么用?Java TransferManifestDeletedNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TransferManifestDeletedNode类属于org.alfresco.repo.transfer.manifest包,在下文中一共展示了TransferManifestDeletedNode类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildNodeContext
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
public static NodeContext buildNodeContext(TransferManifestDeletedNode node, FileTransferInfoEntity nodeEntity)
{
NodeContext result = new NodeContext();
//Pull some useful information out of the supplied node object
result.nodeId = node.getNodeRef().toString();
//Look up the node id in our database and extract some info from what we find
result.isNew = (nodeEntity == null);
result.currentParentPath = result.isNew ? null : nodeEntity.getPath();
result.currentParentId = result.isNew ? null : nodeEntity.getParent();
result.currentContentUrl = result.isNew ? null : nodeEntity.getContentUrl();
result.currentName = result.isNew ? null : nodeEntity.getContentName();
//Look up the target parent node id in our database and extract some info from what we find
result.tempName = getNextTempName();
return result;
}
示例2: processTransferManifestNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
public final void processTransferManifestNode(TransferManifestDeletedNode node)
{
incrementNodeCounter();
try
{
processNode(node);
}
catch (Throwable ex)
{
handleException(node, ex);
}
}
示例3: createDeletedNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
/**
* @param nodeToDelete
* @return
*/
private TransferManifestDeletedNode createDeletedNode(TransferManifestNode nodeToDelete)
{
TransferManifestDeletedNode deletedNode = new TransferManifestDeletedNode();
deletedNode.setNodeRef(nodeToDelete.getNodeRef());
deletedNode.setParentPath(nodeToDelete.getParentPath());
deletedNode.setPrimaryParentAssoc(nodeToDelete.getPrimaryParentAssoc());
deletedNode.setUuid(nodeToDelete.getUuid());
return deletedNode;
}
示例4: processNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
protected void processNode(TransferManifestDeletedNode node)
{
//NOOP
}
示例5: processNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
/**
*
*/
protected void processNode(TransferManifestDeletedNode node)
{
// This is a deleted node. First we need to check whether it has already been deleted in this repo
// too by looking in the local archive store. If we find it then we need not do anything.
// If we can't find it in our archive store then we'll see if we can find a corresponding node in the
// store in which its old parent lives.
// If we can find a corresponding node then we'll delete it.
// If we can't find a corresponding node then we'll do nothing.
logComment("Primary Processing incoming deleted node: " + node.getNodeRef());
ChildAssociationRef origPrimaryParent = node.getPrimaryParentAssoc();
NodeRef origNodeRef = new NodeRef(origPrimaryParent.getParentRef().getStoreRef(), node.getNodeRef().getId());
CorrespondingNodeResolver.ResolvedParentChildPair resolvedNodes = nodeResolver.resolveCorrespondingNode(
origNodeRef, origPrimaryParent, node.getParentPath());
// Does a corresponding node exist in this repo?
if (resolvedNodes.resolvedChild != null)
{
NodeRef exNode = resolvedNodes.resolvedChild;
// Yes, it does. Delete it.
if (log.isDebugEnabled())
{
log.debug("Incoming deleted noderef " + node.getNodeRef()
+ " has been resolved to existing local noderef " + exNode
+ " - deleting");
}
logDeleted(node.getNodeRef(), exNode, nodeService.getPath(exNode).toString());
logSummaryDeleted(node.getNodeRef(), exNode, nodeService.getPath(exNode).toString());
delete(node, exNode);
}
else
{
logComment("Unable to find corresponding node for incoming deleted node: " + node.getNodeRef());
if (log.isDebugEnabled())
{
log.debug("Incoming deleted noderef has no corresponding local noderef: " + node.getNodeRef()
+ " - ignoring");
}
}
}
示例6: delete
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
/**
* Delete this node
* @param node TransferManifestDeletedNode
* @param nodeToDelete NodeRef
*/
protected void delete(TransferManifestDeletedNode node, NodeRef nodeToDelete)
{
if(alienProcessor.isAlien(nodeToDelete))
{
logComment("Node contains alien content and can't be deleted: " + nodeToDelete);
if (log.isDebugEnabled())
{
log.debug("Node to be deleted is alien prune rather than delete: " + nodeToDelete);
}
alienProcessor.pruneNode(nodeToDelete, header.getRepositoryId());
}
else
{
/**
* Check that if the destination is "from" the transferring repo if it is "from" another repo then ignore
*/
if(nodeService.hasAspect(nodeToDelete, TransferModel.ASPECT_TRANSFERRED))
{
String fromRepository = (String)nodeService.getProperty(nodeToDelete, TransferModel.PROP_FROM_REPOSITORY_ID);
String transferringRepo = header.getRepositoryId();
if(fromRepository != null && transferringRepo != null)
{
if(!fromRepository.equalsIgnoreCase(transferringRepo))
{
logComment("Not deleting local node (not from the transferring repository): " + nodeToDelete);
return;
}
}
}
// Not alien or from another repo - delete it.
logDeleted(node.getNodeRef(), nodeToDelete, nodeService.getPath(nodeToDelete).toString());
logSummaryDeleted(node.getNodeRef(), nodeToDelete, nodeService.getPath(nodeToDelete).toString());
nodeService.deleteNode(nodeToDelete);
if (log.isDebugEnabled())
{
log.debug("Deleted local node: " + nodeToDelete);
}
}
}
示例7: processNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
protected void processNode(TransferManifestDeletedNode node)
{
// NOOP
}
开发者ID:Alfresco,项目名称:alfresco-file-transfer-receiver,代码行数:5,代码来源:FileTransferReceiverRequisiteManifestProcessor.java
示例8: processNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
@Override
protected void processNode(TransferManifestDeletedNode node) throws TransferProcessingException
{
TransferProgressMonitor monitor = fileTransferReceiver.getProgressMonitor();
String nodeId = node.getNodeRef().toString();
if (isDebugEnabled)
{
log.debug("Processing deleted node " + nodeId);
}
boolean nodeIsRoot = nodeId.equals(fileTransferReceiver.getTransferRootNode());
if (nodeIsRoot)
{
monitor.logComment(getTransferId(), "We have received the root node. Skipping " + nodeId);
return;
}
FileTransferInfoEntity nodeEntity = dbHelper.findFileTransferInfoByNodeRef(nodeId);
if (nodeEntity != null)
{
NodeContext ctx = NodeContext.buildNodeContext(node, nodeEntity);
String pathPrefix = fileTransferReceiver.getDefaultReceivingroot();
String pathOfDeletedFile = pathPrefix + nodeEntity.getPath()
+ nodeEntity.getContentName();
File fileToDelete = new File(pathOfDeletedFile);
if (fileToDelete.isDirectory())
{
if (isDebugEnabled)
{
log.debug("Processing request to delete folder " + fileToDelete.getPath());
}
//Rename the folder to a temporary name to avoid any name conflicts that may occur later.
FileTransferInfoEntity parentEntity = dbHelper.findFileTransferInfoByNodeRef(nodeEntity.getParent());
if (moveFolder(nodeEntity, parentEntity, ctx.tempName, pathPrefix))
{
if (isDebugEnabled)
{
log.debug("Recording request to delete folder " + fileToDelete.getPath());
}
recordFolderDelete(ctx);
}
}
else
{
if (isDebugEnabled)
{
log.debug("Processing request to delete file " + fileToDelete.getPath());
}
boolean success = fileToDelete.delete();
if (success)
{
if (isDebugEnabled)
{
log.debug("Successfully deleted " + fileToDelete.getPath());
}
dbHelper.deleteNodeByNodeRef(nodeId);
if (isDebugEnabled)
{
log.debug("Updated database to reflect deletion.");
}
monitor.logDeleted(getTransferId(), node.getNodeRef(), node.getNodeRef(), fileToDelete.getPath());
}
else
{
throw new TransferFatalException(MSG_FAILED_TO_DELETE_FILE, new Object[] {nodeId, pathOfDeletedFile});
}
}
}
}
示例9: processTransferManifestNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void processTransferManifestNode(TransferManifestDeletedNode node)
{
//NOOP
}
示例10: processNode
import org.alfresco.repo.transfer.manifest.TransferManifestDeletedNode; //导入依赖的package包/类
protected abstract void processNode(TransferManifestDeletedNode node) throws TransferProcessingException;