public class

AggregatingTaskFactory

extends Object
implements TaskFactory
java.lang.Object
   ↳ com.microstrategy.web.tasks.AggregatingTaskFactory

Class Overview

This class implements the TaskFactory interface by providing both a direct lookup of Task IDs (the Task ID is associated with a fully qualified class name) as well as chain a set of other TaskFactory objects. This chain of factories allows a more flexible means of looking up Tasks. Configuration of this factory is provide via an init-param found in the web.xml file.

Summary

Constants
String INIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATION The default location for server configuration files.
String INIT_PARAM_TASK_FACTORY_CONFIG The name of the init parameter that indicates the path to a Task factory configuration XML file.
Public Constructors
AggregatingTaskFactory()
Public Methods
void destroy()
Instructs the factory to destroy any persistent data structures.
List<String> getRegisteredTaskIDList(TaskFactory.TaskCategory taskCat)
Returns a List of registered task IDs in the specified task category.
Iterator<String> getRegisteredTaskIDs(TaskFactory.TaskCategory taskCat)
Returns an Iterator of registered task IDs in the specified task category.
void init(ContainerServices cntrSvcs)
Instructs the factory to initialize itself using the associated ContainerServices object.
void init(ContainerServices cntrSvcs, TaskFactoryInfo config)
Instructs the factory to initialize itself using the associated ContainerServices and task factory configuration objects.
Task newTask(String id)
Create a new Task instance based on the supplied ID.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.tasks.TaskFactory

Constants

public static final String INIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATION

The default location for server configuration files.

Constant Value: "serverConfigFilesDefaultLocation"

public static final String INIT_PARAM_TASK_FACTORY_CONFIG

The name of the init parameter that indicates the path to a Task factory configuration XML file.

Constant Value: "aggregatingTaskFactoryConfig"

Public Constructors

public AggregatingTaskFactory ()

Public Methods

public void destroy ()

Instructs the factory to destroy any persistent data structures.

public List<String> getRegisteredTaskIDList (TaskFactory.TaskCategory taskCat)

Returns a List of registered task IDs in the specified task category.

Parameters
taskCat The TaskCategory in which task IDs are being requested.
Returns
  • An List of all registered task names. They are sorted alphabetically.

public Iterator<String> getRegisteredTaskIDs (TaskFactory.TaskCategory taskCat)

Returns an Iterator of registered task IDs in the specified task category.

Parameters
taskCat The TaskCategory in which task IDs are being requested.
Returns
  • An Iterator of all registered task names.

public void init (ContainerServices cntrSvcs)

Instructs the factory to initialize itself using the associated ContainerServices object.

Parameters
cntrSvcs The ContainerServices object.

public void init (ContainerServices cntrSvcs, TaskFactoryInfo config)

Instructs the factory to initialize itself using the associated ContainerServices and task factory configuration objects.

Parameters
cntrSvcs The ContainerServices object.
config The task factory configuration object

public Task newTask (String id)

Create a new Task instance based on the supplied ID.

Parameters
id The ID of the Task to create.
Returns
  • The Task object that is associated with this Task ID.
Throws
TaskException If something goes wrong in the creation process.
TaskConfigurationException If the Task was not properly configured.
TaskNotFoundException If the Task was not found.