Interface ScriptTask
- All Superinterfaces:
ScheduleTask
Definition of a task to execute a script.
- Since:
- 4.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
If this script uses a custom userConnection
, the user login of theConnection
is returned,null
is returned if a system connection is used.Provides an executable defined with this script.A set of paramaters set for thisScriptTask
Provides the defined properties.the source code of this scriptgetType()
theType
of this scriptboolean
Returnstrue
if this script uses a custom userConnection
,false
is returned if a systemConnection
is used.void
removeParameter
(@NotNull String name) Removes a parameter having the given name.void
setParameter
(@NotNull String name, @Nullable String value) Set a parameter value having the given name to the provided value.void
Sets the source code of this script.void
setType
(ScriptTask.Type type) Sets the script type.void
setUseCustomConnection
(@NotNull String login, @NotNull String password) Use a custom userConnection
to execute this script.void
Use a default systemConnection
to 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()theType
of this script- Since:
- 4.0
-
setType
Sets the script type.- Parameters:
type
- theType
of 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 userConnection
to 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()Returnstrue
if this script uses a custom userConnection
,false
is returned if a systemConnection
is used.- Returns:
True
if this script used a custom user connection- Since:
- 5.2.515
-
getCustomConnectionLogin
If this script uses a custom userConnection
, the user login of theConnection
is returned,null
is returned if a system connection is used.- Returns:
- Returns the user login of the custom
Connection
,null
if a system connection is used. - Since:
- 5.2.515
-
setUseSystemConnection
void setUseSystemConnection()Use a default systemConnection
to execute this script and clear all custom connection credentials.- Since:
- 5.2.515
-