org.springframework.social.evernote.connect
Class EvernoteOAuth1Operations

java.lang.Object
  extended by org.springframework.social.evernote.connect.EvernoteOAuth1Operations
All Implemented Interfaces:
org.springframework.social.oauth1.OAuth1Operations

public class EvernoteOAuth1Operations
extends Object
implements org.springframework.social.oauth1.OAuth1Operations

This class works as a delegator to the selected OAuth1Operations by EvernoteService.

Evernote has three endpoints - sandbox, production, and yinxiang. Since OAuth1Template is immutable, instanciate template for all environment and choose one of them based on the passed EvernoteService. All method delegates to the selected OAuth1Operations.

Author:
Tadaya Tsuyukubo

Constructor Summary
EvernoteOAuth1Operations(String consumerKey, String consumerSecret)
           
EvernoteOAuth1Operations(String consumerKey, String consumerSecret, com.evernote.auth.EvernoteService evernoteService)
           
 
Method Summary
 String buildAuthenticateUrl(String requestToken, org.springframework.social.oauth1.OAuth1Parameters parameters)
           
 String buildAuthorizeUrl(String requestToken, org.springframework.social.oauth1.OAuth1Parameters parameters)
           
 org.springframework.social.oauth1.OAuthToken exchangeForAccessToken(org.springframework.social.oauth1.AuthorizedRequestToken requestToken, org.springframework.util.MultiValueMap<String,String> additionalParameters)
           
 org.springframework.social.oauth1.OAuthToken fetchRequestToken(String callbackUrl, org.springframework.util.MultiValueMap<String,String> additionalParameters)
           
protected  String getConsumerKey()
           
 org.springframework.social.oauth1.OAuth1Operations getSelectedOauth1Operations()
           
 org.springframework.social.oauth1.OAuth1Version getVersion()
           
 void setEvernoteService(com.evernote.auth.EvernoteService evernoteService)
           
 void setRequestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvernoteOAuth1Operations

public EvernoteOAuth1Operations(String consumerKey,
                                String consumerSecret)

EvernoteOAuth1Operations

public EvernoteOAuth1Operations(String consumerKey,
                                String consumerSecret,
                                com.evernote.auth.EvernoteService evernoteService)
Method Detail

setEvernoteService

public void setEvernoteService(com.evernote.auth.EvernoteService evernoteService)

getVersion

public org.springframework.social.oauth1.OAuth1Version getVersion()
Specified by:
getVersion in interface org.springframework.social.oauth1.OAuth1Operations

fetchRequestToken

public org.springframework.social.oauth1.OAuthToken fetchRequestToken(String callbackUrl,
                                                                      org.springframework.util.MultiValueMap<String,String> additionalParameters)
Specified by:
fetchRequestToken in interface org.springframework.social.oauth1.OAuth1Operations

buildAuthorizeUrl

public String buildAuthorizeUrl(String requestToken,
                                org.springframework.social.oauth1.OAuth1Parameters parameters)
Specified by:
buildAuthorizeUrl in interface org.springframework.social.oauth1.OAuth1Operations

buildAuthenticateUrl

public String buildAuthenticateUrl(String requestToken,
                                   org.springframework.social.oauth1.OAuth1Parameters parameters)
Specified by:
buildAuthenticateUrl in interface org.springframework.social.oauth1.OAuth1Operations

exchangeForAccessToken

public org.springframework.social.oauth1.OAuthToken exchangeForAccessToken(org.springframework.social.oauth1.AuthorizedRequestToken requestToken,
                                                                           org.springframework.util.MultiValueMap<String,String> additionalParameters)
Specified by:
exchangeForAccessToken in interface org.springframework.social.oauth1.OAuth1Operations

setRequestFactory

public void setRequestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory)

getSelectedOauth1Operations

public org.springframework.social.oauth1.OAuth1Operations getSelectedOauth1Operations()

getConsumerKey

protected String getConsumerKey()


Copyright © 2014. All Rights Reserved.