org.alfresco.repo.transfer
Class UnitTestTransferManifestNodeFactory

java.lang.Object
  extended by org.alfresco.repo.transfer.UnitTestTransferManifestNodeFactory
All Implemented Interfaces:
TransferManifestNodeFactory

public class UnitTestTransferManifestNodeFactory
extends java.lang.Object
implements TransferManifestNodeFactory

This is a test class to enable unit testing on a single machine. Since the single machine will already have the target node.


Constructor Summary
UnitTestTransferManifestNodeFactory(TransferManifestNodeFactory realFactory)
          Create a new UnitTestTransferManifestNodeFactory
 
Method Summary
 TransferManifestNode createTransferManifestNode(org.alfresco.service.cmr.repository.NodeRef nodeRef, TransferDefinition definition)
          Create an object that represents the specified node in a form that can be used to transfer it elsewhere.
 TransferManifestNode createTransferManifestNode(org.alfresco.service.cmr.repository.NodeRef nodeRef, TransferDefinition definition, boolean forceDelete)
          Create an object that represents the specified node in a form that can be used to transfer it elsewhere
 org.alfresco.service.cmr.repository.NodeRef getMappedNodeRef(org.alfresco.service.cmr.repository.NodeRef node)
          Get the mapped node ref
 org.alfresco.service.cmr.repository.Path getMappedPath(org.alfresco.service.cmr.repository.Path from)
          Get mapped path
 java.util.List getPathMap()
           
 void setPathMap(java.util.List pathMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitTestTransferManifestNodeFactory

public UnitTestTransferManifestNodeFactory(TransferManifestNodeFactory realFactory)
Create a new UnitTestTransferManifestNodeFactory

Parameters:
realFactory -
Method Detail

createTransferManifestNode

public TransferManifestNode createTransferManifestNode(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                       TransferDefinition definition)
Description copied from interface: TransferManifestNodeFactory
Create an object that represents the specified node in a form that can be used to transfer it elsewhere. Calling this operation is identical to calling TransferManifestNodeFactory.createTransferManifestNode(NodeRef, TransferDefinition, boolean) specifying false as the value of the forceDelete parameter.

Specified by:
createTransferManifestNode in interface TransferManifestNodeFactory
Parameters:
nodeRef - The identifier of the node to be distilled for transfer
definition - The transfer definition against which the node is being transferred
Returns:
An object that holds a snapshot of the state of the specified node suitable for transfer elsewhere.

createTransferManifestNode

public TransferManifestNode createTransferManifestNode(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                       TransferDefinition definition,
                                                       boolean forceDelete)
Description copied from interface: TransferManifestNodeFactory
Create an object that represents the specified node in a form that can be used to transfer it elsewhere

Specified by:
createTransferManifestNode in interface TransferManifestNodeFactory
Parameters:
nodeRef - The identifier of the node to be distilled for transfer
definition - The transfer definition against which the node is being transferred
forceDelete - If this flag is set then the returned TransferManifestNode object will represent the removal of the specified node, even if the node still exists in this repository. This allows a node to be removed from the target repository even if it hasn't been removed in the source repository.
Returns:
An object that holds a snapshot of the state of the specified node suitable for transfer elsewhere.

getMappedNodeRef

public org.alfresco.service.cmr.repository.NodeRef getMappedNodeRef(org.alfresco.service.cmr.repository.NodeRef node)
Get the mapped node ref

Parameters:
node -
Returns:
the mapped node ref or null;

getMappedPath

public org.alfresco.service.cmr.repository.Path getMappedPath(org.alfresco.service.cmr.repository.Path from)
Get mapped path


setPathMap

public void setPathMap(java.util.List pathMap)

getPathMap

public java.util.List getPathMap()


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