public abstract class AbstractKogitoDMNService extends Object implements KogitoDMNService
Most of this code is cloned/adapted from ScenarioSimulation backend and dmn core
| Modifier and Type | Field and Description |
|---|---|
protected static QName |
TYPEREF_QNAME |
static String |
URI_FEEL |
static String |
WRONG_DMN_MESSAGE |
| Constructor and Description |
|---|
AbstractKogitoDMNService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkTypeSupport(ClientDMNType type,
org.drools.workbench.screens.scenariosimulation.kogito.client.dmn.AbstractKogitoDMNService.ErrorHolder errorHolder,
String fullPropertyPath)
Recursively visit a composite
DMNType to eventually detect and add errors to given ErrorHolder |
protected FactModelTree |
createFactModelTreeForCollection(Map<String,List<String>> genericTypeInfoMap,
String factName,
ClientDMNType type,
SortedMap<String,FactModelTree> hiddenFacts,
FactModelTree.Type fmType,
List<String> alreadyVisited)
Creates a
FactModelTree for DMNType where DMNType.isCollection() == true |
protected FactModelTree |
createFactModelTreeForComposite(Map<String,List<String>> genericTypeInfoMap,
String name,
String fullPropertyPath,
ClientDMNType type,
SortedMap<String,FactModelTree> hiddenFacts,
FactModelTree.Type fmType,
List<String> alreadyVisited)
Creates a
FactModelTree for DMNType where DMNType.isComposite() == true |
protected FactModelTree |
createFactModelTreeForGenericType(Map<String,List<String>> genericTypeInfoMap,
String factName,
String propertyName,
String fullPropertyPath,
ClientDMNType type,
SortedMap<String,FactModelTree> hiddenFacts,
FactModelTree.Type fmType,
List<String> alreadyVisited)
Creates a
FactModelTree for DMNType |
protected FactModelTree |
createFactModelTreeForNoCollection(Map<String,List<String>> genericTypeInfoMap,
String factName,
String propertyName,
String fullPropertyPath,
ClientDMNType type,
SortedMap<String,FactModelTree> hiddenFacts,
FactModelTree.Type fmType,
List<String> alreadyVisited)
Creates a
FactModelTree for DMNType where DMNType.isCollection() ! |
protected FactModelTree |
createFactModelTreeForSimple(Map<String,List<String>> genericTypeInfoMap,
String factName,
String propertyClass,
FactModelTree.Type fmType)
Creates a
FactModelTree for DMNType where DMNType.isComposite() ! |
protected FactModelTree |
createTopLevelFactModelTree(String factName,
ClientDMNType type,
SortedMap<String,FactModelTree> hiddenFacts,
FactModelTree.Type fmType)
This method is the entry point for
FactModelTree. |
protected ClientDMNType |
getDMNTypeFromMaps(Map<String,ClientDMNType> dmnTypesMap,
Map<QName,String> source) |
protected Map<String,ClientDMNType> |
getDMNTypesMap(List<org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITItemDefinition> jsitItemDefinitions,
String nameSpace) |
FactModelTuple |
getFactModelTuple(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions jsitDefinitions) |
Map<QName,String> |
getOtherAttributesMap(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElement jsitInputDataVariable) |
protected void |
internalCheckTypeSupport(ClientDMNType type,
boolean alreadyInCollection,
org.drools.workbench.screens.scenariosimulation.kogito.client.dmn.AbstractKogitoDMNService.ErrorHolder errorHolder,
String fullPropertyPath,
Set<String> alreadyVisited) |
boolean |
isJSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement jsitdrgElement) |
boolean |
isJSITInputData(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement jsitdrgElement) |
protected boolean |
isToBeManagedAsCollection(ClientDMNType type)
Return
true if the given DMNType has to be managed as collection |
protected boolean |
isToBeManagedAsComposite(ClientDMNType type)
Return
true if the given DMNType has to be managed as composite |
protected String |
populateGeneric(Map<String,List<String>> genericTypeInfoMap,
String fullPropertyPath,
String type)
This method map the given name to List.class.getCanonicalName() inside simpleFields,
and map name to a singleton list containing a newly generated key (path + "." + type) inside genericTypeInfoMap
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDMNContentpublic static final String URI_FEEL
public static final String WRONG_DMN_MESSAGE
protected static final QName TYPEREF_QNAME
public FactModelTuple getFactModelTuple(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions jsitDefinitions)
getFactModelTuple in interface KogitoDMNServiceprotected ClientDMNType getDMNTypeFromMaps(Map<String,ClientDMNType> dmnTypesMap, Map<QName,String> source)
protected Map<String,ClientDMNType> getDMNTypesMap(List<org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITItemDefinition> jsitItemDefinitions, String nameSpace)
protected void checkTypeSupport(ClientDMNType type, org.drools.workbench.screens.scenariosimulation.kogito.client.dmn.AbstractKogitoDMNService.ErrorHolder errorHolder, String fullPropertyPath)
DMNType to eventually detect and add errors to given ErrorHoldertype - errorHolder - fullPropertyPath - protected void internalCheckTypeSupport(ClientDMNType type, boolean alreadyInCollection, org.drools.workbench.screens.scenariosimulation.kogito.client.dmn.AbstractKogitoDMNService.ErrorHolder errorHolder, String fullPropertyPath, Set<String> alreadyVisited)
type - alreadyInCollection - errorHolder - fullPropertyPath - alreadyVisited - protected FactModelTree createTopLevelFactModelTree(String factName, ClientDMNType type, SortedMap<String,FactModelTree> hiddenFacts, FactModelTree.Type fmType)
FactModelTree. It is the one to be called from the very top level DMNTypefactName - type - hiddenFacts - fmType - protected boolean isToBeManagedAsCollection(ClientDMNType type)
true if the given DMNType has to be managed as collectiontype - true if DMNType.isCollection() == true and BaseDMNTypeImpl.getFeelType() != BuiltInType.UNKNOWNprotected boolean isToBeManagedAsComposite(ClientDMNType type)
true if the given DMNType has to be managed as compositetype - true if DMNType.isCollection() == true and BaseDMNTypeImpl.getFeelType() != BuiltInType.UNKNOWNprotected FactModelTree createFactModelTreeForCollection(Map<String,List<String>> genericTypeInfoMap, String factName, ClientDMNType type, SortedMap<String,FactModelTree> hiddenFacts, FactModelTree.Type fmType, List<String> alreadyVisited)
FactModelTree for DMNType where DMNType.isCollection() == truegenericTypeInfoMap - factName - type - hiddenFacts - fmType - alreadyVisited - Exception - if DMNType.isCollection() != trueprotected String populateGeneric(Map<String,List<String>> genericTypeInfoMap, String fullPropertyPath, String type)
genericTypeInfoMap - fullPropertyPath - type - protected FactModelTree createFactModelTreeForNoCollection(Map<String,List<String>> genericTypeInfoMap, String factName, String propertyName, String fullPropertyPath, ClientDMNType type, SortedMap<String,FactModelTree> hiddenFacts, FactModelTree.Type fmType, List<String> alreadyVisited)
FactModelTree for DMNType where DMNType.isCollection() != truegenericTypeInfoMap - factName - propertyName - fullPropertyPath - type - hiddenFacts - fmType - alreadyVisited - Exception - if DMNType.isCollection() == trueprotected FactModelTree createFactModelTreeForGenericType(Map<String,List<String>> genericTypeInfoMap, String factName, String propertyName, String fullPropertyPath, ClientDMNType type, SortedMap<String,FactModelTree> hiddenFacts, FactModelTree.Type fmType, List<String> alreadyVisited)
FactModelTree for DMNTypegenericTypeInfoMap - factName - propertyName - fullPropertyPath - type - hiddenFacts - fmType - alreadyVisited - Exceptionprotected FactModelTree createFactModelTreeForSimple(Map<String,List<String>> genericTypeInfoMap, String factName, String propertyClass, FactModelTree.Type fmType)
FactModelTree for DMNType where DMNType.isComposite() != true.
Returned FactModelTree will have only one single property, whose name is VALUE and whose value is the given propertyClassgenericTypeInfoMap - factName - propertyClass - fmType - protected FactModelTree createFactModelTreeForComposite(Map<String,List<String>> genericTypeInfoMap, String name, String fullPropertyPath, ClientDMNType type, SortedMap<String,FactModelTree> hiddenFacts, FactModelTree.Type fmType, List<String> alreadyVisited)
FactModelTree for DMNType where DMNType.isComposite() == truegenericTypeInfoMap - name - fullPropertyPath - type - hiddenFacts - fmType - alreadyVisited - Exception - if DMNType.isComposite() != truepublic boolean isJSITInputData(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement jsitdrgElement)
public boolean isJSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement jsitdrgElement)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.