info.magnolia.module.workflow.jcr
Class JCRWorkItemStore

java.lang.Object
  extended by info.magnolia.module.workflow.jcr.JCRWorkItemStore

public class JCRWorkItemStore
extends Object

The Magnolia-specific workflow participant.

Author:
Jackie Ju, Philipp Bracher, Nicolas Modrzyk, John Mettraux

Constructor Summary
JCRWorkItemStore()
           
JCRWorkItemStore(boolean useLifeTimeJCRSession, boolean cleanUp, boolean shouldBackupWorkItems)
           
 
Method Summary
 boolean checkContentWithEID(Content ct, openwfe.org.engine.expressions.FlowExpressionId eid)
          check if the content contains the right work Item with same id.
 String convertPath(String id)
          convert the name to valid path.
 String createPathFromId(openwfe.org.engine.expressions.FlowExpressionId eid)
          create the jcr node path for work Item by its id.
 List doQuery(String queryString)
          execute the xPath Query.
 List doQuery(String queryString, String language)
           
protected  void encodeWorkItemToNode(openwfe.org.engine.workitem.InFlowWorkItem wi, Content newc)
           
protected  HierarchyManager getHierarchyManager()
           
 Content getWorkItemById(openwfe.org.engine.expressions.FlowExpressionId fei)
          get work item by id.
 Content getWorkItemByParticipant(String participant)
          retrieve a work item by participant name.
 boolean hasWorkItem(openwfe.org.engine.expressions.FlowExpressionId fei)
          check whether the specified work item exists.
 openwfe.org.engine.workitem.InFlowWorkItem loadWorkItem(Content ct)
          load a work item from a JCR content.
 void removeWorkItem(openwfe.org.engine.expressions.FlowExpressionId fei)
          Deletes or moves a workItem to the backup folder.
 openwfe.org.engine.workitem.InFlowWorkItem retrieveWorkItem(String storeName, openwfe.org.engine.expressions.FlowExpressionId fei)
          retrieve work item by FlowExpressionId.
 void storeWorkItem(String arg0, openwfe.org.engine.workitem.InFlowWorkItem wi)
          Stores a workitem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCRWorkItemStore

public JCRWorkItemStore(boolean useLifeTimeJCRSession,
                        boolean cleanUp,
                        boolean shouldBackupWorkItems)

JCRWorkItemStore

public JCRWorkItemStore()
                 throws Exception
Throws:
Exception
Method Detail

getHierarchyManager

protected HierarchyManager getHierarchyManager()

removeWorkItem

public void removeWorkItem(openwfe.org.engine.expressions.FlowExpressionId fei)
                    throws openwfe.org.worklist.store.StoreException
Deletes or moves a workItem to the backup folder.

Throws:
openwfe.org.worklist.store.StoreException

retrieveWorkItem

public openwfe.org.engine.workitem.InFlowWorkItem retrieveWorkItem(String storeName,
                                                                   openwfe.org.engine.expressions.FlowExpressionId fei)
                                                            throws openwfe.org.worklist.store.StoreException
retrieve work item by FlowExpressionId.

Parameters:
storeName - TODO : this parameter is not used ...
fei -
Returns:
Throws:
openwfe.org.worklist.store.StoreException

loadWorkItem

public openwfe.org.engine.workitem.InFlowWorkItem loadWorkItem(Content ct)
                                                        throws Exception
load a work item from a JCR content.

Parameters:
ct - the content node
Returns:
Throws:
Exception

getWorkItemByParticipant

public Content getWorkItemByParticipant(String participant)
retrieve a work item by participant name.

Parameters:
participant - the full participant name (for example, user-superuser)

getWorkItemById

public Content getWorkItemById(openwfe.org.engine.expressions.FlowExpressionId fei)
get work item by id.

Parameters:
fei -

hasWorkItem

public boolean hasWorkItem(openwfe.org.engine.expressions.FlowExpressionId fei)
                    throws AccessDeniedException,
                           javax.jcr.RepositoryException
check whether the specified work item exists.

Parameters:
fei - expression id of work item
Returns:
true if exist, false if not
Throws:
AccessDeniedException
javax.jcr.RepositoryException

checkContentWithEID

public boolean checkContentWithEID(Content ct,
                                   openwfe.org.engine.expressions.FlowExpressionId eid)
check if the content contains the right work Item with same id.

Parameters:
ct - JCR content
eid - id of work item

convertPath

public final String convertPath(String id)
convert the name to valid path.

Parameters:
id -

createPathFromId

public String createPathFromId(openwfe.org.engine.expressions.FlowExpressionId eid)
create the jcr node path for work Item by its id.

Parameters:
eid -

storeWorkItem

public void storeWorkItem(String arg0,
                          openwfe.org.engine.workitem.InFlowWorkItem wi)
                   throws openwfe.org.worklist.store.StoreException
Stores a workitem.

Parameters:
arg0 - TODO : this parameter is not used ...
wi - the work item to be stored
Throws:
openwfe.org.worklist.store.StoreException

encodeWorkItemToNode

protected void encodeWorkItemToNode(openwfe.org.engine.workitem.InFlowWorkItem wi,
                                    Content newc)
                             throws openwfe.org.util.beancoder.BeanCoderException
Throws:
openwfe.org.util.beancoder.BeanCoderException

doQuery

public List doQuery(String queryString)
execute the xPath Query.


doQuery

public List doQuery(String queryString,
                    String language)


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.