org.enhydra.shark
Class SharkXPILUtils

java.lang.Object
  extended by org.enhydra.shark.SharkXPILUtils

public class SharkXPILUtils
extends java.lang.Object

Various utilities for creating XPIL documents.

Author:
Sasa Bojanic, Svjetlana Milidrag

Field Summary
static java.lang.String[] ALLOWED_DATA_TYPES
           
static java.util.List allowedDataTypes
           
 
Constructor Summary
SharkXPILUtils()
           
 
Method Summary
static java.util.List classifyVariables(java.util.Map varMap, java.util.Map cs)
          This methode take map of variables and map of context_signature and return list of VariableData.
static java.lang.String convertNodeToXMLString(org.enhydra.shark.xpil.XPILExtendedWorkflowFacilityInstanceDocument instanceDocument)
           
static org.enhydra.shark.xpil.XPILActivityInstance createXPILActivityInstance(WMSessionHandle shandle, WfActivityInternal act, java.lang.Object ins)
           
static java.util.List extractVariablesIdsFromXPIL(org.enhydra.shark.xpil.XPILExtendedWorkflowFacilityInstanceDocument xpil)
           
static void fillActivityInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILActivityInstance xpilact, WfActivityInternal act)
           
static void fillAssignmentInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILManualActivityInstanceDocument.ManualActivityInstance xpilmanact, WfActivityInternal act)
           
static org.enhydra.shark.xpil.XPILEventAuditsDocument.EventAudits fillEventAudits(WMSessionHandle shandle, org.enhydra.shark.xpil.XPILExtendedWorkflowFacilityInstanceDocument.ExtendedWorkflowFacilityInstance ins, java.util.List l, java.util.Properties props)
           
static org.enhydra.shark.xpil.XPDLExtendedAttributesDocument.ExtendedAttributes fillExtendedAttributeInfo(WMSessionHandle shandle, java.util.Properties props, WMEntity ent)
           
static void fillHeader(WMSessionHandle shandle, org.enhydra.shark.xpil.XPILHeaderDocument.Header header)
           
static void fillPackageInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILPackageInstanceDocument.PackageInstance xpilpkg, WMEntity en)
           
static void fillProcessFactoryInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILWorkflowProcessFactoryInstanceDocument.WorkflowProcessFactoryInstance xpilpfact, ProcessMgrPersistenceObject po)
           
static void fillProcessFactoryInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILWorkflowProcessFactoryInstanceDocument.WorkflowProcessFactoryInstance xpilpfact, WfProcessMgrInternal mgr)
           
static void fillProcessInfo(WMSessionHandle shandle, java.util.Properties props, WfProcessInternal proc, org.enhydra.shark.xpil.XPILWorkflowProcessInstance xpilproc)
           
static void fillVariableInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILDataInstance xpilvar, java.lang.Object procOrActVarPO)
           
static void fillVariableInfo(WMSessionHandle shandle, java.util.Properties props, org.enhydra.shark.xpil.XPILDataInstance xpilvar, java.lang.String varId, java.lang.Object varVal)
           
static java.util.List fillVariables(WMSessionHandle shandle, java.util.Properties props, java.lang.String procId, java.lang.Object ins, java.util.List cvars)
           
static void fillWithActivityInfo(WMSessionHandle shandle, WfActivityInternal act, java.util.Properties props, java.lang.Object ins)
           
static void fillWithProcessInfo(WMSessionHandle shandle, WfProcessInternal proc, java.util.Properties props, java.lang.Object ins)
           
protected static java.text.SimpleDateFormat getDateFormater(java.util.Properties props)
           
static java.util.List getHistory(WMSessionHandle shandle, WMFilter filter, java.lang.String procId, java.lang.String actId, java.util.Properties props)
           
static java.util.List getProcessMgrPersistenceObjects(WMSessionHandle shandle, WMFilter filter, java.util.Properties props)
           
static java.lang.String getVariables(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.util.Properties props)
           
protected static void omitOrIncludeVariablesByTypeOrIdOrIdPrefixOrIdPostfix(java.util.Iterator it, java.util.Properties props, boolean omit, int compBy)
           
protected static void setSimulatedNullValue(org.apache.xmlbeans.XmlObject di, boolean ignoreIfAttrExists, java.util.Properties props)
           
static java.lang.String updateVariableMockupNode(WMSessionHandle shandle, java.lang.String mockup, java.lang.String procId, java.lang.String actId, java.util.Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOWED_DATA_TYPES

public static final java.lang.String[] ALLOWED_DATA_TYPES

allowedDataTypes

public static final java.util.List allowedDataTypes
Constructor Detail

SharkXPILUtils

public SharkXPILUtils()
Method Detail

fillPackageInfo

public static void fillPackageInfo(WMSessionHandle shandle,
                                   java.util.Properties props,
                                   org.enhydra.shark.xpil.XPILPackageInstanceDocument.PackageInstance xpilpkg,
                                   WMEntity en)
                            throws java.lang.Exception
Throws:
java.lang.Exception

fillProcessFactoryInfo

public static void fillProcessFactoryInfo(WMSessionHandle shandle,
                                          java.util.Properties props,
                                          org.enhydra.shark.xpil.XPILWorkflowProcessFactoryInstanceDocument.WorkflowProcessFactoryInstance xpilpfact,
                                          ProcessMgrPersistenceObject po)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

fillProcessFactoryInfo

public static void fillProcessFactoryInfo(WMSessionHandle shandle,
                                          java.util.Properties props,
                                          org.enhydra.shark.xpil.XPILWorkflowProcessFactoryInstanceDocument.WorkflowProcessFactoryInstance xpilpfact,
                                          WfProcessMgrInternal mgr)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

fillProcessInfo

public static void fillProcessInfo(WMSessionHandle shandle,
                                   java.util.Properties props,
                                   WfProcessInternal proc,
                                   org.enhydra.shark.xpil.XPILWorkflowProcessInstance xpilproc)
                            throws java.lang.Exception
Throws:
java.lang.Exception

fillActivityInfo

public static void fillActivityInfo(WMSessionHandle shandle,
                                    java.util.Properties props,
                                    org.enhydra.shark.xpil.XPILActivityInstance xpilact,
                                    WfActivityInternal act)
                             throws java.lang.Exception
Throws:
java.lang.Exception

fillAssignmentInfo

public static void fillAssignmentInfo(WMSessionHandle shandle,
                                      java.util.Properties props,
                                      org.enhydra.shark.xpil.XPILManualActivityInstanceDocument.ManualActivityInstance xpilmanact,
                                      WfActivityInternal act)
                               throws java.lang.Exception
Throws:
java.lang.Exception

fillVariableInfo

public static void fillVariableInfo(WMSessionHandle shandle,
                                    java.util.Properties props,
                                    org.enhydra.shark.xpil.XPILDataInstance xpilvar,
                                    java.lang.Object procOrActVarPO)
                             throws java.lang.Exception
Throws:
java.lang.Exception

fillVariableInfo

public static void fillVariableInfo(WMSessionHandle shandle,
                                    java.util.Properties props,
                                    org.enhydra.shark.xpil.XPILDataInstance xpilvar,
                                    java.lang.String varId,
                                    java.lang.Object varVal)
                             throws java.lang.Exception
Throws:
java.lang.Exception

fillVariables

public static java.util.List fillVariables(WMSessionHandle shandle,
                                           java.util.Properties props,
                                           java.lang.String procId,
                                           java.lang.Object ins,
                                           java.util.List cvars)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

fillExtendedAttributeInfo

public static org.enhydra.shark.xpil.XPDLExtendedAttributesDocument.ExtendedAttributes fillExtendedAttributeInfo(WMSessionHandle shandle,
                                                                                                                 java.util.Properties props,
                                                                                                                 WMEntity ent)
                                                                                                          throws java.lang.Exception
Throws:
java.lang.Exception

createXPILActivityInstance

public static org.enhydra.shark.xpil.XPILActivityInstance createXPILActivityInstance(WMSessionHandle shandle,
                                                                                     WfActivityInternal act,
                                                                                     java.lang.Object ins)
                                                                              throws java.lang.Exception
Throws:
java.lang.Exception

fillWithProcessInfo

public static void fillWithProcessInfo(WMSessionHandle shandle,
                                       WfProcessInternal proc,
                                       java.util.Properties props,
                                       java.lang.Object ins)
                                throws java.lang.Exception
Throws:
java.lang.Exception

fillWithActivityInfo

public static void fillWithActivityInfo(WMSessionHandle shandle,
                                        WfActivityInternal act,
                                        java.util.Properties props,
                                        java.lang.Object ins)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getVariables

public static java.lang.String getVariables(WMSessionHandle shandle,
                                            java.lang.String procId,
                                            java.lang.String actId,
                                            java.util.Properties props)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

updateVariableMockupNode

public static java.lang.String updateVariableMockupNode(WMSessionHandle shandle,
                                                        java.lang.String mockup,
                                                        java.lang.String procId,
                                                        java.lang.String actId,
                                                        java.util.Properties props)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

omitOrIncludeVariablesByTypeOrIdOrIdPrefixOrIdPostfix

protected static void omitOrIncludeVariablesByTypeOrIdOrIdPrefixOrIdPostfix(java.util.Iterator it,
                                                                            java.util.Properties props,
                                                                            boolean omit,
                                                                            int compBy)
                                                                     throws java.lang.Exception
Throws:
java.lang.Exception

getHistory

public static java.util.List getHistory(WMSessionHandle shandle,
                                        WMFilter filter,
                                        java.lang.String procId,
                                        java.lang.String actId,
                                        java.util.Properties props)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

fillEventAudits

public static org.enhydra.shark.xpil.XPILEventAuditsDocument.EventAudits fillEventAudits(WMSessionHandle shandle,
                                                                                         org.enhydra.shark.xpil.XPILExtendedWorkflowFacilityInstanceDocument.ExtendedWorkflowFacilityInstance ins,
                                                                                         java.util.List l,
                                                                                         java.util.Properties props)
                                                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getProcessMgrPersistenceObjects

public static java.util.List getProcessMgrPersistenceObjects(WMSessionHandle shandle,
                                                             WMFilter filter,
                                                             java.util.Properties props)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

classifyVariables

public static java.util.List classifyVariables(java.util.Map varMap,
                                               java.util.Map cs)
                                        throws java.lang.Exception
This methode take map of variables and map of context_signature and return list of VariableData.

Parameters:
varMap - map of varibles
cs - context signature for process
Returns:
list of varibles
Throws:
java.lang.Exception

extractVariablesIdsFromXPIL

public static java.util.List extractVariablesIdsFromXPIL(org.enhydra.shark.xpil.XPILExtendedWorkflowFacilityInstanceDocument xpil)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

fillHeader

public static void fillHeader(WMSessionHandle shandle,
                              org.enhydra.shark.xpil.XPILHeaderDocument.Header header)
                       throws java.lang.Exception
Throws:
java.lang.Exception

convertNodeToXMLString

public static java.lang.String convertNodeToXMLString(org.enhydra.shark.xpil.XPILExtendedWorkflowFacilityInstanceDocument instanceDocument)

getDateFormater

protected static java.text.SimpleDateFormat getDateFormater(java.util.Properties props)

setSimulatedNullValue

protected static void setSimulatedNullValue(org.apache.xmlbeans.XmlObject di,
                                            boolean ignoreIfAttrExists,
                                            java.util.Properties props)
                                     throws java.lang.Exception
Throws:
java.lang.Exception