Novell exteNd
Director 5.0 API

com.sssw.cm.task.api
Interface EbiTaskMgmtDelegate

All Superinterfaces:
EbiDelegate, EbiStateChangeProducer

public interface EbiTaskMgmtDelegate
extends EbiDelegate, EbiStateChangeProducer

This is the Task Manager Delegate interface.

See Also:
EbiTask

Fields inherited from interface com.sssw.fw.api.EbiDelegate
SERVICE_LOCAL, SERVICE_REMOTE
 
Method Summary
 boolean addTask(EbiContext context, EbiTask task, boolean overwrite)
          Adds a new task.
 boolean enableTask(EbiContext context, boolean enable, String taskName)
          Enables/disables a specific task.
 String getRepositoryID()
          Gets the ID of the repository that this object is associated with
 EbiTask getTask(EbiContext context, String taskName)
          Gets a specific task by name.
 Collection getTaskNames(EbiContext context)
          Enumerates tasks.
 Collection getTasks(EbiContext context)
          Enumerates tasks.
 Collection getTasks(EbiContext context, EbiTaskType type)
          Gets all the Tasks that belong to a specific Task Type.
 Collection getTasks(EbiContext context, String[] names)
          Gets specific tasks.
 EbiTaskType getTaskType(EbiContext context, String name, String kind)
          Gets a Task Type given its name and kind
 Collection getTaskTypes(EbiContext context)
          Gets all Task Types.
 Collection getTaskTypes(EbiContext context, String kind)
          Gets all Task Types of the specified kind.
 boolean isTaskEnabled(EbiContext context, String taskName)
          Finds out if a specific task is enabled.
 void loadTaskList(InputStream is)
          Loads the task list from the specified input stream.
 void loadTaskTypeList(InputStream is)
          Loads the task type list.
 void setLog(EbiLog log)
          Sets the log for the Task Manager to write into.
 void setRepositoryID(String repositoryID)
          Sets the repository ID.
 void startTasks(EbiContext context)
          Fires off all tasks.
 void startTasks(EbiContext context, String[] names)
          Fires off specific tasks.
 void stopTasks(EbiContext context)
          Stops all tasks.
 void stopTasks(EbiContext context, String[] names)
          Stops specific tasks.
 void taskCompleted(EbiTask task, Object details)
          Callback notification of the successful completion of a task.
 void taskFailed(EbiTask task, EboException ex)
          Callback notification of a task failure.
 
Methods implemented from interface com.sssw.fw.api.EbiDelegate
getName
 
Methods implemented from interface com.sssw.fw.event.api.EbiStateChangeProducer
addStateChangeListener, addStateChangeListener, addVetoableStateChangeListener, addVetoableStateChangeListener, fireStateChange, fireVetoableStateChange, getListeners, getScpDescription, getScpLog, getVetoableListeners, hasListeners, hasVetoableListeners, removeStateChangeListener, removeVetoableStateChangeListener, setScpDescription, setScpLog
 

Method Detail

loadTaskTypeList

public void loadTaskTypeList(InputStream is)
                      throws EboUnrecoverableSystemException
Loads the task type list.
Parameters:
is - the input stream

getTaskTypes

public Collection getTaskTypes(EbiContext context)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException
Gets all Task Types.
Parameters:
context - context
Returns:
Collection of EbiTaskType's

getTaskTypes

public Collection getTaskTypes(EbiContext context,
                               String kind)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException
Gets all Task Types of the specified kind.
Returns:
Collection of EbiTaskType's

getTaskType

public EbiTaskType getTaskType(EbiContext context,
                               String name,
                               String kind)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException
Gets a Task Type given its name and kind
Returns:
the Task Type, or null if not found

loadTaskList

public void loadTaskList(InputStream is)
                  throws EboUnrecoverableSystemException
Loads the task list from the specified input stream.
Parameters:
is - the input stream

startTasks

public void startTasks(EbiContext context)
                throws EboUnrecoverableSystemException,
                       EboSecurityException
Fires off all tasks.
Parameters:
context - context

startTasks

public void startTasks(EbiContext context,
                       String[] names)
                throws EboUnrecoverableSystemException,
                       EboSecurityException
Fires off specific tasks.
Parameters:
context - context
names - the list of task names for tasks to fire off

stopTasks

public void stopTasks(EbiContext context)
               throws EboUnrecoverableSystemException,
                      EboSecurityException
Stops all tasks.
Parameters:
context - context

stopTasks

public void stopTasks(EbiContext context,
                      String[] names)
               throws EboUnrecoverableSystemException,
                      EboSecurityException
Stops specific tasks.
Parameters:
context - context
names - the list of task names for tasks to fire off

getTaskNames

public Collection getTaskNames(EbiContext context)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException
Enumerates tasks.
Parameters:
context - context
Returns:
a Collection of names (Strings)

getTasks

public Collection getTasks(EbiContext context)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Enumerates tasks.
Parameters:
context - context
Returns:
a Collection of Task objects (EbiTask's)

getTasks

public Collection getTasks(EbiContext context,
                           String[] names)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Gets specific tasks.
Parameters:
context - context
names - list of task names
Returns:
a Collection of Task objects (EbiTask's)

getTasks

public Collection getTasks(EbiContext context,
                           EbiTaskType type)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Gets all the Tasks that belong to a specific Task Type.
Parameters:
context - context
type - the Task Type
Returns:
a Collection of Task objects (EbiTask's)

getTask

public EbiTask getTask(EbiContext context,
                       String taskName)
                throws EboUnrecoverableSystemException,
                       EboSecurityException
Gets a specific task by name.
Parameters:
context - context
taskName - task name
Returns:
the task or null if not found

enableTask

public boolean enableTask(EbiContext context,
                          boolean enable,
                          String taskName)
                   throws EboUnrecoverableSystemException,
                          EboSecurityException
Enables/disables a specific task.
Parameters:
context - context
enable - if true, enable the task, if false, disable it
taskName - the name of the task to enable or disable
Returns:
true if the task was successfully enabled/disabled, false if it was not found

isTaskEnabled

public boolean isTaskEnabled(EbiContext context,
                             String taskName)
                      throws EboUnrecoverableSystemException,
                             EboSecurityException
Finds out if a specific task is enabled.
Parameters:
context - context
taskName - the name of the task to check
Returns:
true if the task is enabled, false if disabled or not found

addTask

public boolean addTask(EbiContext context,
                       EbiTask task,
                       boolean overwrite)
                throws EboUnrecoverableSystemException,
                       EboSecurityException
Adds a new task.
Parameters:
context - context
task - the new task
overwrite - if true, overwrite any task with the same name
Returns:
true if added the task successfully, false if a task with the same name exists and the value of 'overwrite' was false

taskCompleted

public void taskCompleted(EbiTask task,
                          Object details)
Callback notification of the successful completion of a task.
Parameters:
task - the task that completed
details - any details or stats

taskFailed

public void taskFailed(EbiTask task,
                       EboException ex)
Callback notification of a task failure.
Parameters:
task - the task that failed
ex - any exception

setLog

public void setLog(EbiLog log)
Sets the log for the Task Manager to write into.
Parameters:
log - the log to write into

setRepositoryID

public void setRepositoryID(String repositoryID)
Sets the repository ID.
Parameters:
repositoryID - the repository ID

getRepositoryID

public String getRepositoryID()
Gets the ID of the repository that this object is associated with
Returns:
repositoryID the ID of the repository

Novell exteNd
Director 5.0 API