public class

Config

extends Object
java.lang.Object
   ↳ org.mule.modules.freshbooks.Config
Known Direct Subclasses

Summary

Fields
private String accessTokenIdentifierPrefix Prefix used for storing credentials in ObjectStore.
private DefaultFreshBooksClient client
private int defaultMaxConnectionPerRoute Default max number of connections per route
private static final Logger logger
private int maxTotalConnection Maximum number of total connections
private ObjectStore objectStore Object store reference
private ObjectStoreHelper objectStoreHelper Object store helper
Public Constructors
Config()
Constructs a new Config Instance with default configuration values set to false.
Public Methods
void connect(String apiUrl, String consumerKey, String consumerSecret)
Connect to a FreshBooks client
String connectionIdentifier()
Returns the beginning of the tenant key identifier
void disconnect()
Clear the current connection and resources
String getAccessTokenIdentifierPrefix()
DefaultFreshBooksClient getClient()
String getConsumerKey()
String getConsumerSecret()
int getDefaultMaxConnectionPerRoute()
int getMaxTotalConnection()
ObjectStore getObjectStore()
ObjectStoreHelper getObjectStoreHelper()
boolean isConnected()
Validate is active connection
void setAccessTokenIdentifierPrefix(String accessTokenIdentifierPrefix)
void setClient(DefaultFreshBooksClient client)
void setDefaultMaxConnectionPerRoute(int defaultMaxConnectionPerRoute)
void setMaxTotalConnection(int maxTotalConnection)
void setObjectStore(ObjectStore objectStore)
void setObjectStoreHelper(ObjectStoreHelper objectStoreHelper)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private String accessTokenIdentifierPrefix

Prefix used for storing credentials in ObjectStore. It will be concatenated to the access token identifier.

E.g. prefix: "fb_", user identifier: "12345", key for object store "fb_12345"

private DefaultFreshBooksClient client

private int defaultMaxConnectionPerRoute

Default max number of connections per route

private static final Logger logger

private int maxTotalConnection

Maximum number of total connections

private ObjectStore objectStore

Object store reference

private ObjectStoreHelper objectStoreHelper

Object store helper

Public Constructors

public Config ()

Constructs a new Config Instance with default configuration values set to false.

Public Methods

public void connect (String apiUrl, String consumerKey, String consumerSecret)

Connect to a FreshBooks client

Parameters
apiUrl
consumerKey
consumerSecret
Throws
ConnectionException when the connection process failed

public String connectionIdentifier ()

Returns the beginning of the tenant key identifier

Returns
  • String with the first part of the key

public void disconnect ()

Clear the current connection and resources

public String getAccessTokenIdentifierPrefix ()

public DefaultFreshBooksClient getClient ()

public String getConsumerKey ()

public String getConsumerSecret ()

public int getDefaultMaxConnectionPerRoute ()

public int getMaxTotalConnection ()

public ObjectStore getObjectStore ()

public ObjectStoreHelper getObjectStoreHelper ()

public boolean isConnected ()

Validate is active connection

public void setAccessTokenIdentifierPrefix (String accessTokenIdentifierPrefix)

Parameters
accessTokenIdentifierPrefix

public void setClient (DefaultFreshBooksClient client)

Parameters
client

public void setDefaultMaxConnectionPerRoute (int defaultMaxConnectionPerRoute)

Parameters
defaultMaxConnectionPerRoute

public void setMaxTotalConnection (int maxTotalConnection)

Parameters
maxTotalConnection

public void setObjectStore (ObjectStore objectStore)

Parameters
objectStore

public void setObjectStoreHelper (ObjectStoreHelper objectStoreHelper)

Parameters
objectStoreHelper