Interface ScheduleEntry
- All Superinterfaces:
Lockable
Defines a single entry for a job list of
tasks to be scheduled.- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe modes used to set theParallelExecutionModeof this entry -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a group to execute this schedule entry.voidaddUnifiedTask(ScheduleTask task) Unifies the given task's name and adds it to this entry.voidAdds 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 theExecutionScheduleof this schedule entry to the given type.@NotNull ScheduleTaskcreateTask(@NotNull ScheduleTaskTemplate template) Creates aScheduleTaskwhich uses all properties of the givenScheduleTaskTemplate.<T extends ScheduleTask>
TcreateTask(Class<T> type) Creates aScheduleTaskwith typetype.booleandelete()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.booleantrueif interactive execution is allowed,falseotherwise (default).@Nullable StringGet the description for the schedule entry.@Nullable StringgetEmail()The e-mail adress(es) which will be used for status mails for finished tasks.@NotNull ExecutionScheduleReturns theExecutionScheduleof thisScheduleEntry.@NotNull Stringthe 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 executionaListof typeGroupcontaining all groups allowed to execute thisScheduleEntryinteractive.longgetId()-1 for unsaved new entries@NotNull StringgetName()Returns the name of thisScheduleEntry.@NotNull ScheduleEntry.ParallelExecutionModetheParallelExecutionModeof this entry.@Nullable ProjectReturns the project forproject specifictasks ornullif it is a non project related entryReturns a list ofschedule entry controlsrelated to this schedule entry and currently running on the FirstSpirit server.Statistic of thisScheduleEntry.getTasks()Returns aListofScheduleTaskwhich belongs to this schedule entry.getUsers()aListof typeUsercontaining all users allowed to execute thisScheduleEntryinteractive.booleanisActive()Returnstrueif thisScheduleEntryis active,falseotherwise.booleantrueif thisScheduleEntryhas been changed,falseotherwisebooleanDetermines if the schedule entry is related to a project.booleanisSystem()Returnstrueif thisScheduleEntryis a system schedule entry or not.
System entries could not be deleted and some properties could not be changed (e.g. the name).voidremoveGroup(@NotNull Group group) Removes the given group which users shouldn't be allowed to execute the schedule entry anymore.voidremoveUser(@NotNull User user) Removes the given user who shouldn't be allowed to execute the schedule entry anymore.voidResets the statistic of thisScheduleEntry.voidsetActive(boolean value) Providetrueif thisScheduleEntryshould be activated,falseotherwise.voidsetAllowInteractiveExecution(boolean value) Providetrueif interactive execution should be allowed,falseotherwise (default).voidsetDescription(@Nullable String value) Sets the givenStringas description.voidSets the e-mail address(es) that should be used for status mails.voidsetFolderName(@NotNull String value) Sets the folder (given by its name) where pages should be generated in.voidProvide the name of thisScheduleEntry.voidsetParallelExecutionMode(@NotNull ScheduleEntry.ParallelExecutionMode mode) Changes theParallelExecutionModeto the given mode.voidsetProject(@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 controlsrelated 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 theScheduleEntryis 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 givenStringas description.- Parameters:
value- The givenStringthat should be the schedule entry's description.- Since:
- 4.0
-
isActive
boolean isActive()Returnstrueif thisScheduleEntryis active,falseotherwise.- Returns:
trueif thisScheduleEntryis active,falseotherwise.- Since:
- 4.0
-
isSystem
boolean isSystem()Returnstrueif thisScheduleEntryis a system schedule entry or not.
System entries could not be deleted and some properties could not be changed (e.g. the name).- Returns:
trueif this is a system entry,falseotherwise- Since:
- 4.0
-
setActive
void setActive(boolean value) Providetrueif thisScheduleEntryshould be activated,falseotherwise.- Parameters:
value-trueif thisScheduleEntryshould be activated,falseotherwise.- Since:
- 4.0
-
getTasks
List<ScheduleTask> getTasks()Returns a
ListofScheduleTaskwhich 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
ListofScheduleTaskwhich belongs to this schedule entry. - Since:
- 4.0
-
createTask
Creates aScheduleTaskwith typetype. To add the createdScheduleTaskto thisScheduleEntryusegetTasks().add().- Parameters:
type- The classScheduleTaskshould 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 aScheduleTaskwhich uses all properties of the givenScheduleTaskTemplate. Onlyparallel executionandactivity stateof the created instance are modifyable. To add the createdScheduleTaskto thisScheduleEntryusegetTasks().add().- Parameters:
template- TheScheduleTaskTemplateto use.- Returns:
- The created
ScheduleTask - Since:
- 4.0
-
copyTask
Copy's the given task.- Parameters:
value- TheScheduleTaskto 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:
nullor 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-nullor 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:
truefor project specific tasks- Since:
- 4.0
- See Also:
-
getProject
Returns the project forproject specifictasks ornullif it is a non project related entry- Returns:
- the project for
project specifictasks ornullfor server entries - Since:
- 4.0
- See Also:
-
setProject
Sets the project, if the schedule entry should be related to it.- Parameters:
project-nullfor a project independentScheduleEntry- Since:
- 4.0
- See Also:
-
getExecutionSchedule
Returns theExecutionScheduleof thisScheduleEntry.- Returns:
- the
ExecutionScheduleof thisScheduleEntry. - Since:
- 4.0
- See Also:
-
createExecutionSchedule
Changes theExecutionScheduleof this schedule entry to the given type.- Parameters:
type- The classExecutionScheduleshould have.- Returns:
- The created
ExecutionSchedule - Since:
- 4.0
- See Also:
-
isChanged
boolean isChanged()trueif thisScheduleEntryhas been changed,falseotherwise -
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. TheScheduleEntryhas to be locked before calling this method.- Returns:
trueifScheduleEntryhas been deleted,falseotherwise.- Since:
- 4.0
-
getAllowInteractiveExecution
boolean getAllowInteractiveExecution()trueif interactive execution is allowed,falseotherwise (default).- Since:
- 4.0
-
setAllowInteractiveExecution
void setAllowInteractiveExecution(boolean value) Providetrueif interactive execution should be allowed,falseotherwise (default).- Parameters:
value-trueorfalse- Since:
- 4.0
-
getUsers
aListof typeUsercontaining all users allowed to execute thisScheduleEntryinteractive.- 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
aListof typeGroupcontaining all groups allowed to execute thisScheduleEntryinteractive.- 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
theParallelExecutionModeof this entry.- Since:
- 4.0
- See Also:
-
setParallelExecutionMode
Changes theParallelExecutionModeto 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.
ifvalueis null or length equals0the default folder name will be used on task execution (the schedule entry id)- Since:
- 4.0
-