info.magnolia.module.workflow.jcr
Class JCRWorkItemStore

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

public class JCRWorkItemStore
extends java.lang.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
 java.lang.String convertPath(java.lang.String id)
          convert the name to valid path
 java.lang.String createPathFromId(openwfe.org.engine.expressions.FlowExpressionId eid)
          create the jcr node path for work Item by its id
 java.util.List doQuery(java.lang.String queryString)
          execute the xPath Query
 java.util.List doQuery(java.lang.String queryString, java.lang.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(java.lang.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(java.lang.String storeName, openwfe.org.engine.expressions.FlowExpressionId fei)
          retrieve work item by
 void storeWorkItem(java.lang.String arg0, openwfe.org.engine.workitem.InFlowWorkItem wi)
           
 
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 java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getHierarchyManager

protected HierarchyManager getHierarchyManager()
Returns:

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(java.lang.String storeName,
                                                                   openwfe.org.engine.expressions.FlowExpressionId fei)
                                                            throws openwfe.org.worklist.store.StoreException
retrieve work item by

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 java.lang.Exception
load a work item from a JCR content

Parameters:
ct - the content node
Returns:
Throws:
java.lang.Exception

getWorkItemByParticipant

public Content getWorkItemByParticipant(java.lang.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 java.lang.String convertPath(java.lang.String id)
convert the name to valid path

Parameters:
id -

createPathFromId

public java.lang.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(java.lang.String arg0,
                          openwfe.org.engine.workitem.InFlowWorkItem wi)
                   throws openwfe.org.worklist.store.StoreException
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 java.util.List doQuery(java.lang.String queryString)
execute the xPath Query


doQuery

public java.util.List doQuery(java.lang.String queryString,
                              java.lang.String language)


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