Interface ScriptTask
- All Superinterfaces:
ScheduleTask
Definition of a task to execute a script.
- Since:
- 4.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable StringIf this script uses a custom userConnection, the user login of theConnectionis returned,nullis returned if a system connection is used.Provides an executable defined with this script.A set of paramaters set for thisScriptTaskProvides the defined properties.the source code of this scriptgetType()theTypeof this scriptbooleanReturnstrueif this script uses a custom userConnection,falseis returned if a systemConnectionis used.voidremoveParameter(@NotNull String name) Removes a parameter having the given name.voidsetParameter(@NotNull String name, @Nullable String value) Set a parameter value having the given name to the provided value.voidSets the source code of this script.voidsetType(ScriptTask.Type type) Sets the script type.voidsetUseCustomConnection(@NotNull String login, @NotNull String password) Use a custom userConnectionto execute this script.voidUse a default systemConnectionto execute this script and clear all custom connection credentials.Methods inherited from interface de.espirit.firstspirit.access.schedule.ScheduleTask
checkParams, getClusterNodeName, getDescription, getExecuteInFault, getExecuteParallel, getName, getRemoteTaskType, getScheduleEntry, getTemplate, hasTemplate, isActive, isExecuteOnClusterNode, isProjectTask, setActive, setClusterNodeName, setDescription, setExecuteInFault, setExecuteOnClusterNode, setExecuteParallel, setName, setTemplate, test
-
Method Details
-
getType
ScriptTask.Type getType()theTypeof this script- Since:
- 4.0
-
setType
Sets the script type.- Parameters:
type- theTypeof this script- Since:
- 4.0
-
getSource
String getSource()the source code of this script- Since:
- 4.0
-
setSource
Sets the source code of this script.- Parameters:
value- the source code of this script- Since:
- 4.0
-
getProperties
Properties getProperties()Provides the defined properties.- Returns:
- The properties.
- Since:
- 4.0
-
getParameters
A set of paramaters set for thisScriptTask- Since:
- 4.0
-
setParameter
Set a parameter value having the given name to the provided value.- Parameters:
name- The parameter's name.value- The value to be set.- Since:
- 4.0
-
removeParameter
Removes a parameter having the given name.- Parameters:
name- The parameter's name.- Since:
- 4.0
-
getExecutable
Executable getExecutable()Provides an executable defined with this script.- Returns:
- An executable.
- Since:
- 4.0.120
-
setUseCustomConnection
void setUseCustomConnection(@NotNull @NotNull String login, @NotNull @NotNull String password) throws AuthenticationException Use a custom userConnectionto execute this script.- Parameters:
login- The connection user loginpassword- The connection user password- Throws:
AuthenticationException- Thrown if the authentication of the user failed- Since:
- 5.2.515
-
getUseCustomConnection
boolean getUseCustomConnection()Returnstrueif this script uses a custom userConnection,falseis returned if a systemConnectionis used.- Returns:
Trueif this script used a custom user connection- Since:
- 5.2.515
-
getCustomConnectionLogin
If this script uses a custom userConnection, the user login of theConnectionis returned,nullis returned if a system connection is used.- Returns:
- Returns the user login of the custom
Connection,nullif a system connection is used. - Since:
- 5.2.515
-
setUseSystemConnection
void setUseSystemConnection()Use a default systemConnectionto execute this script and clear all custom connection credentials.- Since:
- 5.2.515
-