com.xebialabs.deployit.steps
Class DeleteStep

java.lang.Object
  extended by com.xebialabs.deployit.steps.HostSessionStep
      extended by com.xebialabs.deployit.steps.DeleteStep
All Implemented Interfaces:
Step, java.io.Serializable

public class DeleteStep
extends HostSessionStep

Steps that deletes a file or a directory on a host.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xebialabs.deployit.steps.HostSessionStep
description, host
 
Constructor Summary
DeleteStep(Host host, java.lang.String pathToDelete)
          Creates a DeleteStep that deletes a file/directory on a remote host.
DeleteStep(Host host, java.lang.String pathToDelete, java.lang.String exclusionPattern)
          Creates a DeleteStep that delete a file/directory on a remote host.
 
Method Summary
 boolean execute(StepExecutionContext ctx)
           
 
Methods inherited from class com.xebialabs.deployit.steps.HostSessionStep
getDescription, getHostSession, setDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteStep

public DeleteStep(Host host,
                  java.lang.String pathToDelete)
Creates a DeleteStep that deletes a file/directory on a remote host. Directories are deleted recursively.

Parameters:
host - the host
pathToDelete - the file or directory to delete.

DeleteStep

public DeleteStep(Host host,
                  java.lang.String pathToDelete,
                  java.lang.String exclusionPattern)
Creates a DeleteStep that delete a file/directory on a remote host. Directories are deleted recursively.

Parameters:
host - the host
pathToDelete - the file or directory to delete.
exclusionPattern - a pattern of files that should not be removed when doing a recursive directory deletion. See HostFile.deleteRecursively(String) for the specification of the pattern.
Method Detail

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.