Interface ScheduleEntry
- All Superinterfaces:
Lockable
Defines a single entry for a job list of
tasks
to be scheduled.- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The modes used to set theParallelExecutionMode
of this entry -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a group to execute this schedule entry.void
addUnifiedTask
(ScheduleTask task) Unifies the given task's name and adds it to this entry.void
Adds the given user which should be allowed to execute this schedule entry.<T extends ScheduleTask>
TcopyTask
(T value) Copy's the given task.<T extends ExecutionSchedule>
TcreateExecutionSchedule
(Class<T> type) Changes theExecutionSchedule
of this schedule entry to the given type.@NotNull ScheduleTask
createTask
(@NotNull ScheduleTaskTemplate template) Creates aScheduleTask
which uses all properties of the givenScheduleTaskTemplate
.<T extends ScheduleTask>
TcreateTask
(Class<T> type) Creates aScheduleTask
with typetype
.boolean
delete()
Deletes thisScheduleEntry
.execute()
Start execution on the server - locked entries will be started with the settings which are actually set on client side, all other entries will be started with the settings wich are stored on the server.boolean
true
if interactive execution is allowed,false
otherwise (default).@Nullable String
Get the description for the schedule entry.@Nullable String
getEmail()
The e-mail adress(es) which will be used for status mails for finished tasks.@NotNull ExecutionSchedule
Returns theExecutionSchedule
of thisScheduleEntry
.@NotNull String
the folder name where pages should be generated in
if folder name is null or length zero, the schedule entry id will be used on task executionaList
of typeGroup
containing all groups allowed to execute thisScheduleEntry
interactive.long
getId()
-1 for unsaved new entries@NotNull String
getName()
Returns the name of thisScheduleEntry
.@NotNull ScheduleEntry.ParallelExecutionMode
theParallelExecutionMode
of this entry.@Nullable Project
Returns the project forproject specific
tasks ornull
if it is a non project related entryReturns a list ofschedule entry controls
related to this schedule entry and currently running on the FirstSpirit server.Statistic of thisScheduleEntry
.getTasks()
Returns aList
ofScheduleTask
which belongs to this schedule entry.getUsers()
aList
of typeUser
containing all users allowed to execute thisScheduleEntry
interactive.boolean
isActive()
Returnstrue
if thisScheduleEntry
is active,false
otherwise.boolean
true
if thisScheduleEntry
has been changed,false
otherwiseboolean
Determines if the schedule entry is related to a project.boolean
isSystem()
Returnstrue
if thisScheduleEntry
is a system schedule entry or not.
System entries could not be deleted and some properties could not be changed (e.g. the name).void
removeGroup
(@NotNull Group group) Removes the given group which users shouldn't be allowed to execute the schedule entry anymore.void
removeUser
(@NotNull User user) Removes the given user who shouldn't be allowed to execute the schedule entry anymore.void
Resets the statistic of thisScheduleEntry
.void
setActive
(boolean value) Providetrue
if thisScheduleEntry
should be activated,false
otherwise.void
setAllowInteractiveExecution
(boolean value) Providetrue
if interactive execution should be allowed,false
otherwise (default).void
setDescription
(@Nullable String value) Sets the givenString
as description.void
Sets the e-mail address(es) that should be used for status mails.void
setFolderName
(@NotNull String value) Sets the folder (given by its name) where pages should be generated in.void
Provide the name of thisScheduleEntry
.void
setParallelExecutionMode
(@NotNull ScheduleEntry.ParallelExecutionMode mode) Changes theParallelExecutionMode
to the given mode.void
setProject
(@Nullable Project project) Sets the project, if the schedule entry should be related to it.
-
Method Details
-
getId
long getId()-1 for unsaved new entries- Since:
- 4.0
-
getRunningEntries
List<ScheduleEntryControl> getRunningEntries()Returns a list ofschedule entry controls
related to this schedule entry and currently running on the FirstSpirit server.- Returns:
- List<ScheduleEntryControl>
- Since:
- 4.0
-
execute
Start execution on the server - locked entries will be started with the settings which are actually set on client side, all other entries will be started with the settings wich are stored on the server.- Returns:
- ScheduleEntryControl
- Throws:
ScheduleEntryRunningException
- If theScheduleEntry
is already running.- Since:
- 4.0
-
getName
Returns the name of thisScheduleEntry
.- Returns:
- String
- Since:
- 4.0
-
setName
Provide the name of thisScheduleEntry
.- Parameters:
value
- the name- Since:
- 4.0
-
getDescription
Get the description for the schedule entry.- Since:
- 4.0
-
setDescription
Sets the givenString
as description.- Parameters:
value
- The givenString
that should be the schedule entry's description.- Since:
- 4.0
-
isActive
boolean isActive()Returnstrue
if thisScheduleEntry
is active,false
otherwise.- Returns:
true
if thisScheduleEntry
is active,false
otherwise.- Since:
- 4.0
-
isSystem
boolean isSystem()Returnstrue
if thisScheduleEntry
is a system schedule entry or not.
System entries could not be deleted and some properties could not be changed (e.g. the name).- Returns:
true
if this is a system entry,false
otherwise- Since:
- 4.0
-
setActive
void setActive(boolean value) Providetrue
if thisScheduleEntry
should be activated,false
otherwise.- Parameters:
value
-true
if thisScheduleEntry
should be activated,false
otherwise.- Since:
- 4.0
-
getTasks
List<ScheduleTask> getTasks()Returns a
List
ofScheduleTask
which belongs to this schedule entry.Please note that if a task of this list is modified, it is imperative that the task is written back to the list with
List.set(int, Object)
before callingLockable.save()
.- Returns:
- a
List
ofScheduleTask
which belongs to this schedule entry. - Since:
- 4.0
-
createTask
Creates aScheduleTask
with typetype
. To add the createdScheduleTask
to thisScheduleEntry
usegetTasks()
.add()
.- Parameters:
type
- The classScheduleTask
should have.- Returns:
- The created
ScheduleTask
- Since:
- 4.0
-
addUnifiedTask
Unifies the given task's name and adds it to this entry.- Parameters:
task
- The task to be added.- Since:
- 5.2.14
-
createTask
Creates aScheduleTask
which uses all properties of the givenScheduleTaskTemplate
. Onlyparallel execution
andactivity state
of the created instance are modifyable. To add the createdScheduleTask
to thisScheduleEntry
usegetTasks()
.add()
.- Parameters:
template
- TheScheduleTaskTemplate
to use.- Returns:
- The created
ScheduleTask
- Since:
- 4.0
-
copyTask
Copy's the given task.- Parameters:
value
- TheScheduleTask
to copy- Returns:
- The copy of the
ScheduleTask
- Since:
- 4.0
-
getEmail
The e-mail adress(es) which will be used for status mails for finished tasks.- Returns:
null
or e-mail adresses seperated with ";"- Since:
- 4.0
- See Also:
-
setEmail
Sets the e-mail address(es) that should be used for status mails.- Parameters:
value
-null
or e-mail addresses separated with ";", an empty string will be mapped tonull
- Since:
- 4.0
- See Also:
-
isProjectSchedule
boolean isProjectSchedule()Determines if the schedule entry is related to a project.- Returns:
true
for project specific tasks- Since:
- 4.0
- See Also:
-
getProject
Returns the project forproject specific
tasks ornull
if it is a non project related entry- Returns:
- the project for
project specific
tasks ornull
for server entries - Since:
- 4.0
- See Also:
-
setProject
Sets the project, if the schedule entry should be related to it.- Parameters:
project
-null
for a project independentScheduleEntry
- Since:
- 4.0
- See Also:
-
getExecutionSchedule
Returns theExecutionSchedule
of thisScheduleEntry
.- Returns:
- the
ExecutionSchedule
of thisScheduleEntry
. - Since:
- 4.0
- See Also:
-
createExecutionSchedule
Changes theExecutionSchedule
of this schedule entry to the given type.- Parameters:
type
- The classExecutionSchedule
should have.- Returns:
- The created
ExecutionSchedule
- Since:
- 4.0
- See Also:
-
isChanged
boolean isChanged()true
if thisScheduleEntry
has been changed,false
otherwise -
getStatistic
ScheduleEntryStatistic getStatistic()Statistic of thisScheduleEntry
.- Since:
- 4.0
- See Also:
-
resetStatistic
void resetStatistic()Resets the statistic of thisScheduleEntry
.- Since:
- 4.0
-
delete
boolean delete()Deletes thisScheduleEntry
. TheScheduleEntry
has to be locked before calling this method.- Returns:
true
ifScheduleEntry
has been deleted,false
otherwise.- Since:
- 4.0
-
getAllowInteractiveExecution
boolean getAllowInteractiveExecution()true
if interactive execution is allowed,false
otherwise (default).- Since:
- 4.0
-
setAllowInteractiveExecution
void setAllowInteractiveExecution(boolean value) Providetrue
if interactive execution should be allowed,false
otherwise (default).- Parameters:
value
-true
orfalse
- Since:
- 4.0
-
getUsers
aList
of typeUser
containing all users allowed to execute thisScheduleEntry
interactive.- Since:
- 4.0
-
addUser
Adds the given user which should be allowed to execute this schedule entry.- Parameters:
user
- the user which should be allowed to execute this schedule entry interactively- Since:
- 4.0
-
removeUser
Removes the given user who shouldn't be allowed to execute the schedule entry anymore.- Parameters:
user
- the user which should not be allowed to execute this schedule entry interactively anymore- Since:
- 4.0
-
getGroups
aList
of typeGroup
containing all groups allowed to execute thisScheduleEntry
interactive.- Since:
- 4.0
-
addGroup
Adds a group to execute this schedule entry.- Parameters:
group
- the group which users should be allowed to execute this schedule entry interactively- Since:
- 4.0
-
removeGroup
Removes the given group which users shouldn't be allowed to execute the schedule entry anymore.- Parameters:
group
- the group which users should not be allowed to execute this schedule entry interactively anymore- Since:
- 4.0
-
getParallelExecutionMode
theParallelExecutionMode
of this entry.- Since:
- 4.0
- See Also:
-
setParallelExecutionMode
Changes theParallelExecutionMode
to the given mode.- Parameters:
mode
- theParallelExecutionMode
- Since:
- 4.0
- See Also:
-
getFolderName
the folder name where pages should be generated in
if folder name is null or length zero, the schedule entry id will be used on task execution- Since:
- 4.0
-
setFolderName
Sets the folder (given by its name) where pages should be generated in.- Parameters:
value
- the folder name where pages should be generated in.
ifvalue
is null or length equals0
the default folder name will be used on task execution (the schedule entry id)- Since:
- 4.0
-