Package com.microstrategy.web.tasks
Class AggregatingTaskFactory
- java.lang.Object
-
- com.microstrategy.web.tasks.AggregatingTaskFactory
-
- All Implemented Interfaces:
TaskFactory
public class AggregatingTaskFactory extends java.lang.Object implements TaskFactory
This class implements theTaskFactory
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.- Since:
- MicroStrategy Web 8.1.0
- See Also:
INIT_PARAM_TASK_FACTORY_CONFIG
,INIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATION
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microstrategy.web.tasks.TaskFactory
TaskFactory.TaskCategory
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATION
The default location for server configuration files.static java.lang.String
INIT_PARAM_TASK_FACTORY_CONFIG
The name of the init parameter that indicates the path to a Task factory configuration XML file.
-
Constructor Summary
Constructors Constructor Description AggregatingTaskFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Instructs the factory to destroy any persistent data structures.java.util.List<java.lang.String>
getRegisteredTaskIDList(TaskFactory.TaskCategory taskCat)
Returns a List of registered task IDs in the specified task category.java.util.Iterator<java.lang.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(java.lang.String id)
Create a new Task instance based on the supplied ID.
-
-
-
Field Detail
-
INIT_PARAM_TASK_FACTORY_CONFIG
public static final java.lang.String INIT_PARAM_TASK_FACTORY_CONFIG
The name of the init parameter that indicates the path to a Task factory configuration XML file.- See Also:
- Constant Field Values
-
INIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATION
public static final java.lang.String INIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATION
The default location for server configuration files.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(ContainerServices cntrSvcs)
Description copied from interface:TaskFactory
Instructs the factory to initialize itself using the associated ContainerServices object.- Specified by:
init
in interfaceTaskFactory
- Parameters:
cntrSvcs
- TheContainerServices
object.
-
init
public void init(ContainerServices cntrSvcs, TaskFactoryInfo config)
Description copied from interface:TaskFactory
Instructs the factory to initialize itself using the associated ContainerServices and task factory configuration objects.- Specified by:
init
in interfaceTaskFactory
- Parameters:
cntrSvcs
- TheContainerServices
object.config
- The task factory configuration object
-
newTask
public Task newTask(java.lang.String id) throws TaskException
Create a new Task instance based on the supplied ID.- Specified by:
newTask
in interfaceTaskFactory
- 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.
-
getRegisteredTaskIDs
public java.util.Iterator<java.lang.String> getRegisteredTaskIDs(TaskFactory.TaskCategory taskCat)
Description copied from interface:TaskFactory
Returns an Iterator of registered task IDs in the specified task category.- Specified by:
getRegisteredTaskIDs
in interfaceTaskFactory
- Parameters:
taskCat
- TheTaskFactory.TaskCategory
in which task IDs are being requested.- Returns:
- An
Iterator
of all registered task names.
-
getRegisteredTaskIDList
public java.util.List<java.lang.String> getRegisteredTaskIDList(TaskFactory.TaskCategory taskCat)
Description copied from interface:TaskFactory
Returns a List of registered task IDs in the specified task category.- Specified by:
getRegisteredTaskIDList
in interfaceTaskFactory
- Parameters:
taskCat
- TheTaskFactory.TaskCategory
in which task IDs are being requested.- Returns:
- An
List
of all registered task names. They are sorted alphabetically. - Since:
- MicroStrategy Web 9.0.0
-
destroy
public void destroy()
Description copied from interface:TaskFactory
Instructs the factory to destroy any persistent data structures.- Specified by:
destroy
in interfaceTaskFactory
-
-