|
EAC Toolkit 3.2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.soleng.eac.toolkit.base.EacElement com.endeca.soleng.eac.toolkit.base.Provisionable com.endeca.soleng.eac.toolkit.script.Script
public class Script
This class contains logic associated with implementing an EAC script. Typical script implementation is expected to be written as BeanShell script and interpreted and executed by this object. However, this object also supports extension and implementation of the scriptImplementation method as an alternate form of implementing script logic. This class implements methods to communicate with the EAC's script control service, which allows execution of provisioned scripts. However, script execution through this object does not go through the EAC's script control service. Instead, scripts are executed directly in this JVM, though they may also be provisioned and executed through the EAC's script control web service.
Field Summary |
---|
Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
---|
appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir |
Constructor Summary | |
---|---|
Script()
|
Method Summary | |
---|---|
com.endeca.eac.client.ScriptType |
buildEacStub()
Builds a ScriptType object to send to the EAC. |
bsh.Interpreter |
getBeanShellInterpreter()
|
java.lang.String |
getBeanShellScript()
|
java.lang.String |
getProvisionedScriptCommand()
|
com.endeca.eac.client.StateType |
getStatus()
Retrieves the status of the script. |
com.endeca.eac.client.ScriptType |
instantiateEacStub()
|
boolean |
isActive()
Returns true if the script is active (i.e. |
boolean |
isDefined()
Extending objects will implement this method, returning true if the provisioned object's definition is set in the EAC. |
boolean |
isDefinitionChanged()
Extending objects will implement this method, returning true if the provisioned object's definition has changed in the EAC. |
boolean |
isFailed()
Returns true if the script failed when it was run most recently. |
void |
removeDefinition()
Extending objects will implement this method to remove the definition of the provisioned object from the EAC. |
void |
run()
Main execution method for the script. |
void |
runBeanShellScript(java.lang.String script)
Invokes the specified String as a BeanShell script. |
void |
scriptImplementation()
Extending objects will override this method with script logic. |
void |
setBeanShellInterpreter(bsh.Interpreter beanShellInterpreter)
|
void |
setBeanShellScript(java.lang.String beanShellScript)
|
void |
setDefinition()
Extending objects will implement this method to add the definition of the provisioned object to the EAC. |
void |
setProvisionedScriptCommand(java.lang.String provisionedScriptCommand)
|
void |
updateDefinition()
Extending objects will implement this method to update the definition of the provisioned object in the EAC. |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.Provisionable |
---|
getAppDefinitionFromEac, getCachedAppDefinition, getProvisioningPort, invalidateCachedAppDefinition, setCachedAppDefinition |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
---|
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setElementId, setLockManager, setLogDir, setSslEnabled, setWorkingDir |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Script()
Method Detail |
---|
public void run() throws AppControlException
AppControlException
- Thrown if the script fails with a known error.public void scriptImplementation() throws AppControlException
AppControlException
- Thrown if an exception occurs while executing
logic implemented in overriding methods.public void runBeanShellScript(java.lang.String script) throws AppControlException
script
- BeanShell script string.
AppControlException
- If an exception is caught while invoking the
BeanShell script.public boolean isDefined() throws EacCommunicationException, EacProvisioningException
Provisionable
isDefined
in class Provisionable
EacCommunicationException
- If a communication error occurs while
retrieving the provisioning port.
EacProvisioningException
- If an error occurs while trying to retrieve
the object definition from the EAC.public boolean isDefinitionChanged() throws EacCommunicationException, EacProvisioningException
Provisionable
isDefinitionChanged
in class Provisionable
EacCommunicationException
- If a communication error occurs while
retrieving the provisioning port.
EacProvisioningException
- If an error occurs while trying to retrieve
the object definition from the EAC.public void removeDefinition() throws EacCommunicationException, EacComponentControlException
Provisionable
removeDefinition
in class Provisionable
EacCommunicationException
- If a communication error occurs while
retrieving the provisioning port.
EacComponentControlException
- If an error occurs while trying to
start, stop or check the status of a component.public void setDefinition() throws EacCommunicationException
Provisionable
setDefinition
in class Provisionable
EacCommunicationException
- If a communication error occurs while
retrieving the provisioning port.public void updateDefinition() throws EacCommunicationException, EacComponentControlException, EacProvisioningException, AppConfigurationException
Provisionable
updateDefinition
in class Provisionable
EacCommunicationException
- If a communication error occurs while
retrieving the provisioning port.
EacComponentControlException
- If an error occurs while trying to
start, stop or check the status of a component.
EacProvisioningException
- If an error occurs while provisioning the
object or an associated object.
AppConfigurationException
- If an object's configuration is invalid.public com.endeca.eac.client.ScriptType buildEacStub()
public com.endeca.eac.client.ScriptType instantiateEacStub()
public boolean isActive() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the script from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the script.public boolean isFailed() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the script from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the script.public com.endeca.eac.client.StateType getStatus() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the script from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the script.public java.lang.String getBeanShellScript()
public void setBeanShellScript(java.lang.String beanShellScript)
public bsh.Interpreter getBeanShellInterpreter()
public void setBeanShellInterpreter(bsh.Interpreter beanShellInterpreter)
public java.lang.String getProvisionedScriptCommand()
public void setProvisionedScriptCommand(java.lang.String provisionedScriptCommand)
|
EAC Toolkit 3.2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@VERSION PRODUCT: EAC Toolkit (eacToolkit) VERSION: 3.2.1 BUILD: NONE ARCH_OS: n/a DATE: 2011-11-10T16:21:05-0500