|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.accpac.BaseResourceKind
com.sage.orion.sdata.servlet.accpac.ViewResourceKind
public class ViewResourceKind
This class extends ViewCRUDResourceKind
to handle the $service
requests.
Constructor Summary | |
---|---|
ViewResourceKind(ApplicationContext applicationContext,
ResourceContext resourceContext)
constructs an instance of the ViewResourceKind class |
Method Summary | |
---|---|
protected void |
addFieldCalculation(ResourceField field,
CalculatesFieldProperty calculation)
Specify an alternate method for calculating the value of this field. |
protected SDataViewSet |
createSDataViewSet(com.sage.accpac.sm.Program program,
Resource resource)
creates an instance of the SDataViewSet that will be used by the
resource kind to access the underlying views. |
protected static int |
getDefaultFeedCount()
Gets the default number of entries to be returned by the resource kind. |
protected static int |
getMaxFeedCount()
Gets the maximum number of entries to be returned by the resource kind. |
protected SDataView |
getView(java.lang.String id)
Gets the View with the given viewID from the list of all views within the resource. |
SDataViewSet |
getViewSet()
gets the viewSet that holds the views that this
resource kind uses. |
ResourceResponse |
handleRequest(SDataRequest request,
AsyncStatusListener listener)
Handle all the $service requests here. |
protected void |
removeFieldCalculation(ResourceField field)
Removes the given calculated field from the calculated field map. |
protected void |
setFilter(SDataView view,
java.lang.String theFilter,
boolean ascending,
int order)
set the filter, direction and index for the given view |
void |
shutdown()
Shut down the resource kind. |
protected Resource |
subresourceOfResourceElement(Resource parentResource,
ResourceElement re)
Return the resource corresponding to the resource element, or null if there is none. |
Methods inherited from class com.sage.orion.sdata.servlet.accpac.BaseResourceKind |
---|
getApplicationContext, getInstance, getName, getResource, getResourceContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewResourceKind(ApplicationContext applicationContext, ResourceContext resourceContext)
ViewResourceKind
class
applicationContext
- the ApplicationContext
in which the resource kind will
liveresourceContext
- the ResourceContext
in which the resource kind will
live. The implementation must be a ResourceContextImpl
.Method Detail |
---|
public ResourceResponse handleRequest(SDataRequest request, AsyncStatusListener listener)
handleRequest
in interface ResourceKind
request
- the SDataRequestlistener
- the asynchronous status listener
public void shutdown()
ResourceKind
ResourceKind.handleRequest(SDataRequest, AsyncStatusListener)
.
shutdown
in interface ResourceKind
public final SDataViewSet getViewSet()
viewSet
that holds the views that this
resource kind uses.
This returns the same view set as is returned by
createSDataViewSet(Program, Resource)
.
Do not call this method during construction of the kind.
createSDataViewSet(Program, Resource)
protected SDataViewSet createSDataViewSet(com.sage.accpac.sm.Program program, Resource resource)
SDataViewSet
that will be used by the
resource kind to access the underlying views. Override this method to
create an application-specific subclass of the SDataViewSet
class.
This implementation does not call this method during construction of the instance. This means that the subclass can use instance variables safely, without worrying if they have been initialized yet.
program
- the Program
for the views in the setresource
- the Resource
corresponding to the top of the view set
(the main resource).
SDataViewSet
. Do not return null; throw an
exception if something goes wrong.getViewSet()
protected void addFieldCalculation(ResourceField field, CalculatesFieldProperty calculation)
field
- a ResourceField
defining the name of the field that this
is a calculation forcalculation
- the calculation to be applied for the given fieldprotected void removeFieldCalculation(ResourceField field)
field
- a ResourceField
defining the name of the field that was
specified in an earlier call to
addFieldCalculation(ResourceField, CalculatesFieldProperty)
.protected Resource subresourceOfResourceElement(Resource parentResource, ResourceElement re)
parentResource
- the parent resource of which this is a sub-resource. This must
be null if the resource element is the top resource element of
the requestre
- the resource element whose resource we want
protected SDataView getView(java.lang.String id)
id
- the rotoid of the view
protected void setFilter(SDataView view, java.lang.String theFilter, boolean ascending, int order)
view
- the view whose properties are to be settheFilter
- the filter to be set, as an Accpac filter stringascending
- true if an only if the results are to be presented in ascending
order according to the indexorder
- the number of the index or key that defines the order
com.sage.accpac.sm.InvalidCharacterException
- if the filter contains a character that cannot be mapped to the
underlying code pageprotected static int getDefaultFeedCount()
protected static int getMaxFeedCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |