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

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

@Component
public class SignavioConnector
extends Connector


Nested Class Summary
protected static class SignavioConnector.Command<T>
          Command to be executed in executeCommand(org.camunda.bpm.cycle.connector.signavio.SignavioConnector.Command).
 
Field Summary
static String CONFIG_KEY_PROXY_PASSWORD
           
static String CONFIG_KEY_PROXY_URL
           
static String CONFIG_KEY_PROXY_USERNAME
           
static String CONFIG_KEY_SIGNAVIO_BASE_URL
           
 
Constructor Summary
SignavioConnector()
           
 
Method Summary
 ConnectorNode createNode(String parentId, String label, ConnectorNodeType type, String message)
           
 void deleteNode(ConnectorNode node, String message)
           
 void dispose()
           
protected
<T> T
executeCommand(SignavioConnector.Command<T> command)
          Execute a command and catch / process a number of specific errors
 List<ConnectorNode> getChildren(ConnectorNode parent)
           
 InputStream getContent(ConnectorNode node)
          Get the contents of the given node as an input stream.
 ContentInformation getContentInformation(ConnectorNode node)
          Returns a ContentInformation for the given connector node.
protected  String getDefaultCommitMessage()
           
 ConnectorNode getNode(String id)
          Returns a ConnectorNode to the assigned id.
 ConnectorNode getPrivateFolder()
           
 ConnectorNode getRoot()
           
protected  SignavioClient getSignavioClient()
           
protected  ConnectorNode importContent(ConnectorNode parent, String content)
           
protected  ConnectorNode importContent(ConnectorNode parent, String content, String modelName)
           
 List<ConnectorNode> importSignavioArchive(ConnectorNode parentFolder, String signavioArchive)
           
 void init(ConnectorConfiguration config)
           
 boolean isSupportsCommitMessage()
           
 void login(String username, String password)
           
 boolean needsLogin()
           
 ContentInformation updateContent(ConnectorNode node, InputStream newContent, String message)
           
 
Methods inherited from class org.camunda.bpm.cycle.connector.Connector
getConfiguration, getId, init, setConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_KEY_SIGNAVIO_BASE_URL

public static final String CONFIG_KEY_SIGNAVIO_BASE_URL
See Also:
Constant Field Values

CONFIG_KEY_PROXY_URL

public static final String CONFIG_KEY_PROXY_URL
See Also:
Constant Field Values

CONFIG_KEY_PROXY_USERNAME

public static final String CONFIG_KEY_PROXY_USERNAME
See Also:
Constant Field Values

CONFIG_KEY_PROXY_PASSWORD

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

SignavioConnector

public SignavioConnector()
Method Detail

login

public void login(String username,
                  String password)
Overrides:
login in class Connector

needsLogin

public boolean needsLogin()
Specified by:
needsLogin in class Connector

init

public void init(ConnectorConfiguration config)
Overrides:
init in class Connector

getDefaultCommitMessage

protected String getDefaultCommitMessage()

dispose

public void dispose()
Overrides:
dispose in class Connector

deleteNode

public void deleteNode(ConnectorNode node,
                       String message)
Specified by:
deleteNode in class Connector

createNode

public ConnectorNode createNode(String parentId,
                                String label,
                                ConnectorNodeType type,
                                String message)
Specified by:
createNode in class Connector

getChildren

public List<ConnectorNode> getChildren(ConnectorNode parent)
Specified by:
getChildren in class Connector

getContent

public InputStream getContent(ConnectorNode node)
Description copied from class: Connector
Get the contents of the given node as an input stream. Implementations must handle the node correctly, especially concerning the nodes type accessible via ConnectorNode.getType().

Specified by:
getContent in class Connector
Returns:
the input stream of the file

getRoot

public ConnectorNode getRoot()
Specified by:
getRoot in class Connector

updateContent

public ContentInformation updateContent(ConnectorNode node,
                                        InputStream newContent,
                                        String message)
                                 throws Exception
Specified by:
updateContent in class Connector
Throws:
Exception

getContentInformation

public ContentInformation getContentInformation(ConnectorNode node)
Description copied from class: Connector
Returns a ContentInformation for the given connector node. May never return null or throw an exception.

Specified by:
getContentInformation in class Connector
Returns:

getPrivateFolder

public ConnectorNode getPrivateFolder()

importContent

protected ConnectorNode importContent(ConnectorNode parent,
                                      String content)
                               throws Exception
Throws:
Exception

importContent

protected ConnectorNode importContent(ConnectorNode parent,
                                      String content,
                                      String modelName)
                               throws Exception
Throws:
Exception

importSignavioArchive

public List<ConnectorNode> importSignavioArchive(ConnectorNode parentFolder,
                                                 String signavioArchive)
                                          throws Exception
Throws:
Exception

getSignavioClient

protected SignavioClient getSignavioClient()

getNode

public ConnectorNode getNode(String id)
Description copied from class: Connector
Returns a ConnectorNode to the assigned id. If a ConnectorNode could not be found, the value null will be returned.

Specified by:
getNode in class Connector
Parameters:
id - Represents the id of a ConnectorNode to search.
Returns:
A ConnectorNode to the assigned id or null if no ConnectorNode found.

isSupportsCommitMessage

public boolean isSupportsCommitMessage()
Specified by:
isSupportsCommitMessage in class Connector

executeCommand

protected <T> T executeCommand(SignavioConnector.Command<T> command)
Execute a command and catch / process a number of specific errors

Type Parameters:
T -
Parameters:
command -
Returns:


Copyright © 2014 camunda services GmbH. All rights reserved.