public abstract class

GetSatisfactionConnector

extends Object
java.lang.Object
   ↳ org.mule.module.getsatisfaction.GetSatisfactionConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

GetSatisfaction Cloud Connector

Allows to access the services provided by GetSatisfaction in a RESTful manner.

Get Satisfaction is the leading customer engagement platform that helps companies build better relationships with their customers and prospects, and better relationships mean better business. Get Satisfaction powers 70,000 customer communities for companies of all sizes and over 4 million registered users interact with top global brands on Get Satisfaction. With Get Satisfaction, you can quickly set-up an online customer community to engage with your customers anywhere they are: your website, Facebook, search and mobile devices.

Summary

Fields
private String companyName Fastpass url connection
private String email Email address of the user
private String fullName Full name of the user
private HttpClient httpClient REST Http Client
private String key FastPass Key
private String secret FastPass Secret
private String uid User Identification
Public Constructors
GetSatisfactionConnector()
Public Methods
void connect(String uid, String email, String fullName)
Create a new connection to get satisfaction
String connectionId()
Connection ID
abstract String createReplyForTopic(String idOrSlug, Reply reply)
Create reply at company

abstract String createTopicAtCompany(String companyId, Topic topic)
Create topic at company

void disconnect()
Disconnect
String getCompanyName()
String getEmail()
String getFullName()
HttpClient getHttpClient()
String getKey()
abstract List<Product> getProductsByCompany(String company)
Get all products in a particular community

abstract List<Reply> getRepliesByTopic(String idOrSlug, ReplyFilterCriteria filterBy, Boolean includeComments)
Get all replies for a topic

abstract List<Reply> getRepliesByUser(String userId, ReplyFilterCriteria filterBy, Boolean includeComments)
Get all replies made by a user

String getSecret()
abstract Topic getTopic(String idOrSlug)
Get a specific topic

abstract Topic getTopicByCompany(String company, String idOrSlug)
Get a topic in a particular community

abstract List<Topic> getTopics(String search, SortCriteria sortBy, Style style, Long activeSince, String userId, List<String> products, String tag, List<Status> status, List<String> userDefinedCodes)
Get all topics in all public Get Satisfaction communities

abstract List<Topic> getTopicsByCompany(String company)
Get all topics in a particular community

abstract List<Topic> getTopicsByCompanyAndProduct(String company, String product, String query)
Get all topics in a particular community for a specific product

String getUid()
boolean isConnected()
Are we connected
void setCompanyName(String companyName)
void setEmail(String email)
void setFullName(String fullName)
void setHttpClient(HttpClient httpClient)
void setKey(String key)
void setSecret(String secret)
void setUid(String uid)
static String transformGsObjectToJson(Object obj)
Create a JSON representation of an object from GetSatisfaction.
static List<Product> transformJsonToProducts(String json)
Transform JSON to a list of products

static List<Reply> transformJsonToReplies(String json)
Transform JSON to a list of replies

static Topic transformJsonToTopic(String json)
Transform JSON to a topic

static List<Topic> transformJsonToTopics(String json)
Transform JSON to a list of topics

static String transformProductToJson(Product product)
Create a JSON representation of a Product object

static String transformProductsToJson(List<Product> products)
Create a JSON representation of a list of Product objects

static String transformReplyToJson(Reply reply)
Create a JSON representation of a Reply object

static String transformReplysToJson(List<Reply> replys)
Create a JSON representation of a list of Reply objects

static String transformTopicToJson(Topic topic)
Create a JSON representation of a Topic object

static String transformTopicsToJson(List<Topic> topics)
Create a JSON representation of a list of Topic objects

[Expand]
Inherited Methods
From class java.lang.Object

Fields

private String companyName

Fastpass url connection

private String email

Email address of the user

private String fullName

Full name of the user

private HttpClient httpClient

REST Http Client

private String key

FastPass Key

private String secret

FastPass Secret

private String uid

User Identification

Public Constructors

public GetSatisfactionConnector ()

Public Methods

public void connect (String uid, String email, String fullName)

Create a new connection to get satisfaction

Parameters
uid User id
email The email of the user
fullName Full name of the user
Throws
ConnectionException If a connection cannot be made

public String connectionId ()

Connection ID

public abstract String createReplyForTopic (String idOrSlug, Reply reply)

Create reply at company

Parameters
idOrSlug Topic Id or Slug
reply Reply to reply
Returns
  • A JSON representing a reply
Throws
IOException If there is a communication error

public abstract String createTopicAtCompany (String companyId, Topic topic)

Create topic at company

Parameters
companyId Company Id
topic Topic to create
Returns
  • A JSON representing a reply
Throws
IOException If there is a communication error

public void disconnect ()

Disconnect

public String getCompanyName ()

public String getEmail ()

public String getFullName ()

public HttpClient getHttpClient ()

public String getKey ()

public abstract List<Product> getProductsByCompany (String company)

Get all products in a particular community

Parameters
company Company Id
Returns
  • A JSON representing a topic
Throws
IOException If there is a communication error

public abstract List<Reply> getRepliesByTopic (String idOrSlug, ReplyFilterCriteria filterBy, Boolean includeComments)

Get all replies for a topic

Parameters
idOrSlug Topic Slug or Id
filterBy Filter by
includeComments Ixclude comments from the returned replies
Returns
  • A JSON representing a reply
Throws
IOException If there is a communication error

public abstract List<Reply> getRepliesByUser (String userId, ReplyFilterCriteria filterBy, Boolean includeComments)

Get all replies made by a user

Parameters
userId User Id
filterBy Filter by
includeComments Ixclude comments from the returned replies
Returns
  • A JSON representing a reply
Throws
IOException If there is a communication error

public String getSecret ()

public abstract Topic getTopic (String idOrSlug)

Get a specific topic

Parameters
idOrSlug Topic Slug or Id
Returns
  • A JSON representing a topic
Throws
IOException If there is a communication error

public abstract Topic getTopicByCompany (String company, String idOrSlug)

Get a topic in a particular community

Parameters
company Company Id
idOrSlug Topic Slug or Id
Returns
  • A JSON representing a topic
Throws
IOException If there is a communication error

public abstract List<Topic> getTopics (String search, SortCriteria sortBy, Style style, Long activeSince, String userId, List<String> products, String tag, List<Status> status, List<String> userDefinedCodes)

Get all topics in all public Get Satisfaction communities

Parameters
search Search for a particular string
sortBy Sort criteria
style Filter by style
activeSince Filter by the time of the last activity in the community. Time is set in seconds since epoch.
userId Filter by used id
products Filter by product name in API queries where the company is specified (for example, /companies/[company name or company ID]/topics)
tag Filter by tag
status Filter by status
userDefinedCodes Filter by User Defined Code (in communities with UDCs enabled)
Returns
  • A JSON representing a topic
Throws
IOException If there is a communication error

public abstract List<Topic> getTopicsByCompany (String company)

Get all topics in a particular community

Parameters
company Company Id
Returns
  • A JSON representing a topic
Throws
IOException If there is a communication error

public abstract List<Topic> getTopicsByCompanyAndProduct (String company, String product, String query)

Get all topics in a particular community for a specific product

Parameters
company Company Id
product Product Id
query Query
Returns
  • A JSON representing a topic
Throws
IOException If there is a communication error

public String getUid ()

public boolean isConnected ()

Are we connected

public void setCompanyName (String companyName)

Parameters
companyName

public void setEmail (String email)

Parameters
email

public void setFullName (String fullName)

Parameters
fullName

public void setHttpClient (HttpClient httpClient)

Parameters
httpClient

public void setKey (String key)

Parameters
key

public void setSecret (String secret)

Parameters
secret

public void setUid (String uid)

Parameters
uid

public static String transformGsObjectToJson (Object obj)

Create a JSON representation of an object from GetSatisfaction.

Supported objects are Topic and Reply.

Supported list are list of Topic, list of Reply and list of Product

Parameters
obj The object to transform
Returns
  • A JSON representation of the object
Throws
IOException If there is a transformation error

public static List<Product> transformJsonToProducts (String json)

Transform JSON to a list of products

Parameters
json JSON string to transform
Returns
Throws
IOException If there is a transformation error

public static List<Reply> transformJsonToReplies (String json)

Transform JSON to a list of replies

Parameters
json JSON string to transform
Returns
Throws
IOException If there is a transformation error

public static Topic transformJsonToTopic (String json)

Transform JSON to a topic

Parameters
json JSON string to transform
Returns
Throws
IOException If there is a transformation error

public static List<Topic> transformJsonToTopics (String json)

Transform JSON to a list of topics

Parameters
json JSON string to transform
Returns
Throws
IOException If there is a transformation error

public static String transformProductToJson (Product product)

Create a JSON representation of a Product object

Parameters
product Product to transform
Returns
  • A JSON representation of a Product object
Throws
IOException If there is a transformation error

public static String transformProductsToJson (List<Product> products)

Create a JSON representation of a list of Product objects

Parameters
products List of Product to transform
Returns
  • A JSON representation of a list of Product objects
Throws
IOException If there is a transformation error

public static String transformReplyToJson (Reply reply)

Create a JSON representation of a Reply object

Parameters
reply Reply to transform
Returns
  • A JSON representation of a Reply object
Throws
IOException If there is a transformation error

public static String transformReplysToJson (List<Reply> replys)

Create a JSON representation of a list of Reply objects

Parameters
replys List of Product to transform
Returns
  • A JSON representation of a list of Reply objects
Throws
IOException If there is a transformation error

public static String transformTopicToJson (Topic topic)

Create a JSON representation of a Topic object

Parameters
topic Topic to transform
Returns
  • A JSON representation of a Topic object
Throws
IOException If there is a transformation error

public static String transformTopicsToJson (List<Topic> topics)

Create a JSON representation of a list of Topic objects

Parameters
topics List of Topic to transform
Returns
  • A JSON representation of a list of Topic objects
Throws
IOException If there is a transformation error