public class

YammerConnector

extends Object
java.lang.Object
   ↳ org.mule.yammer.YammerConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Connector for Yammer related functions. Yammer is a social-network-like internal corporate communications system, where users are able to post messages, follow users, images and so on in a manner like Facebook or Twitter. This connector allows to:

  • Retrieve messages
  • Retrieve received messages
  • Retrieve private messages
  • Retrieve sent messages

It's necessary to set in yammer (https://www.yammer.com/client_applications where you can create an application or edit it) the next Callback URL:

http://{host}:{port}/yammerCodeRetrievingPath

where the {host} is the same host as the Website of the yammer application.

Then you have to configure yammer:

<http:connector name="connector.http.mule.default" enableCookies="true" keepAlive="true" />

<yammer:config consumerKey="${consumerKey}" consumerSecret="${consumerSecret}">
<yammer:http-callback-config domain="{host}" remotePort="SOME_PORT" localPort="{port}" />
</yammer:config>

where {host} and {port} are the same of the Callback URL used before.

Summary

Fields
private Client client
private String consumerKey The OAuth consumer key
private String consumerSecret The OAuth consumer secret
private boolean debug If connector should be run in debug mode.
protected Log logger
Public Constructors
YammerConnector()
Public Methods
Client getClient()
String getConsumerKey()
String getConsumerSecret()
List<Message> getFollowingMessages(String accessToken)
Answers the list of messages followed by the logged-in user.
List<Message> getMessages(String accessToken)
Answers all messages in this network.
List<Message> getPrivateMessages(String accessToken)
Answers the whole list of private Messages (aka Direct Messages) for the logged-in user.
List<Message> getReceivedMessages(String accessToken)
Answers the list of messages received by the logged-in user.
List<Message> getSentMessages(String accessToken)
Answers the whole list of messages sent by the current user.
void initialise()
boolean isDebug()
void setClient(Client client)
void setConsumerKey(String applicationKey)
void setConsumerSecret(String applicationSecret)
void setDebug(boolean debug)
Protected Methods
WebResource oauthResource(String url, String accessToken)
Creates a WebResource with the proper oauth authentication information.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private Client client

private String consumerKey

The OAuth consumer key

private String consumerSecret

The OAuth consumer secret

private boolean debug

If connector should be run in debug mode. This enables logging of HTTP activity against Yammer

protected Log logger

Public Constructors

public YammerConnector ()

Public Methods

public Client getClient ()

public String getConsumerKey ()

public String getConsumerSecret ()

public List<Message> getFollowingMessages (String accessToken)

Answers the list of messages followed by the logged-in user. Corresponds to the "My Feed" tab on the website.

Parameters
accessToken OAuth access token
Returns

public List<Message> getMessages (String accessToken)

Answers all messages in this network. Corresponds to the "Company Feed" tab on the website.

Parameters
accessToken OAuth access token
Returns

public List<Message> getPrivateMessages (String accessToken)

Answers the whole list of private Messages (aka Direct Messages) for the logged-in user. Corresponds to the "Direct Messages" section on the website.

Parameters
accessToken OAuth access token
Returns

public List<Message> getReceivedMessages (String accessToken)

Answers the list of messages received by the logged-in user. Corresponds to the "Received" tab on the website.

Parameters
accessToken OAuth access token
Returns

public List<Message> getSentMessages (String accessToken)

Answers the whole list of messages sent by the current user. Corresponds to the "Sent" tab on the website.

Parameters
accessToken OAuth access token
Returns

public void initialise ()

public boolean isDebug ()

public void setClient (Client client)

Parameters
client

public void setConsumerKey (String applicationKey)

Parameters
applicationKey

public void setConsumerSecret (String applicationSecret)

Parameters
applicationSecret

public void setDebug (boolean debug)

Parameters
debug

Protected Methods

protected WebResource oauthResource (String url, String accessToken)

Creates a WebResource with the proper oauth authentication information.

Parameters
url The url of the resource
accessToken OAuth access token
Returns
  • the authenticated WebResource