org.openarchitectureware.workflow.common
Class DirectoryCleaner

java.lang.Object
  extended by org.openarchitectureware.workflow.lib.AbstractWorkflowComponent
      extended by org.openarchitectureware.workflow.lib.AbstractWorkflowComponent2
          extended by org.openarchitectureware.workflow.common.DirectoryCleaner
All Implemented Interfaces:
WorkflowComponent, WorkflowComponentWithID

public class DirectoryCleaner
extends AbstractWorkflowComponent2


Constructor Summary
DirectoryCleaner()
           
 
Method Summary
 void addExclude(java.lang.String exclude)
          Adds an exclude.
protected  void checkConfigurationInternal(Issues issues)
           
 boolean delete(java.io.File file)
          Deletes all files and subdirectories under dir.
 java.lang.String getComponentName()
          Override this method by custom components.
 java.lang.String getLogMessage()
          Returns the log message,
protected  void invokeInternal(WorkflowContext model, ProgressMonitor monitor, Issues issues)
           
 boolean isUseDefaultExcludes()
          Returns if the default excludes are used.
 void setDirectories(java.lang.String directory)
          Deprecated. Use setDirectory(String) instead
 void setDirectory(java.lang.String directory)
          Sets the directory.
 void setUseDefaultExcludes(boolean useDefaultExcludes)
          Sets if the default excludes are used.
 
Methods inherited from class org.openarchitectureware.workflow.lib.AbstractWorkflowComponent2
checkConfiguration, invoke, setSkipOnErrors
 
Methods inherited from class org.openarchitectureware.workflow.lib.AbstractWorkflowComponent
checkRequiredConfigProperty, getContainer, getId, getLocation, setContainer, setId, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryCleaner

public DirectoryCleaner()
Method Detail

setDirectories

@Deprecated
public void setDirectories(java.lang.String directory)
Deprecated. Use setDirectory(String) instead


setDirectory

public void setDirectory(java.lang.String directory)
Sets the directory.

Parameters:
directory - name of directory

getLogMessage

public java.lang.String getLogMessage()
Description copied from interface: WorkflowComponentWithID
Returns the log message,

Specified by:
getLogMessage in interface WorkflowComponentWithID
Overrides:
getLogMessage in class AbstractWorkflowComponent
Returns:
the log message
See Also:
AbstractWorkflowComponent.getLogMessage()

invokeInternal

protected void invokeInternal(WorkflowContext model,
                              ProgressMonitor monitor,
                              Issues issues)
Specified by:
invokeInternal in class AbstractWorkflowComponent2

checkConfigurationInternal

protected void checkConfigurationInternal(Issues issues)
Specified by:
checkConfigurationInternal in class AbstractWorkflowComponent2

delete

public boolean delete(java.io.File file)
Deletes all files and subdirectories under dir. Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns false.


isUseDefaultExcludes

public boolean isUseDefaultExcludes()
Returns if the default excludes are used.

Returns:
true, if the default excludes are used, otherwise false.

setUseDefaultExcludes

public void setUseDefaultExcludes(boolean useDefaultExcludes)
Sets if the default excludes are used.

Parameters:
useDefaultExcludes - If true, the default excludes are used, if false, the default excludes are ignored.

addExclude

public void addExclude(java.lang.String exclude)
Adds an exclude.

Parameters:
exclude - the exclude

getComponentName

public java.lang.String getComponentName()
Description copied from class: AbstractWorkflowComponent
Override this method by custom components.

Specified by:
getComponentName in interface WorkflowComponent
Overrides:
getComponentName in class AbstractWorkflowComponent
Returns:
Simple class name as default.
See Also:
WorkflowComponent.getComponentName()