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 theTaskFactoryinterface 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.StringINIT_PARAM_SERVER_CONFIG_FILES_DEFAULT_LOCATIONThe default location for server configuration files.static java.lang.StringINIT_PARAM_TASK_FACTORY_CONFIGThe 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 voiddestroy()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.voidinit(ContainerServices cntrSvcs)Instructs the factory to initialize itself using the associated ContainerServices object.voidinit(ContainerServices cntrSvcs, TaskFactoryInfo config)Instructs the factory to initialize itself using the associated ContainerServices and task factory configuration objects.TasknewTask(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:TaskFactoryInstructs the factory to initialize itself using the associated ContainerServices object.- Specified by:
 initin interfaceTaskFactory- Parameters:
 cntrSvcs- TheContainerServicesobject.
 
- 
init
public void init(ContainerServices cntrSvcs, TaskFactoryInfo config)
Description copied from interface:TaskFactoryInstructs the factory to initialize itself using the associated ContainerServices and task factory configuration objects.- Specified by:
 initin interfaceTaskFactory- Parameters:
 cntrSvcs- TheContainerServicesobject.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:
 newTaskin interfaceTaskFactory- Parameters:
 id- The ID of the Task to create.- Returns:
 - The 
Taskobject 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:TaskFactoryReturns an Iterator of registered task IDs in the specified task category.- Specified by:
 getRegisteredTaskIDsin interfaceTaskFactory- Parameters:
 taskCat- TheTaskFactory.TaskCategoryin which task IDs are being requested.- Returns:
 - An 
Iteratorof all registered task names. 
 
- 
getRegisteredTaskIDList
public java.util.List<java.lang.String> getRegisteredTaskIDList(TaskFactory.TaskCategory taskCat)
Description copied from interface:TaskFactoryReturns a List of registered task IDs in the specified task category.- Specified by:
 getRegisteredTaskIDListin interfaceTaskFactory- Parameters:
 taskCat- TheTaskFactory.TaskCategoryin which task IDs are being requested.- Returns:
 - An 
Listof all registered task names. They are sorted alphabetically. - Since:
 - MicroStrategy Web 9.0.0
 
 
- 
destroy
public void destroy()
Description copied from interface:TaskFactoryInstructs the factory to destroy any persistent data structures.- Specified by:
 destroyin interfaceTaskFactory
 
 - 
 
 -