API - Documentation
This
API documentation is addressed to a developer which want to use this api.
Getting Started
First of all you need
API-Key. For those please contact
us.
the
API-Key is limited to the usage of one domain. If run the you site on multiple domains, you need a new key for all of them.
For test purpose you can use
5fffe6506fa8ce56 (for localhost server) or
e59fd9ebbe8391f4 (for 127.0.0.1 domain).
The next step is to create a new html file and add the script-tag to include the js-file from
http://localhost:8080/backend/poem/api as parameter you Have to add the
API-Key like
http://localhost:8080/backend/poem/api?key=e59fd9ebbe8391f4
Now you can use the
API...
Constructor
| Construtor | Description |
|
ORYX.API.Editor( stencilset:String )
|
To create a new instance of the editor api, the stencilset must be given. All available stencilsets are listed in the Constant section.
|
Methods
| Methods | Return Value | Description |
render()
render( id:String )
render( node:Node )
|
none
|
This renders the editor into the given element. If there is no element, it will be rendered to the body.
|
|
loadStencilSetExtention( namespace:String )
|
none
|
Load the stencilsetextention for the given namespace.
|
|
setLanguage( lang:String )
|
none
|
Set the editor to the given language and country code. Default = "en_us"
|
loadModel( modelId:String )
loadModel( url:String )
|
none
|
Loads the model data into the editor. There are two ways to specify the data. On the one hand side you can give the model id
known from the Oryx-Server (like "/model/1"). On the other side you can specify a resource in the web. With this, first of all the api tried to load the data (as a ajax request),
if there doesn't get an answer later on the server tries to reach the resource. So you can't load data which is nether on the same domain nor reachable from the web.
|
|
loadPlugin( class:String )
|
none
|
Enables the plugin with the given class.
|
|
unloadPlugin( class:String )
|
none
|
Disables the plugin with the given class.
|
loadPerspective( perspective:String, readOnly?:Boolean )
|
none
|
Loads a bundle of plugins. As a second argument, you can specify if the editor should be in read only mode (therefore some plugins get not loaded).Default = ORYX.API.CONST.PERSPECTIVE.NORMAL. The available perspectives are specifies in the Constant-Perspective section.
|
|
checkAuth( modelid:String )
|
none
|
You can specify some model ids, where the api should check if the current user has access to the model or not. If not so, a popup gets up and the user can decide to logon or not.
|
Constants
Stencil Set URLs
| Constant | Description |
|
ORYX.API.CONST.URL.BPMN
|
The url of the bpmn stencil set.
|
|
ORYX.API.CONST.URL.EPC
|
The url of the epc stencil set.
|
|
ORYX.API.CONST.URL.PETRINET
|
The url of the petri net stencil set.
|
|
ORYX.API.CONST.URL.WORKFLOWNET
|
The url of the workflow stencil set.
|
|
ORYX.API.CONST.URL.FMC
|
The url of the fmc block diagram stencil set.
|
|
ORYX.API.CONST.URL.XFORMS
|
The url of the xforms stencil set.
|
Language Codes
| Constant | Description |
|
ORYX.API.CONST.LANGUAGE.DE
|
German
|
|
ORYX.API.CONST.LANGUAGE.EN
|
English
|
|
ORYX.API.CONST.LANGUAGE.RU
|
Russian
|
|
ORYX.API.CONST.LANGUAGE.ES
|
Spanish
|
Perspectives
| Constant | Description |
|
ORYX.API.CONST.PERSPECTIVE.MINIMAL
|
Minimal perspective includes (in read only) only overlay and in addition (in write mode) drag drop, toolbar, shape repository, alignment, undo ...
|
|
ORYX.API.CONST.PERSPECTIVE.NORMAL
|
Normal perspective is the set of plugins which you use regular when you model (like import/export eRDF, PNML, ...)
|
|
ORYX.API.CONST.PERSPECTIVE.ACADEMIC
|
Academic perspective is the full set on plugins (inlcudes step through, validation, ...)
|