com.xebialabs.deployit.steps
Class CopyStep
java.lang.Object
com.xebialabs.deployit.steps.HostSessionStep
com.xebialabs.deployit.steps.CopyStep
- All Implemented Interfaces:
- Step, java.io.Serializable
public class CopyStep
- extends HostSessionStep
Steps that copies files and directories from one host to another.
- See Also:
- Serialized Form
|
Constructor Summary |
CopyStep(Host sourceHost,
java.lang.String sourceLocation,
Host destinationHost,
java.lang.String destinationLocation)
Creates a new CopyStep that will not create a top-level directory and that will do no placeholder
replacement. |
CopyStep(Host sourceHost,
java.lang.String sourceLocation,
Host destinationHost,
java.lang.String destinationLocation,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new CopyStep that copies a file from a location on a source host to a location on a
destination host, replacing placeholders in the source file using the given properties. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sourceLocation
protected java.lang.String sourceLocation
destinationLocation
protected java.lang.String destinationLocation
destinationHost
protected Host destinationHost
properties
protected java.util.Map<java.lang.String,java.lang.String> properties
CopyStep
public CopyStep(Host sourceHost,
java.lang.String sourceLocation,
Host destinationHost,
java.lang.String destinationLocation)
- Creates a new CopyStep that will not create a top-level directory and that will do no placeholder
replacement.
- See Also:
CopyStep#CopyStep(Host, String, Host, String, boolean, Map)
CopyStep
public CopyStep(Host sourceHost,
java.lang.String sourceLocation,
Host destinationHost,
java.lang.String destinationLocation,
java.util.Map<java.lang.String,java.lang.String> properties)
- Creates a new CopyStep that copies a file from a location on a source host to a location on a
destination host, replacing placeholders in the source file using the given properties. Placeholder replacement
is strict, meaning that any if any placeholders in the source file cannot be replaced (i.e. no corresponding
value is found) an error is thrown.
Assumes that the source file is a text file, not a directory or other type of file that cannot be read
into a string.
- Parameters:
sourceHost - the source hostsourceLocation - the location on the source hostdestinationHost - the destination hostdestinationLocation - the location on the destination hostcreateToplevelDirectory - indicates if the top-level directory should be created if non-existentproperties - the properties to be used for placeholder replacement
execute
public boolean execute(StepExecutionContext ctx)
- Parameters:
ctx - Context info required to execute the step.
- Returns:
- execution successful or failed.
Copyright © 2010. All Rights Reserved.