nl.surfnet.coin.shindig.spi
Class AbstractRestDelegationService

java.lang.Object
  extended by nl.surfnet.coin.shindig.spi.AbstractRestDelegationService
Direct Known Subclasses:
CoinOAuthDataStore, GroupServiceImpl, PersonServiceImpl

public abstract class AbstractRestDelegationService
extends Object

Base class for classes that delegate the functionality to a REST endpoint (e.g. PHP EngineBlock)


Field Summary
protected static String UTF_8
           
 
Constructor Summary
AbstractRestDelegationService()
           
 
Method Summary
protected  InputStream executeHttpGet(String url)
          Execute a Http GET
protected  ContextEnvironment getEnvironment()
           
protected  org.codehaus.jackson.map.ObjectMapper getObjectMapper()
           
protected  String getServiceProviderContext(org.apache.shindig.auth.SecurityToken token)
           
protected  String getVirtualOrganizationContext(org.apache.shindig.auth.SecurityToken token, CollectionOptions options)
           
protected  void logApiCall(org.apache.shindig.auth.SecurityToken token)
           
 void setEnvironment(ContextEnvironment environment)
           
 void setHttpClientProvider(HttpClientProvider httpClientProvider)
           
 void setLogService(nl.surfnet.coin.shared.log.ApiCallLogService logService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF_8

protected static final String UTF_8
See Also:
Constant Field Values
Constructor Detail

AbstractRestDelegationService

public AbstractRestDelegationService()
Method Detail

getObjectMapper

protected org.codehaus.jackson.map.ObjectMapper getObjectMapper()
Returns:
the objectMapper

executeHttpGet

protected InputStream executeHttpGet(String url)
                              throws org.apache.http.client.ClientProtocolException,
                                     IOException
Execute a Http GET

Parameters:
url - the url to call
Returns:
the inputstream
Throws:
org.apache.http.client.ClientProtocolException - in case of Htpp protocol breach
IOException - in case of IO error

setHttpClientProvider

public void setHttpClientProvider(HttpClientProvider httpClientProvider)
Parameters:
httpClientProvider - the httpClientProvider to set

getEnvironment

protected ContextEnvironment getEnvironment()
Returns:
the environment

setEnvironment

public void setEnvironment(ContextEnvironment environment)
Parameters:
environment - the environment to set

getVirtualOrganizationContext

protected String getVirtualOrganizationContext(org.apache.shindig.auth.SecurityToken token,
                                               CollectionOptions options)

getServiceProviderContext

protected String getServiceProviderContext(org.apache.shindig.auth.SecurityToken token)

logApiCall

protected void logApiCall(org.apache.shindig.auth.SecurityToken token)

setLogService

public void setLogService(nl.surfnet.coin.shared.log.ApiCallLogService logService)
Parameters:
logService - the logService to set


Copyright © 2007-2012. All Rights Reserved.