Package org.ametys.web.workflow
Class WebAmetysObjectWorkflowStore
- java.lang.Object
-
- org.ametys.plugins.workflow.store.AbstractJackrabbitWorkflowStore
-
- org.ametys.plugins.workflow.store.AmetysObjectWorkflowStore
-
- org.ametys.web.workflow.WebAmetysObjectWorkflowStore
-
- All Implemented Interfaces:
com.opensymphony.workflow.spi.WorkflowStore
,AmetysWorkflowStore
public class WebAmetysObjectWorkflowStore extends AmetysObjectWorkflowStore
Web ametys object workflow store which ensures that the session used operates on the default workspace.
-
-
Field Summary
Fields Modifier and Type Field Description protected Session
_session
Internal session-
Fields inherited from class org.ametys.plugins.workflow.store.AmetysObjectWorkflowStore
_ametysObject, _inMemoryEntry
-
Fields inherited from class org.ametys.plugins.workflow.store.AbstractJackrabbitWorkflowStore
__NAMESPACE, __NAMESPACE_PREFIX, __NM_PREFIX, __ROOT_NT, _log, _repository
-
-
Constructor Summary
Constructors Constructor Description WebAmetysObjectWorkflowStore(Repository repository, WorkflowAwareAmetysObject ametysObject)
Creates a workflow store for Web Ametys object.WebAmetysObjectWorkflowStore(Repository repository, WorkflowAwareAmetysObject ametysObject, boolean preserveHistory)
Creates a workflow store for Web Ametys object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Node
_getAmetysObjectNode()
Provides the ametys object node in the current sessionprotected Session
_getSession()
Open a session to the _repository.protected void
_release(Session session)
Release a session.-
Methods inherited from class org.ametys.plugins.workflow.store.AmetysObjectWorkflowStore
_createRootNode, _getNextEntryId, _getOrCreateParentEntryNode, _getRootNode, bindAmetysObject, getAmetysObject, shouldClearHistory, storeNewEntry
-
Methods inherited from class org.ametys.plugins.workflow.store.AbstractJackrabbitWorkflowStore
__toCalendar, _getNextStepId, buildFieldExpression, buildNestedExpression, clearHistory, createCurrentStep, createEntry, deleteInstance, findCurrentSteps, findEntry, findHistorySteps, getCondition, getEntryNode, getFirstFieldExpression, getPredicate, getPropertyName, getPropertySet, getSortCriteria, init, markFinished, moveToHistory, query, query, removeEntry, setEntryState, translateValue
-
-
-
-
Constructor Detail
-
WebAmetysObjectWorkflowStore
public WebAmetysObjectWorkflowStore(Repository repository, WorkflowAwareAmetysObject ametysObject)
Creates a workflow store for Web Ametys object. The history steps will be clear on workflow completion.- Parameters:
repository
- the JCR Repository to use.ametysObject
- The ametys object for this store. Can be null in case of an object creation.
-
WebAmetysObjectWorkflowStore
public WebAmetysObjectWorkflowStore(Repository repository, WorkflowAwareAmetysObject ametysObject, boolean preserveHistory)
Creates a workflow store for Web Ametys object.- Parameters:
repository
- The repositoryametysObject
- The ametys object for this store. Can be null in case of an object creation.preserveHistory
- Set to true to preserve history steps when workflow is complete.
-
-
Method Detail
-
_getSession
protected Session _getSession() throws RepositoryException
Description copied from class:AbstractJackrabbitWorkflowStore
Open a session to the _repository.- Overrides:
_getSession
in classAmetysObjectWorkflowStore
- Returns:
- the session opened.
- Throws:
RepositoryException
- if an error occurs.
-
_release
protected void _release(Session session)
Description copied from class:AbstractJackrabbitWorkflowStore
Release a session.Default implementation calls logout on the session.
- Overrides:
_release
in classAmetysObjectWorkflowStore
- Parameters:
session
- the session to release.
-
_getAmetysObjectNode
protected Node _getAmetysObjectNode() throws RepositoryException
Description copied from class:AmetysObjectWorkflowStore
Provides the ametys object node in the current session- Overrides:
_getAmetysObjectNode
in classAmetysObjectWorkflowStore
- Returns:
- node
- Throws:
RepositoryException
- on repository error
-
-