org.camunda.bpm.cycle.connector.signavio
Class SignavioClient

java.lang.Object
  extended by org.camunda.bpm.cycle.connector.signavio.SignavioClient

public class SignavioClient
extends Object

Encapsulates all HTTP calls to Signavio/camunda modeler REST API using Apache HTTP 4 client.

Author:
christian.lipphardt@camunda.com

Field Summary
static String DIRECTORY_URL_SUFFIX
           
static String MODEL_URL_SUFFIX
           
 
Constructor Summary
SignavioClient(String configurationName, String signavioBaseUrl, String proxyUrl, String proxyUsername, String proxyPassword, String defaultCommitMessage)
           
 
Method Summary
 String createFolder(String name, String parent)
           
 String createModel(String parentId, String label, String message)
           
 String delete(String type, String id)
           
 void dispose()
           
protected  org.apache.http.client.fluent.Content executeAndGetContent(org.apache.http.client.fluent.Request request)
           
protected  org.apache.http.HttpResponse executeAndGetResponse(org.apache.http.client.fluent.Request request)
           
 String getChildren(String dir)
           
 String getInfo(String type, String id)
           
 String getModelAsJson(String id)
           
 String getModelAsSVG(String id)
           
 InputStream getPngContent(String model)
           
 InputStream getXmlContent(String model)
           
 String importBpmnXml(String parentFolderId, String content, String modelName)
           
 String importSignavioArchive(String parentFolderId, String signavioArchive)
           
 boolean login(String username, String password)
           
 String updateModel(String id, String label, String json, String svg, String parentId, String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_URL_SUFFIX

public static final String MODEL_URL_SUFFIX
See Also:
Constant Field Values

DIRECTORY_URL_SUFFIX

public static final String DIRECTORY_URL_SUFFIX
See Also:
Constant Field Values
Constructor Detail

SignavioClient

public SignavioClient(String configurationName,
                      String signavioBaseUrl,
                      String proxyUrl,
                      String proxyUsername,
                      String proxyPassword,
                      String defaultCommitMessage)
               throws URISyntaxException
Throws:
URISyntaxException
Method Detail

login

public boolean login(String username,
                     String password)

getChildren

public String getChildren(String dir)

getXmlContent

public InputStream getXmlContent(String model)

getPngContent

public InputStream getPngContent(String model)

getInfo

public String getInfo(String type,
                      String id)

getModelAsJson

public String getModelAsJson(String id)

getModelAsSVG

public String getModelAsSVG(String id)

delete

public String delete(String type,
                     String id)

createModel

public String createModel(String parentId,
                          String label,
                          String message)

updateModel

public String updateModel(String id,
                          String label,
                          String json,
                          String svg,
                          String parentId,
                          String message)
                   throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException

createFolder

public String createFolder(String name,
                           String parent)

importBpmnXml

public String importBpmnXml(String parentFolderId,
                            String content,
                            String modelName)
                     throws org.apache.http.ParseException,
                            IOException
Throws:
org.apache.http.ParseException
IOException

importSignavioArchive

public String importSignavioArchive(String parentFolderId,
                                    String signavioArchive)
                             throws org.apache.http.ParseException,
                                    IOException
Throws:
org.apache.http.ParseException
IOException

executeAndGetContent

protected org.apache.http.client.fluent.Content executeAndGetContent(org.apache.http.client.fluent.Request request)

executeAndGetResponse

protected org.apache.http.HttpResponse executeAndGetResponse(org.apache.http.client.fluent.Request request)

dispose

public void dispose()


Copyright © 2014 camunda services GmbH. All rights reserved.