org.camunda.bpm.cycle.connector
Class Connector

java.lang.Object
  extended by org.camunda.bpm.cycle.connector.Connector
Direct Known Subclasses:
GitConnector, SignavioConnector, SvnConnector, VfsConnector

public abstract class Connector
extends Object


Constructor Summary
Connector()
           
 
Method Summary
abstract  ConnectorNode createNode(String parentId, String label, ConnectorNodeType type, String message)
           
abstract  void deleteNode(ConnectorNode node, String message)
           
 void dispose()
           
abstract  List<ConnectorNode> getChildren(ConnectorNode parent)
           
 ConnectorConfiguration getConfiguration()
           
abstract  InputStream getContent(ConnectorNode node)
          Get the contents of the given node as an input stream.
abstract  ContentInformation getContentInformation(ConnectorNode node)
          Returns a ContentInformation for the given connector node.
 Long getId()
           
abstract  ConnectorNode getNode(String id)
          Returns a ConnectorNode to the assigned id.
abstract  ConnectorNode getRoot()
           
 void init()
           
 void init(ConnectorConfiguration config)
           
abstract  boolean isSupportsCommitMessage()
           
 void login(String userName, String password)
           
abstract  boolean needsLogin()
           
 void setConfiguration(ConnectorConfiguration configuration)
           
abstract  ContentInformation updateContent(ConnectorNode node, InputStream newContent, String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connector

public Connector()
Method Detail

getChildren

public abstract List<ConnectorNode> getChildren(ConnectorNode parent)

getRoot

public abstract ConnectorNode getRoot()

getNode

public abstract ConnectorNode getNode(String id)
Returns a ConnectorNode to the assigned id. If a ConnectorNode could not be found, the value null will be returned.

Parameters:
id - Represents the id of a ConnectorNode to search.
Returns:
A ConnectorNode to the assigned id or null if no ConnectorNode found.

getContent

public abstract InputStream getContent(ConnectorNode node)
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().

Parameters:
node -
Returns:
the input stream of the file

getContentInformation

public abstract ContentInformation getContentInformation(ConnectorNode node)
Returns a ContentInformation for the given connector node. May never return null or throw an exception.

Parameters:
node -
Returns:

createNode

public abstract ConnectorNode createNode(String parentId,
                                         String label,
                                         ConnectorNodeType type,
                                         String message)

deleteNode

public abstract void deleteNode(ConnectorNode node,
                                String message)

updateContent

public abstract ContentInformation updateContent(ConnectorNode node,
                                                 InputStream newContent,
                                                 String message)
                                          throws Exception
Throws:
Exception

login

public void login(String userName,
                  String password)

dispose

public void dispose()

needsLogin

public abstract boolean needsLogin()

getConfiguration

public ConnectorConfiguration getConfiguration()

setConfiguration

public void setConfiguration(ConnectorConfiguration configuration)

init

public void init(ConnectorConfiguration config)

init

public void init()

getId

public Long getId()

isSupportsCommitMessage

public abstract boolean isSupportsCommitMessage()


Copyright © 2014 camunda services GmbH. All rights reserved.