|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.bpmn2.ui.diagram.util.Bpmn2ResourceUtil
com.ibm.xtools.bpmn2.modeler.ui.util.BPMNModeler
public class BPMNModeler
A utility class that exposes bpmn model and provides some basic operations associated with it.
Method Summary | |
---|---|
static void |
closeModel(BaseElement element)
It closes a model. |
static RootElement |
createResource(org.eclipse.emf.common.util.URI uri,
com.ibm.xtools.bpmn2.ui.diagram.util.Bpmn2DiagramType diagramType)
It creates a bpmn resource for a given uri. |
static org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingdomain()
It returns shared editing domain for BPMN2 models. |
static java.util.Collection<Definitions> |
getOpenModelDefinitions()
It returns Definitions s of all the open bpmn2 models. |
static Definitions |
openModel(org.eclipse.emf.common.util.URI uri)
It loads a resource represented by passed uri. |
static void |
saveModel(BaseElement element)
It saves a bpmn model. |
Methods inherited from class com.ibm.xtools.bpmn2.ui.diagram.util.Bpmn2ResourceUtil |
---|
createDiagram, createResource, getResource, getResource, getResource, getResource, isSupportedResource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.eclipse.emf.transaction.TransactionalEditingDomain getEditingdomain()
null
if it could not be found or created.public static RootElement createResource(org.eclipse.emf.common.util.URI uri, com.ibm.xtools.bpmn2.ui.diagram.util.Bpmn2DiagramType diagramType)
Bpmn2DiagramType
.
Bpmn2DiagramType
s are supported:
Bpmn2DiagramType.PRIVATE_PROCESS
: It corresponds to Process model in bpmn.
Bpmn2DiagramType.COLLABORATION
: It corresponds to Collaboration model in bpmn.
Bpmn2DiagramType.CHOREOGRAPHY
: It corresponds to Choreography model in bpmn.
Created model contains Definitions
with Extension
applied to it. Model is initialized with
corresponding RootElement
and resource is initialized with corresponding gmf Diagram
.
It is expected that this function is called inside write Transaction
.
uri
- The URI of resource to create.diagramType
- Type of bpmn model to create.
public static java.util.Collection<Definitions> getOpenModelDefinitions()
Definitions
s of all the open bpmn2 models.
public static Definitions openModel(org.eclipse.emf.common.util.URI uri)
uri
- URI of the resource to be loaded.
Definitions
of the loaded model.
java.lang.NullPointerException
- if uri
is null.
java.lang.IllegalStateException
- if loaded resource doesn't contains Definitions
. All bpmn models are expected to contain this element.public static void closeModel(BaseElement element)
element
- which is part of model that is to be closed.
java.lang.NullPointerException
- if passed element
is null
java.lang.IllegalArgumentException
- if passed element
is not part of a Resource
.public static void saveModel(BaseElement element)
element
- which is part of model that is to be saved.
java.lang.NullPointerException
- if passed element
is null
java.lang.IllegalArgumentException
- if passed element
is not part of a Resource
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |