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

java.lang.Object
  extended by com.sage.orion.sdata.servlet.BaseServiceOperation
      extended by com.sage.orion.sdata.servlet.accpac.BaseService
All Implemented Interfaces:
ServiceOperation
Direct Known Subclasses:
CompanyInfoService, ExportService, IsDirtyOperation, LicenseStatusService, ReportService, ViewProcessService

public abstract class BaseService
extends BaseServiceOperation

An abstract class that provides a base Sage 300 ERP service.

Each subclass must implement the following abstract methods:

The subclass will probably also wish to override the following methods:


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
BaseServiceOperation.FieldData, BaseServiceOperation.FieldNames
 
Constructor Summary
BaseService(ApplicationContext applicationContext, ResourceContextImpl resourceContext, Resource resource, Service service, SDataViewSet viewSet)
          Constructor
 
Method Summary
protected  ApplicationContext getApplicationContext()
           
 java.lang.String getName()
          Get the full name of this service operation, i.e.
protected  java.lang.String getOperationName()
          Get the short name of this service operation, i.e.
protected  java.lang.String getPath()
          Get the URL to this service operation.
protected  Resource getResource()
           
protected  ResourceContextImpl getResourceContext()
           
protected  Service getService()
           
protected  SDataViewSet getViewSet()
           
protected  boolean isForMetaDataInquiry()
          checks if this service operation has been created only for inquiring about the metadata.
 
Methods inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
createRequestFields, createResponseFields, createTemplateFields, execute, getDescription, getResponseFields, getSchema, handleRequest, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseService

public BaseService(ApplicationContext applicationContext,
                   ResourceContextImpl resourceContext,
                   Resource resource,
                   Service service,
                   SDataViewSet viewSet)
Constructor

Parameters:
applicationContext - the ApplicationContext in which the service operation will be run
resourceContext - the ResourceContextImpl in which the service operation will be run
resource - the Resource on which the service operation will be performed
service - the Service to be performed. Could be null
viewSet - the SDataViewSet associated with the resource. Could be null
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ServiceOperation
Get the full name of this service operation, i.e. the operation name prefixed with resource name(s) to make it unique in the schema

Returns:
a non-null String containing the full name of the service operation

getOperationName

protected java.lang.String getOperationName()
Description copied from class: BaseServiceOperation
Get the short name of this service operation, i.e. the operation name which is not prefixed with resource name(s)

Specified by:
getOperationName in class BaseServiceOperation
Returns:
service operation name

getPath

protected java.lang.String getPath()
Description copied from class: BaseServiceOperation
Get the URL to this service operation.

Specified by:
getPath in class BaseServiceOperation
Returns:
the URL to this service operation

getApplicationContext

protected ApplicationContext getApplicationContext()
Returns:
the ApplicationContext. Never be null

getResourceContext

protected ResourceContextImpl getResourceContext()
Returns:
the ResourceContextImpl. Never be null

getResource

protected Resource getResource()
Returns:
the Resource. Never be null

getService

protected Service getService()
Returns:
the Service. Could be null

getViewSet

protected SDataViewSet getViewSet()
Returns:
the SDataViewSet associated with the resource. Could be null

isForMetaDataInquiry

protected final boolean isForMetaDataInquiry()
checks if this service operation has been created only for inquiring about the metadata.

When this is true the service operation should not execute.

This method is provided to allow the subclass to know not to make data manipulation calls to its underlying views that will throw an illegal state exception.

Returns:
true if the service operation is only for inquiring about metadata


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