public class ResourceNameUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String[] |
CMMN_RESOURCE_SUFFIXES |
static String[] |
DIAGRAM_SUFFIXES |
| Constructor and Description |
|---|
ResourceNameUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getCaseDiagramResourceName(String cmmnFileResource,
String caseKey,
String diagramSuffix) |
static String |
getCaseDiagramResourceNameFromDeployment(CaseDefinitionEntity caseDefinition,
Map<String,EngineResource> resources)
Finds the name of a resource for the diagram for a case definition.
|
static String |
stripCmmnFileSuffix(String cmmnFileResource) |
public static final String[] CMMN_RESOURCE_SUFFIXES
public static final String[] DIAGRAM_SUFFIXES
public static String getCaseDiagramResourceName(String cmmnFileResource, String caseKey, String diagramSuffix)
public static String getCaseDiagramResourceNameFromDeployment(CaseDefinitionEntity caseDefinition, Map<String,EngineResource> resources)
It will first look for an image resource which matches the case specifically, before resorting to an image resource which matches the CMMN 1.1 xml file resource.
Example: if the deployment contains a CMMN 1.1 xml resource called 'abc.cmmn.xml' containing only one case with key 'myCase', then this method will look for an image resources called 'abc.myCase.png' (or .jpg, or .gif, etc.) or 'abc.png' if the previous one wasn't found.
Example 2: if the deployment contains a CMMN 1.1 xml resource called 'abc.cmmn.xml' containing three cases (with keys a, b and c), then this method will first look for an image resource called 'abc.a.png' before looking for 'abc.png' (likewise for b and c). Note that if abc.a.png, abc.b.png and abc.c.png don't exist, all cases will have the same image: abc.png.
Copyright © 2018 Flowable. All rights reserved.