|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.workflow.CachingWorkflowDescriptorStore
public class CachingWorkflowDescriptorStore
Used to cache workflowDescriptors in JIRA. This caches ImmutableWorkflowDescriptors.
These objects are very heavy weight and ideally we would not cache them, but it is the only way to
quickly give JIRA access to workflow objects. This is because the safe thing to cache is the workflow XML string but
converting this to an object graph will be expensive. Also please note that the implementation of
ImmutableWorkflowDescriptor cannot guarantee 100% immutability.
JiraWorkflowFactory, but it adds
some more concurrency controls to ensure consistency with the underlying store (such as the
OfBizWorkflowDescriptorStore)
| Constructor Summary | |
|---|---|
CachingWorkflowDescriptorStore(WorkflowDescriptorStore delegate,
com.atlassian.event.api.EventPublisher eventPublisher)
|
|
| Method Summary | |
|---|---|
List<JiraWorkflowDTO> |
getAllJiraWorkflowDTOs()
Returns a list of all the workflows stored in the underlying store. |
ImmutableWorkflowDescriptor |
getWorkflow(String name)
Retrieves a WorkflowDescriptor from the underlying store. |
String[] |
getWorkflowNames()
Returns an array of all the workflowNames stored. |
void |
onClearCache(ClearCacheEvent event)
|
boolean |
removeWorkflow(String name)
Removes a workflow from the underlying store. |
boolean |
saveWorkflow(String name,
com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
boolean replace)
Saves or updates a workflowDescriptor. |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachingWorkflowDescriptorStore(WorkflowDescriptorStore delegate,
com.atlassian.event.api.EventPublisher eventPublisher)
| Method Detail |
|---|
public void start()
throws Exception
Startable
start in interface StartableException - Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public ImmutableWorkflowDescriptor getWorkflow(String name)
throws com.opensymphony.workflow.FactoryException
WorkflowDescriptorStoreWorkflowDescriptor from the underlying store. Returns
null if no WorkflowDescriptor can be found
getWorkflow in interface WorkflowDescriptorStorename - The workflow name
com.opensymphony.workflow.FactoryException - If there's an error constructing the WorkflowDescriptor from its underlying representationpublic boolean removeWorkflow(String name)
WorkflowDescriptorStore
removeWorkflow in interface WorkflowDescriptorStorename - The workflow name
public boolean saveWorkflow(String name,
com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
boolean replace)
throws DataAccessException
WorkflowDescriptorStore
saveWorkflow in interface WorkflowDescriptorStorename - The name of the workflowworkflowDescriptor - The WorkflowDescriptor to save/update in the underlying storereplace - true if an update should be done, if the workflow already exists, false otherwise
DataAccessException - If there was a problem, storing the workflowdescriptorpublic String[] getWorkflowNames()
WorkflowDescriptorStore
getWorkflowNames in interface WorkflowDescriptorStorepublic List<JiraWorkflowDTO> getAllJiraWorkflowDTOs()
WorkflowDescriptorStore
getAllJiraWorkflowDTOs in interface WorkflowDescriptorStoreJiraWorkflowDTOs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||