public interface ScheduleStorage
SpecialistsBroker#requireSpecialist(ServicesBroker.TYPE).getService(AdminService.class).getScheduleStorage()
.AdminService.getScheduleStorage()
Modifier and Type | Field and Description |
---|---|
static String |
GENERATE_FULL
Name for default full generation task.
|
static String |
GENERATE_PARTLY
Name for default partial generation task.
|
Modifier and Type | Method and Description |
---|---|
ScheduleEntry |
copyScheduleEntry(ScheduleEntry scheduleEntry,
Project project)
Copies the given
scheduleEntry to another project or to server scoped,
if project is null . |
ScheduleEntry |
createScheduleEntry(String scheduleEntryName)
Creates a new schedule entry for server scoped actions.
|
ScheduleEntry |
createScheduleEntry(String scheduleEntryName,
Project project)
Creates a new schedule entry for the provided project.
|
ScheduleTaskTemplate |
createScheduleTaskTemplate()
Creates a new schedule task template which can be used for project or server scoped actions.
|
InputStream |
getDefaultMailText()
Returns the default mail text used for
MailTask . |
List<ScheduleEntryControl> |
getHistory(Date from,
Date until,
int maxCount,
boolean includeProjectEntries)
Get the execution history of server schedule entries.
|
List<ScheduleEntryControl> |
getHistory(Date from,
Date until,
int maxCount,
Project project)
Get the execution history of schedule entries of the given project.
|
List<ScheduleEntry> |
getQueuedEntries()
Returns the list schedule entries that would be executed in the future.
|
List<ScheduleEntryControl> |
getRunningEntries()
Returns a list of currently running controllable schedule entries.
|
List<ScheduleEntry> |
getScheduleEntries(boolean includeProjectEntries)
Returns a list of all (
includeProjectEntries == true ) or
only server scoped ((includeProjectEntries == false )) schedule entries. |
List<ScheduleEntry> |
getScheduleEntries(Project project)
Returns a list of schedule entries depending to given
project . |
ScheduleEntry |
getScheduleEntry(long id)
Returns the schedule entry specified by the given id.
|
ScheduleEntry |
getScheduleEntry(Project project,
String name)
Returns the specified schedule entry or
null if it couldn't be found. |
ScheduleTaskTemplate |
getScheduleTaskTemplate(long id)
Returns the schedule task template with the given id or
null for an unknown id. |
List<ScheduleTaskTemplate> |
getScheduleTaskTemplates(Project project)
Returns a list of all schedule task templates for given
project . |
static final String GENERATE_FULL
static final String GENERATE_PARTLY
@NotNull ScheduleTaskTemplate createScheduleTaskTemplate()
ScheduleTaskTemplate.setProject(Project)
to change the created server scoped schedule task template
to a project scoped.
The new ScheduleTaskTemplate
is locked. Use Lockable.save()
and
Lockable.unlock()
to persist your settings.ScheduleTaskTemplate
.ScheduleTaskTemplate.setProject(Project)
,
Lockable.save()
,
Lockable.unlock()
@Nullable ScheduleTaskTemplate getScheduleTaskTemplate(long id)
null
for an unknown id.id
- Schedule task template id.ScheduleTaskTemplate
or null
for an unknown id.@NotNull List<ScheduleTaskTemplate> getScheduleTaskTemplates(@Nullable Project project)
project
. If project
is null
the returned value is a list of all server scoped schedule task templates.project
- The Project
or null
for server scoped schedule task templates.@NotNull ScheduleEntry createScheduleEntry(@NotNull String scheduleEntryName)
createScheduleEntry(String, Project)
. ScheduleEntry
is locked.
Use Lockable.save()
and Lockable.unlock()
to persist your settings.scheduleEntryName
- The name
of the new schedule entry.ScheduleEntry
.createScheduleEntry(String, Project)
,
Lockable.save()
,
Lockable.unlock()
@NotNull ScheduleEntry createScheduleEntry(@NotNull String scheduleEntryName, @Nullable Project project)
null
the returned
schedule entry has server scope (and creation is only allowed for server admins, else you have to be project
admin).ScheduleEntry
is locked.
Use Lockable.save()
and Lockable.unlock()
to persist your settings.scheduleEntryName
- The name
of the new schedule entry.project
- The project this schedule entry is assigned to or null
for a server schedule entry.ScheduleEntry
.createScheduleEntry(String)
,
Lockable.save()
,
Lockable.unlock()
@NotNull ScheduleEntry copyScheduleEntry(@NotNull ScheduleEntry scheduleEntry, @Nullable Project project)
scheduleEntry
to another project or to server scoped,
if project
is null
.
The copy is persistent and not locked.scheduleEntry
- The schedule entry to copy.project
- The destination Project
or null
to make a server scoped schedule entry.ScheduleEntry
.@NotNull List<ScheduleEntry> getScheduleEntries(boolean includeProjectEntries)
includeProjectEntries == true
) or
only server scoped ((includeProjectEntries == false
)) schedule entries.includeProjectEntries
- If true
, the list contains all schedule entries, if false
the list covers the server scoped schedule entries.@NotNull List<ScheduleEntry> getScheduleEntries(@NotNull Project project)
project
.project
- The Project
which entries should be returned.@Nullable ScheduleEntry getScheduleEntry(@NotNull Project project, String name)
null
if it couldn't be found.project
- The Project
which entries should be scanned.name
- The schedule entry name
.null
if it couldn't be found.@NotNull List<ScheduleEntryControl> getRunningEntries()
@NotNull List<ScheduleEntry> getQueuedEntries()
paralle execution mode
is set to DISALLOWED_WAIT
.@NotNull List<ScheduleEntryControl> getHistory(Date from, Date until, int maxCount, boolean includeProjectEntries)
from
- Start date, only entries which were started at or after this date will be contained in the result.until
- End date, only entries which were started at or before this date will be contained in the result.maxCount
- The maximum count of entries which should be contained in the result.includeProjectEntries
- If true
, include project schedule entries, otherwise only server scoped entries are covered.@NotNull List<ScheduleEntryControl> getHistory(Date from, Date until, int maxCount, @NotNull Project project)
from
- Start date, only entries which were started at or after this date will be contained in the result.until
- End date, only entries which were started at or before this date will be contained in the result.maxCount
- The maximum count of entries which should be contained in the result.project
- The project whose schedule entries are to be displayed.@NotNull ScheduleEntry getScheduleEntry(long id)
id
- The id of requested schedule entry.IllegalArgumentException
- if no schedule entry was found with the given id.@NotNull InputStream getDefaultMailText() throws IOException
MailTask
.IOException
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210