org.jboss.seam.social.oauth
Class OAuthServiceBase

java.lang.Object
  extended by org.jboss.seam.social.oauth.OAuthServiceBase
All Implemented Interfaces:
Serializable, org.jboss.seam.social.HasStatus, org.jboss.seam.social.oauth.OAuthService, org.jboss.seam.social.rest.RestService

public abstract class OAuthServiceBase
extends Object
implements org.jboss.seam.social.oauth.OAuthService, org.jboss.seam.social.HasStatus

This Abstract implementation of OAuthService uses an OAuthProvider to deal with remote OAuth Services

Author:
Antoine Sabot-Durand
See Also:
Serialized Form

Field Summary
protected  org.jboss.seam.social.JsonMapper jsonService
           
protected  javax.enterprise.inject.Instance<org.jboss.seam.social.oauth.OAuthSession> sessionInstances
           
protected  SeamSocialExtension socialConfig
           
 
Constructor Summary
OAuthServiceBase()
           
 
Method Summary
 org.jboss.seam.social.oauth.OAuthToken getAccessToken()
           
 String getAuthorizationUrl()
           
 org.jboss.seam.social.UserProfile getMyProfile()
           
protected  org.jboss.seam.social.oauth.OAuthToken getRequestToken()
           
 org.jboss.seam.social.oauth.OAuthSession getSession()
           
 String getType()
           
 String getVerifier()
           
 String getVerifierParamName()
           
 void initAccessToken()
           
protected abstract  void initMyProfile()
           
 boolean isConnected()
           
protected  void requireAuthorization()
           
 void resetConnection()
           
protected  org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.oauth.OAuthRequest request)
           
 org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.rest.RestVerb verb, String uri)
           
 org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.rest.RestVerb verb, String uri, Map<String,Object> params)
           
 org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.rest.RestVerb verb, String uri, String key, Object value)
           
 org.jboss.seam.social.rest.RestResponse sendSignedXmlRequest(org.jboss.seam.social.rest.RestVerb verb, String uri, String payload)
           
 void setAccessToken(org.jboss.seam.social.oauth.OAuthToken token)
           
 void setAccessToken(String token, String secret)
           
 void setVerifier(String verifierStr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.seam.social.rest.RestService
getQualifier, getServiceLogo
 
Methods inherited from interface org.jboss.seam.social.HasStatus
updateStatus
 

Field Detail

jsonService

@Inject
protected org.jboss.seam.social.JsonMapper jsonService

sessionInstances

@Inject
@Any
protected javax.enterprise.inject.Instance<org.jboss.seam.social.oauth.OAuthSession> sessionInstances

socialConfig

@Inject
protected SeamSocialExtension socialConfig
Constructor Detail

OAuthServiceBase

public OAuthServiceBase()
Method Detail

getType

public String getType()
Specified by:
getType in interface org.jboss.seam.social.rest.RestService

getAuthorizationUrl

public String getAuthorizationUrl()
Specified by:
getAuthorizationUrl in interface org.jboss.seam.social.oauth.OAuthService

getRequestToken

protected org.jboss.seam.social.oauth.OAuthToken getRequestToken()

initAccessToken

public void initAccessToken()
Specified by:
initAccessToken in interface org.jboss.seam.social.oauth.OAuthService

initMyProfile

protected abstract void initMyProfile()

resetConnection

public void resetConnection()
Specified by:
resetConnection in interface org.jboss.seam.social.rest.RestService

sendSignedRequest

protected org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.oauth.OAuthRequest request)

sendSignedRequest

public org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.rest.RestVerb verb,
                                                                 String uri)
Specified by:
sendSignedRequest in interface org.jboss.seam.social.oauth.OAuthService

sendSignedRequest

public org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.rest.RestVerb verb,
                                                                 String uri,
                                                                 String key,
                                                                 Object value)
Specified by:
sendSignedRequest in interface org.jboss.seam.social.oauth.OAuthService

sendSignedXmlRequest

public org.jboss.seam.social.rest.RestResponse sendSignedXmlRequest(org.jboss.seam.social.rest.RestVerb verb,
                                                                    String uri,
                                                                    String payload)
Specified by:
sendSignedXmlRequest in interface org.jboss.seam.social.oauth.OAuthService

sendSignedRequest

public org.jboss.seam.social.rest.RestResponse sendSignedRequest(org.jboss.seam.social.rest.RestVerb verb,
                                                                 String uri,
                                                                 Map<String,Object> params)
Specified by:
sendSignedRequest in interface org.jboss.seam.social.oauth.OAuthService

setVerifier

public void setVerifier(String verifierStr)
Specified by:
setVerifier in interface org.jboss.seam.social.oauth.OAuthService

getVerifier

public String getVerifier()
Specified by:
getVerifier in interface org.jboss.seam.social.oauth.OAuthService

getAccessToken

public org.jboss.seam.social.oauth.OAuthToken getAccessToken()
Specified by:
getAccessToken in interface org.jboss.seam.social.oauth.OAuthService

isConnected

public boolean isConnected()
Specified by:
isConnected in interface org.jboss.seam.social.rest.RestService

requireAuthorization

protected void requireAuthorization()

setAccessToken

public void setAccessToken(String token,
                           String secret)
Specified by:
setAccessToken in interface org.jboss.seam.social.oauth.OAuthService

setAccessToken

public void setAccessToken(org.jboss.seam.social.oauth.OAuthToken token)
Specified by:
setAccessToken in interface org.jboss.seam.social.oauth.OAuthService

getVerifierParamName

public String getVerifierParamName()
Specified by:
getVerifierParamName in interface org.jboss.seam.social.oauth.OAuthService

getMyProfile

public org.jboss.seam.social.UserProfile getMyProfile()
Specified by:
getMyProfile in interface org.jboss.seam.social.rest.RestService

getSession

public org.jboss.seam.social.oauth.OAuthSession getSession()
Specified by:
getSession in interface org.jboss.seam.social.oauth.OAuthService


Copyright © 2011 Seam Framework. All Rights Reserved.