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

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

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

The Sage 300 ERP SDataProvider.


Constructor Summary
Provider(SDataServletContext servletContext, java.lang.String name)
          Creates an instance of the Provider class based on the given context
 
Method Summary
static void disableDaemons()
          ensures that when a Provider is constructed it does not include any background daemon tasks.
static void enableDaemons()
          ensures that when a Provider is constructed it does include any background daemon tasks.
 java.lang.String getApplicationName()
          gets the SData application name for which this is the provider
 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.List<SDataResourceKindInfo> getResourceKindInfo()
          Gets the resource information for this SData provider.
 com.sage.orion.sdata.servlet.accpac.FullSchemaMaintainer getSchemaMaintainer()
          gets the FullSchemaMaintainer that the provider is using to maintain any automatically generated schema.
 SDSFactory getSDSFactory()
          returns the provider's SDSFactory.
 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)
Creates an instance of the Provider class based on the given context

Parameters:
servletContext - a context that this instance can use
name - the name by which the SData application is being known (i.e. as it appears in the URL)
Method Detail

disableDaemons

public static void disableDaemons()
ensures that when a Provider is constructed it does not include any background daemon tasks. This is mainly for use in testing. Note that this only disables daemon threads on Providers constructed after this call. Note also that they are not true daemon threads in terms of the Thread class.


enableDaemons

public static void enableDaemons()
ensures that when a Provider is constructed it does include any background daemon tasks. This is mainly for use in testing, to reverse a previous call to disableDaemons(). Note that this only enables daemon threads on Providers constructed after this call. Note also that they are not true daemon threads in terms of the Thread class.


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

getResourceKindInfo

public java.util.List<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

getSchemaMaintainer

public com.sage.orion.sdata.servlet.accpac.FullSchemaMaintainer getSchemaMaintainer()
gets the FullSchemaMaintainer that the provider is using to maintain any automatically generated schema.

Returns:
a non-null FullSchemaMaintainer

getApplicationName

public java.lang.String getApplicationName()
gets the SData application name for which this is the provider

Returns:
a String containing the name of the application or null, as provided to the constructor

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

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

getSDSFactory

public SDSFactory getSDSFactory()
returns the provider's SDSFactory.

Returns:
the shared data set factory


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