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

java.lang.Object
  extended by com.sage.orion.sdata.servlet.BaseServiceOperation
      extended by com.sage.orion.sdata.servlet.accpac.CloseSessionOperation
All Implemented Interfaces:
ServiceOperation
Direct Known Subclasses:
CloseCRMSessionOperation

public class CloseSessionOperation
extends BaseServiceOperation

The CloseSessionOperation class provides the ability to close a session by extending the BaseServiceOperation class.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
BaseServiceOperation.FieldData, BaseServiceOperation.FieldNames
 
Field Summary
protected static org.slf4j.Logger LOGGER
           
 
Constructor Summary
CloseSessionOperation()
           
 
Method Summary
protected  java.util.List<ServiceField> createRequestFields(SDataRequest request)
          Create a list of input fields for Request.
 java.util.List<ServiceField> createResponseFields(SDataRequest request)
          Create a list of output fields for Response.
protected  java.util.List<ServiceField> createTemplateFields(SDataRequest request)
          Create a list of fields for Template.
protected  java.util.List<ServiceField> execute(SDataResourceElement requestElement, SDataRequest request, AsyncStatusListener listener)
          Execute this service operation and then set the value for the response fields, if any.
 java.lang.String getDescription()
          Get a description of the service operation, for use in service lists
 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  void removeFromSessionMap(SDataRequest request, java.lang.String sessionID)
          removes the given client session GUID from whichever session map is holding it, using the request to find the map.
 
Methods inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
getResponseFields, getSchema, handleRequest, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER
Constructor Detail

CloseSessionOperation

public CloseSessionOperation()
Method Detail

createRequestFields

protected java.util.List<ServiceField> createRequestFields(SDataRequest request)
Description copied from class: BaseServiceOperation
Create a list of input fields for Request.

Note that value for each field may not be initialized.

Specified by:
createRequestFields in class BaseServiceOperation
Parameters:
request - the SDataRequest, or null
Returns:
a list of service fields for Request, or return null or an empty list if no input fields are required.

createResponseFields

public java.util.List<ServiceField> createResponseFields(SDataRequest request)
Description copied from class: BaseServiceOperation
Create a list of output fields for Response.

Note that value for each field may not be initialized.

Specified by:
createResponseFields in class BaseServiceOperation
Parameters:
request - the SDataRequest, or null
Returns:
a list of service fields for Response, or return null or an empty list if there are no output fields.

createTemplateFields

protected java.util.List<ServiceField> createTemplateFields(SDataRequest request)
Description copied from class: BaseServiceOperation
Create a list of fields for Template.

The list must be the same as (or a subset of) request fields and each field has been initialized with default value

Specified by:
createTemplateFields in class BaseServiceOperation
Parameters:
request - the SDataRequest
Returns:
a list of service fields for Template, or return null or an empty list if there are no such fields.

execute

protected java.util.List<ServiceField> execute(SDataResourceElement requestElement,
                                               SDataRequest request,
                                               AsyncStatusListener listener)
Description copied from class: BaseServiceOperation
Execute this service operation and then set the value for the response fields, if any.

Specified by:
execute in class BaseServiceOperation
Parameters:
requestElement - the request (input) portion of the payload from the original SData request
request - the SDataRequest
listener - the AsyncStatusListener
Returns:
a list of service fields for response, or return null or an empty list if there are no output fields.

removeFromSessionMap

protected void removeFromSessionMap(SDataRequest request,
                                    java.lang.String sessionID)
removes the given client session GUID from whichever session map is holding it, using the request to find the map.

The base implementation removes the GUID from the HttpSessionMap associated with the request's HttpSession.

Override this method to specify a different method for locating and removing the GUID

Parameters:
request - the request being served, which can be used to locate the map holding the GUID
sessionID - the client session GUID to remove

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

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

getDescription

public java.lang.String getDescription()
Description copied from interface: ServiceOperation
Get a description of the service operation, for use in service lists

It defaults to the full name of this service operation, i.e. the operation name prefixed with resource name(s)

The description should be in the language required by the user

Specified by:
getDescription in interface ServiceOperation
Overrides:
getDescription in class BaseServiceOperation
Returns:
a non-null String containing the description of the service operation


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