com.sage.orion.sdata.servlet.swtservice
Class Provider

java.lang.Object
  extended by com.sage.orion.sdata.servlet.swtservice.Provider
All Implemented Interfaces:
SDataProvider

public final class Provider
extends java.lang.Object
implements SDataProvider

The Provider class provides a SWT Services SData Application provider that can handle SData requests directed to the SWT Service application.


Constructor Summary
Provider(SDataServletContext servletContext, java.lang.String name)
           
 
Method Summary
static Provider getAccpacProvider(SDataServletContext context)
          returns the first accpac Provider in the context (there should only be one)
 Authenticator getAuthenticator(javax.servlet.http.HttpServletRequest request, java.lang.String dataset, javax.servlet.http.HttpServletResponse response)
          Gets the SData Authenticator for this SData provider.
 ResourceKindPool getPool(SDataRequest request, java.lang.String authToken)
          Gets the ResourcePool for this SData provider.
 java.util.Collection<SDataResourceKindInfo> getResourceKindInfo()
          Gets the resource information for this SData provider.
 void initialize()
          Handles any initialization routines required by the Provider
 void shutdown()
          Clear up the SData service provider as the application server is closing the context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Provider

public Provider(SDataServletContext servletContext,
                java.lang.String name)
Method Detail

getAuthenticator

public Authenticator getAuthenticator(javax.servlet.http.HttpServletRequest request,
                                      java.lang.String dataset,
                                      javax.servlet.http.HttpServletResponse response)
Description copied from interface: SDataProvider
Gets the SData Authenticator for this SData provider.

Specified by:
getAuthenticator in interface SDataProvider
Parameters:
request - the incoming request
dataset - the data set that the request is on
response - the response, in case the method needs to add headers etc. to remember GUIDs and other things
Returns:
an Authenticator representing any authentication information in the request

getPool

public ResourceKindPool getPool(SDataRequest request,
                                java.lang.String authToken)
Description copied from interface: SDataProvider
Gets the ResourcePool for this SData provider.

Specified by:
getPool in interface SDataProvider
Parameters:
request - the incoming SDataRequest
authToken - an Authenticator representing any authentication information for the request
Returns:
a ResourceKindPool suitable for processing the given request

getResourceKindInfo

public java.util.Collection<SDataResourceKindInfo> getResourceKindInfo()
Description copied from interface: SDataProvider
Gets the resource information for this SData provider.

Specified by:
getResourceKindInfo in interface SDataProvider
Returns:
a Collection of the current SDataResourceKindInfo that the provider is using

shutdown

public void shutdown()
Description copied from interface: SDataProvider
Clear up the SData service provider as the application server is closing the context

Specified by:
shutdown in interface SDataProvider

initialize

public void initialize()
Description copied from interface: SDataProvider
Handles any initialization routines required by the Provider

Specified by:
initialize in interface SDataProvider

getAccpacProvider

public static Provider getAccpacProvider(SDataServletContext context)
returns the first accpac Provider in the context (there should only be one)

Parameters:
context - the context which will contain the providers
Returns:
the first accpac Provider in the context (there should only be one)


Copyright © 2011 Sage Software, Inc. All rights reserved.