lumis.socialnetworkintegration.connector
Class TwitterConnector

Package class diagram package TwitterConnector
java.lang.Object
  extended by lumis.socialnetworkintegration.connector.TwitterConnector
All Implemented Interfaces:
ISocialNetworkConnector

public class TwitterConnector
extends Object
implements ISocialNetworkConnector

Twitter implementation.

Since:
6.1.0

Field Summary
static String NETWORK_NAME
           
 
Constructor Summary
TwitterConnector()
           
 
Method Summary
 String buildAuthenticationURL(String callbackURL, SocialNetworkApplication application, Map<String,Object> store)
          Builds the Authentication URL for the social network.
 void callback(String returnedValue, SocialNetworkAccount account, Map<String,Object> stored)
          Executes the callback after application/account authorization.
 String publish(SocialNetworkMessage message)
          Calls the social network's publish method (varies according to network).
 void remove(SocialNetworkMessage message)
          Calls the social network's remove method (varies according to network) if there is one.
 String update(SocialNetworkMessage message)
          Calls the social network's update method (varies according to network) if there is one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NETWORK_NAME

public static final String NETWORK_NAME
See Also:
Constant Field Values
Constructor Detail

TwitterConnector

public TwitterConnector()
Method Detail

publish

public String publish(SocialNetworkMessage message)
               throws PortalException
Description copied from interface: ISocialNetworkConnector
Calls the social network's publish method (varies according to network).

Specified by:
publish in interface ISocialNetworkConnector
Parameters:
message - the message to be published.
Returns:
the remote message id.
Throws:
PortalException

remove

public void remove(SocialNetworkMessage message)
            throws PortalException
Description copied from interface: ISocialNetworkConnector
Calls the social network's remove method (varies according to network) if there is one.

Specified by:
remove in interface ISocialNetworkConnector
Parameters:
message - the message to be removed.
Throws:
PortalException

update

public String update(SocialNetworkMessage message)
              throws PortalException
Description copied from interface: ISocialNetworkConnector
Calls the social network's update method (varies according to network) if there is one.

Specified by:
update in interface ISocialNetworkConnector
Parameters:
message - the message to be updated.
Returns:
the remote message id.
Throws:
PortalException

buildAuthenticationURL

public String buildAuthenticationURL(String callbackURL,
                                     SocialNetworkApplication application,
                                     Map<String,Object> store)
                              throws PortalException
Description copied from interface: ISocialNetworkConnector
Builds the Authentication URL for the social network. Will store any needed values to be used in call back in the stored object.

Specified by:
buildAuthenticationURL in interface ISocialNetworkConnector
Parameters:
callbackURL - String representing the url that should be called after the first step of authentication is taken.
application - SocialNetworkApplication contaning configuration specific values.
store - Map to store object created by this method and that will be used in the ISocialNetworkConnector.callback(String, SocialNetworkAccount, Map) method.
Returns:
String to where the portal should redirect user to.
Throws:
PortalException

callback

public void callback(String returnedValue,
                     SocialNetworkAccount account,
                     Map<String,Object> stored)
              throws PortalException
Description copied from interface: ISocialNetworkConnector
Executes the callback after application/account authorization. ResponseAuthentication will be put in account.

Specified by:
callback in interface ISocialNetworkConnector
Parameters:
returnedValue - value returned by original call/redirect from social network authorization.
account - Social network account to which the validation will occur.
stored - Map that has the objects created in ISocialNetworkConnector.buildAuthenticationURL(String, SocialNetworkApplication, Map) to be used in callback.
Throws:
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.