|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LocalController
A container for local processes and local components. Local applications will use this interface to set up all necessary processes and components as well as to execute queries.
| Method Summary | |
|---|---|
void |
addLocalComponentFactory(String componentId,
LocalComponentFactory factory)
Adds a factory that will be used to produce components associated with given componentId. |
void |
addProcess(String processId,
LocalProcess localProcess)
Adds a local process to the controller and associates the process with given processId. |
String |
getComponentName(String componentId)
Returns the name of the component associated with given componentId. |
List |
getProcessIds()
Returns a Listof identifiers of all processes that have been
added and successfully initialized by this local controller. |
String |
getProcessName(String processId)
Returns the name of the process associated with given processId. |
ProcessingResult |
query(String processId,
String query,
Map requestParameters)
Requests the process identified by processId to process a
query. |
| Method Detail |
|---|
ProcessingResult query(String processId,
String query,
Map requestParameters)
throws MissingProcessException,
Exception
processId to process a
query. The contents of requestParameters
will be accessible for all components in the chain through the
RequestContextduring processing of the query.
processId - Identifier of the process requested to handle the queryquery - Query to be processed. Format of the query is not specified
here, as it depends on what the input component of the invoked
process can handle.requestParameters - parameters to be available for components during
processing of this query. Components are free to add their own
properties to the context. These will be available for the
caller through the returned ProcessingResultinstance.
MissingProcessException - when there is no component with given
processId
Exception - if an error occurs during query processing
void addLocalComponentFactory(String componentId,
LocalComponentFactory factory)
throws DuplicatedKeyException
componentId.
DuplicatedKeyException - Thrown when componentId already
exists in the controller.
void addProcess(String processId,
LocalProcess localProcess)
throws InitializationException,
MissingComponentException,
DuplicatedKeyException
processId.
processId - identifier of the new processlocalProcess - instance of the local process
InitializationException
MissingComponentException
DuplicatedKeyException
String getProcessName(String processId)
throws MissingProcessException
processId.
MissingProcessException - when there is no process associated with
processId
String getComponentName(String componentId)
throws MissingComponentException
componentId.
MissingComponentException - when there is no component associated
with given componentIdList getProcessIds()
Listof identifiers of all processes that have been
added and successfully initialized by this local controller.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||