Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.connect.update.impl.task.commands
Class ParametrizedCopy

java.lang.Object
  extended by org.nuxeo.connect.update.impl.task.AbstractCommand
      extended by org.nuxeo.connect.update.impl.task.commands.Copy
          extended by org.nuxeo.connect.update.impl.task.commands.ParametrizedCopy
All Implemented Interfaces:
Command

public class ParametrizedCopy
extends Copy

Copy a file to the given target directory or file. If the target is a directory the file name is preserved. If the target file exists it will be replaced if overwrite is true otherwise the command validation fails.

If md5 is set then the copy command will be validated only if the target file has the same md5 as the one specified in the command.

The Copy command has as inverse either Delete either another Copy command. If the file was copied without overwriting then Delete is the inverse (with a md5 set to the one of the copied file). If the file was overwritten then the Copy command has an inverse another copy command with the md5 to the one of the copied file and the overwrite flag to true. The file to copy will be the backup of the overwritten file.

Author:
Bogdan Stefanescu

Field Summary
static String ID
           
 
Constructor Summary
ParametrizedCopy()
           
ParametrizedCopy(File file, File tofile, String md5, boolean overwrite)
           
 
Method Summary
 
Methods inherited from class org.nuxeo.connect.update.impl.task.commands.Copy
readFrom, writeTo
 
Methods inherited from class org.nuxeo.connect.update.impl.task.AbstractCommand
getId, ignore, initialize, isPostInstall, run, setFail, setIgnore, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

ParametrizedCopy

public ParametrizedCopy()

ParametrizedCopy

public ParametrizedCopy(File file,
                        File tofile,
                        String md5,
                        boolean overwrite)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.