org.alfresco.repo.jscript
Class CrossRepositoryCopy

java.lang.Object
  extended by org.alfresco.repo.processor.BaseProcessorExtension
      extended by org.alfresco.repo.jscript.BaseScopableProcessorExtension
          extended by org.alfresco.repo.jscript.CrossRepositoryCopy
All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension, Scopeable

public final class CrossRepositoryCopy
extends BaseScopableProcessorExtension

Helper bean to access Cross Repository copy services from a script context.


Field Summary
static java.lang.String BEAN_NAME
           
 
Constructor Summary
CrossRepositoryCopy()
           
 
Method Summary
 ScriptNode copy(ScriptNode src, ScriptNode dest, java.lang.String name)
          Perform a copy of a source node to the specified parent destination node.
 void setServiceRegistry(ServiceRegistry services)
          Set the service registry
 
Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScope
 
Methods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_NAME

public static final java.lang.String BEAN_NAME
See Also:
Constant Field Values
Constructor Detail

CrossRepositoryCopy

public CrossRepositoryCopy()
Method Detail

setServiceRegistry

public void setServiceRegistry(ServiceRegistry services)
Set the service registry

Parameters:
services - the service registry

copy

public ScriptNode copy(ScriptNode src,
                       ScriptNode dest,
                       java.lang.String name)
Perform a copy of a source node to the specified parent destination node. The name will be applied to the destination node copy.

Inter-store copy operations between Workspace and AVM and visa-versa are supported.

Parameters:
src - Source node instance
dest - Destination parent node instance
name - Name of the node copy
Returns:
node representing the copy if successful, null on unsupported store type.
Throws:
org.alfresco.error.AlfrescoRuntimeException - on copy error


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