com.endeca.soleng.eac.toolkit.utility.perl
Class CreateDirUtility
java.lang.Object
com.endeca.soleng.eac.toolkit.base.EacElement
com.endeca.soleng.eac.toolkit.utility.Utility
com.endeca.soleng.eac.toolkit.utility.ShellUtility
com.endeca.soleng.eac.toolkit.utility.perl.PerlUtility
com.endeca.soleng.eac.toolkit.utility.perl.PerlInlineScriptUtility
com.endeca.soleng.eac.toolkit.utility.perl.CreateDirUtility
public class CreateDirUtility
- extends PerlInlineScriptUtility
Utility used to create a directory. This utility will conditionally create
a directory (and all parent directories in the path up to that directory),
if the directory or any part of the path don't already exist. If the path
leads to an existing file, rather than a directory, this utility will return
without taking any action and withour error.
- Author:
- sshusteff
Constructor Summary |
CreateDirUtility(java.lang.String appName,
java.lang.String eacHost,
int eacPort,
boolean sslEnabled)
Default (inherited) constructor. |
Method Summary |
java.lang.String |
getDir()
|
java.lang.String |
getHost()
|
void |
init(java.lang.String host,
java.lang.String dir)
Convenience wrapper of init(host, dir, workingDir) that specifies
a null workingDir. |
void |
init(java.lang.String host,
java.lang.String dir,
java.lang.String workingDir)
CreateDir initializer. |
void |
run()
Runs the utility synchronously. |
void |
setDir(java.lang.String dir)
|
void |
setHost(java.lang.String host)
|
Methods inherited from class com.endeca.soleng.eac.toolkit.utility.Utility |
getDirContents, getMaxMissedStatusChecksAllowed, getMaxWaitTimeSeconds, getMinWaitTimeSeconds, getNonNullPositiveLongValueOrDefault, getNumMissedStatusChecks, getSlowPollingIntervalMs, getStandardPollingIntervalMs, getStatus, incrementMissedStatusQueries, initializeEacStub, isActive, isFailed, runInParallel, setElementId, setMaxMissedStatusQueriesAllowed, setMaxWaitSeconds, setMinWaitSeconds, setNumMissedStatusChecks, setPollingIntervalMs, setSlowPollingIntervalMs, start, stop, waitForFinished |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setLockManager, setLogDir, setSslEnabled, setWorkingDir |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateDirUtility
public CreateDirUtility(java.lang.String appName,
java.lang.String eacHost,
int eacPort,
boolean sslEnabled)
throws AppConfigurationException
- Default (inherited) constructor.
- Throws:
AppConfigurationException
- If the application name or EAC host is null.
init
public void init(java.lang.String host,
java.lang.String dir)
- Convenience wrapper of init(host, dir, workingDir) that specifies
a null workingDir.
- Parameters:
host
- ID of the host on which to execute the command.dir
- Directory to create.
init
public void init(java.lang.String host,
java.lang.String dir,
java.lang.String workingDir)
- CreateDir initializer.
- Parameters:
host
- ID of the host on which to execute the command.dir
- Directory to create.workingDir
- Working directory from which to execute the command.
run
public void run()
throws EacCommunicationException,
EacComponentControlException
- Description copied from class:
Utility
- Runs the utility synchronously. Starts the utility, polls for the status
until the utility fails or stops.
- Overrides:
run
in class Utility
- Throws:
EacCommunicationException
- If a communication error occurs while
requesting the status of the utility from the EAC.
EacComponentControlException
- If an error occurs while trying to
start the utility.
getDir
public java.lang.String getDir()
setDir
public void setDir(java.lang.String dir)
getHost
public java.lang.String getHost()
setHost
public void setHost(java.lang.String host)
Copyright © 2011 Endeca Technologies, Inc. All Rights Reserved.
@VERSION
PRODUCT: EAC Toolkit (eacToolkit)
VERSION: 3.2.1
BUILD: NONE
ARCH_OS: n/a
DATE: 2011-11-10T16:21:05-0500