org.mule.yammer
Class YammerConnector

java.lang.Object
  extended by org.mule.yammer.YammerConnector
All Implemented Interfaces:
org.mule.api.lifecycle.Initialisable

@Connector(namespacePrefix="yammer")
public class YammerConnector
extends Object
implements org.mule.api.lifecycle.Initialisable

Connector for Yammer related functions.


Field Summary
protected  org.apache.commons.logging.Log logger
           
protected  String oauthVerifier
           
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Constructor Summary
YammerConnector()
           
 
Method Summary
 String getAccessToken()
           
 String getAccessTokenSecret()
           
 com.sun.jersey.api.client.Client getClient()
           
 String getConsumerKey()
           
 String getConsumerSecret()
           
 List<Message> getFollowingMessages()
           
 List<Message> getMessages()
           
 String getOauthToken()
           
 String getOauthTokenSecret()
           
 List<Message> getPrivateMessages()
           
 List<Message> getReceivedMessages()
           
 List<Message> getSentMessages()
           
 void initialise()
           
 boolean isDebug()
           
protected  com.sun.jersey.api.client.WebResource oauthResource(String url)
          Creates a WebResource with the proper oauth authentication information.
 String requestAuthorization()
          Start the OAuth request authorization process.
 void setAccessToken(String token)
           
 void setAccessTokenSecret(String secret)
           
 void setClient(com.sun.jersey.api.client.Client client)
           
 void setConsumerKey(String applicationKey)
           
 void setConsumerSecret(String applicationSecret)
           
 void setDebug(boolean debug)
           
 void setOauthToken(String oauthToken)
           
 void setOauthTokenSecret(String oauthTokenSecret)
           
 void setOauthVerifier(String oauthVerifier)
          Set the OAuth verifier after it has been retrieved via requestAuthorization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected transient org.apache.commons.logging.Log logger

oauthVerifier

protected String oauthVerifier
Constructor Detail

YammerConnector

public YammerConnector()
Method Detail

initialise

public void initialise()
                throws org.mule.api.lifecycle.InitialisationException
Specified by:
initialise in interface org.mule.api.lifecycle.Initialisable
Throws:
org.mule.api.lifecycle.InitialisationException

setOauthVerifier

@Operation
public void setOauthVerifier(String oauthVerifier)
Set the OAuth verifier after it has been retrieved via requestAuthorization. The resulting access tokens will be logged to the INFO level so the user can reuse them as part of the configuration in the future if desired.

Parameters:
oauthVerifier - The OAuth verifier code from Yammer.

requestAuthorization

@Operation
public String requestAuthorization()
Start the OAuth request authorization process. This will request a token from Yammer and return a URL which the user can visit to authorize the connector for their account.

Returns:
The user authorization URL.

getMessages

@Operation
public List<Message> getMessages()

getSentMessages

@Operation
public List<Message> getSentMessages()

getReceivedMessages

@Operation
public List<Message> getReceivedMessages()

getPrivateMessages

@Operation
public List<Message> getPrivateMessages()

getFollowingMessages

@Operation
public List<Message> getFollowingMessages()

oauthResource

protected com.sun.jersey.api.client.WebResource oauthResource(String url)
Creates a WebResource with the proper oauth authentication information.

Parameters:
url -
Returns:

getClient

public com.sun.jersey.api.client.Client getClient()

setClient

public void setClient(com.sun.jersey.api.client.Client client)

getConsumerKey

public String getConsumerKey()

setConsumerKey

public void setConsumerKey(String applicationKey)

getConsumerSecret

public String getConsumerSecret()

setConsumerSecret

public void setConsumerSecret(String applicationSecret)

isDebug

public boolean isDebug()

setDebug

public void setDebug(boolean debug)

getOauthTokenSecret

public String getOauthTokenSecret()

setOauthTokenSecret

public void setOauthTokenSecret(String oauthTokenSecret)

getOauthToken

public String getOauthToken()

setOauthToken

public void setOauthToken(String oauthToken)

getAccessToken

public String getAccessToken()

setAccessToken

public void setAccessToken(String token)

getAccessTokenSecret

public String getAccessTokenSecret()

setAccessTokenSecret

public void setAccessTokenSecret(String secret)


Copyright © 2011. All Rights Reserved.