com.sapportals.wcm.service.scheduler

Interface ISchedulerService

All Superinterfaces:
IService

public interface ISchedulerService
extends IService

The scheduler service for the WCM.

Copyright 2004 SAP AG


Field Summary
static String SCHEDULER_SERVICE
          identifier for Scheduler-Service
 
Method Summary
 ISchedulerEntry addSchedulerEntry(ISchedulerEntry entry)
          Deprecated. since EP6.0SP1: new scheduler tasks are already added to the scheduler
 ISchedulerEntry createSchedulerEntry(String entryID, int priority, ISchedulerTask task, ISchedulerTimeTable timetable, ISystemList systemList, Properties properties)
          Register an ISchedulerTask to the scheduler as a new ISchedulerEntry.
 ISchedulerEntry createSchedulerEntry(String entryID, int priority, ISchedulerTask task, ISchedulerTimeTable timetable, Properties properties)
          Register an ISchedulerTask to the scheduler as a new ISchedulerEntry.
 ISequence createSequence(String id)
          Creates and registers a new task sequence.
 ISchedulerTimeTable createTimeTable()
          Create an (empty) time table.
 ISchedulerTime createTimeWildcard()
          Get a scheduler time for the current time.
 ISchedulerEntry deleteSchedulerEntry(ISchedulerEntry entry)
          Deregister an ISchedulerEntry from the scheduler.
 ISequence deleteSequence(ISequence sequence)
          Removes a sequence from the scheduler
 ISchedulerEntryList getAllSchedulerEntries()
          Deprecated. since KM 5.0 SP6. Returns an empty list.
 ISchedulerEntry[] getLocalSchedulerEntries()
          Returns all scheduler entries to be performed on system.
 ISchedulerEntry[] getSchedulerEntries()
          Returns all scheduler entries of the cluster.
 ISchedulerEntry getSchedulerEntry(String entryID)
          Get an ISchedulerEntry by ID.
 ISchedulerEntryFactory getSchedulerEntryFactory()
          Deprecated. since KM5.0SP6
 ISequence getSequence(String id)
          Returns a registered sequence or null if the sequence does not exist.
 ISequence[] getSequences()
          Returns all registered sequences.
 ISequence[] getSequences(ISchedulerEntry entry)
          Returns all sequences that contain the entry or an empty array if the entry does not belong to a sequence or the entry is not registered on the the scheduler service.
 ISchedulerEntry resumeSchedulerEntryTask(ISchedulerEntry entry)
          Resume an ISchedulerEntry (activate it from suspended).
 ISchedulerEntry suspendSchedulerEntryTask(ISchedulerEntry entry)
          Suspend an ISchedulerEntry (inactivate it).
 ISchedulerEntry updateSchedulerEntry(ISchedulerEntry entry)
          Deprecated. since EP6.0SP1
 
Methods inherited from interface com.sapportals.wcm.service.IService
getDescription, getDescription, getID
 

Field Detail

SCHEDULER_SERVICE

static final String SCHEDULER_SERVICE
identifier for Scheduler-Service

See Also:
Constant Field Values
Method Detail

createSchedulerEntry

ISchedulerEntry createSchedulerEntry(String entryID,
                                     int priority,
                                     ISchedulerTask task,
                                     ISchedulerTimeTable timetable,
                                     Properties properties)
                                     throws WcmException
Register an ISchedulerTask to the scheduler as a new ISchedulerEntry. The returned scheudler entry will only be performed on the local system by default.

Parameters:
entryID - a String with an alphanumerical unique id for the scheduler entry.
priority - an int with the priority of the task (0 is highest priority, negative values are mapped to 0, the higher the int value, the lower the priority)
task - a ISchedulerTask with the task to execute.
timetable - a ISchedulerTimeTable with the timetable for this task.
properties - some Properties for this task.
Returns:
a ISchedulerEntry with the newly created task entry.
Throws:
WcmException - if the scheduler entry could not be created (already exists or other error).

createSchedulerEntry

ISchedulerEntry createSchedulerEntry(String entryID,
                                     int priority,
                                     ISchedulerTask task,
                                     ISchedulerTimeTable timetable,
                                     ISystemList systemList,
                                     Properties properties)
                                     throws WcmException
Register an ISchedulerTask to the scheduler as a new ISchedulerEntry.

Parameters:
entryID - a String with the alphanumerical unique id for the scheduler entry.
priority - an int with the priority of the task (0 is highest priority, negative values are mapped to 0, the higher the int value, the lower the priority)
task - a ISchedulerTask with the task to execute.
timetable - a ISchedulerTimeTable with the timetable for this task.
properties - some Properties for this task.
systemList - A list of systems to run on
Returns:
a ISchedulerEntry with the newly created task entry.
Throws:
WcmException - if the scheduler entry could not be created (already exists or other error).

getSchedulerEntry

ISchedulerEntry getSchedulerEntry(String entryID)
                                  throws WcmException
Get an ISchedulerEntry by ID.

Parameters:
entryID - a String with the unique id of the entry to search for.
Returns:
a ISchedulerEntry with the entry for the given ID or null if not found.
Throws:
WcmException - if the scheduler entry could not be retrieved.

deleteSchedulerEntry

ISchedulerEntry deleteSchedulerEntry(ISchedulerEntry entry)
                                     throws WcmException
Deregister an ISchedulerEntry from the scheduler.

Parameters:
entry - a ISchedulerEntry with the entry to delete.
Returns:
the deleted ISchedulerEntry, null if not found.
Throws:
WcmException - if the entry could not be deleted.

suspendSchedulerEntryTask

ISchedulerEntry suspendSchedulerEntryTask(ISchedulerEntry entry)
                                          throws WcmException
Suspend an ISchedulerEntry (inactivate it).

Parameters:
entry - the ISchedulerEntry to suspend.
Returns:
the ISchedulerEntry with the suspended entry, null if the entry's ID could not be found.
Throws:
WcmException - if the scheduler entry could not be suspended.

resumeSchedulerEntryTask

ISchedulerEntry resumeSchedulerEntryTask(ISchedulerEntry entry)
                                         throws WcmException
Resume an ISchedulerEntry (activate it from suspended).

Parameters:
entry - the ISchedulerEntry to resume.
Returns:
the ISchedulerEntry with the resumed entry, null if the entry's ID could not be found.
Throws:
WcmException - if the scheduler entry could not be resumed.

getLocalSchedulerEntries

ISchedulerEntry[] getLocalSchedulerEntries()
                                           throws WcmException
Returns all scheduler entries to be performed on system. If no local scheduler entries exist an empty array will returned.

Returns:
The local scheduler entries.
Throws:
WcmException

getSchedulerEntries

ISchedulerEntry[] getSchedulerEntries()
                                      throws WcmException
Returns all scheduler entries of the cluster. If cluster mode is disabled, this method is equivalent to getLocalSchedulerEntries(). If no scheduler entries exist an empty array will returned.

Returns:
The scheduler entries
Throws:
WcmException

createSequence

ISequence createSequence(String id)
                         throws WcmException
Creates and registers a new task sequence.

Parameters:
id - a String with the unique id of the sequence to create.
Returns:
a ISchedulerEntry with the entry for the given ID
Throws:
WcmException - if the sequence could not be created.

getSequence

ISequence getSequence(String id)
                      throws WcmException
Returns a registered sequence or null if the sequence does not exist.

Parameters:
id - a String with the unique id of the sequence to search for.
Returns:
a ISchedulerEntry with the entry for the given ID
Throws:
WcmException - if the sequence could not be retrieved.

getSequences

ISequence[] getSequences()
                         throws WcmException
Returns all registered sequences.

Returns:
an array of all sequences registered on the scheduler service
Throws:
WcmException

deleteSequence

ISequence deleteSequence(ISequence sequence)
                         throws WcmException
Removes a sequence from the scheduler

Parameters:
sequence - The sequence to remove
Returns:
The removed sequence or null if the sequnence was not registered.
Throws:
WcmException - if the sequence could not be deleted.

getSequences

ISequence[] getSequences(ISchedulerEntry entry)
                         throws WcmException
Returns all sequences that contain the entry or an empty array if the entry does not belong to a sequence or the entry is not registered on the the scheduler service.

Parameters:
entry - The entry for which to look up the sequences
Returns:
all sequences that contain the entry or an empty array if the entry does not belong to a sequence or the entry is not registered on the the scheduler service.
Throws:
WcmException - if the sequences could not be retrieved.

createTimeTable

ISchedulerTimeTable createTimeTable()
                                    throws WcmException
Create an (empty) time table.

Returns:
an empty ISchedulerTimeTable.
Throws:
WcmException - if the time table cannot be created.

createTimeWildcard

ISchedulerTime createTimeWildcard()
                                  throws WcmException
Get a scheduler time for the current time.

Returns:
an ISchedulerTime.
Throws:
WcmException - if the time cannot be created.

getSchedulerEntryFactory

ISchedulerEntryFactory getSchedulerEntryFactory()
Deprecated. since KM5.0SP6

Returns a factory implementation to create new ISchedulerEntry objects without registering them.

Returns:
The schedulerEntryFactory value

updateSchedulerEntry

ISchedulerEntry updateSchedulerEntry(ISchedulerEntry entry)
                                     throws WcmException
Deprecated. since EP6.0SP1

Update an ISchedulerEntry in the scheduler's list.

Parameters:
entry - a ISchedulerEntry with new attributes.
Returns:
the ISchedulerEntry with the update attributes or null if the entry's ID could not be found.
Throws:
WcmException - if the scheduler entry could not be updated.

addSchedulerEntry

ISchedulerEntry addSchedulerEntry(ISchedulerEntry entry)
                                  throws WcmException
Deprecated. since EP6.0SP1: new scheduler tasks are already added to the scheduler

Adds a scheduler entry to the scheduler.

Parameters:
entry - The feature to be added to the SchedulerEntry attribute
Returns:
Description of the Return Value
Throws:
WcmException - Description of the Exception

getAllSchedulerEntries

ISchedulerEntryList getAllSchedulerEntries()
                                           throws WcmException
Deprecated. since KM 5.0 SP6. Returns an empty list.

Get a list of all scheduler entries to be performed on this system.

Returns:
a ISchedulerEntryList with all known scheduler entries.
Throws:
WcmException - if the list of scheduler entries could not be retrieved.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice