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

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

public class ExportResource
extends java.lang.Object
implements ResourceKind

This resource kind handles retrieving an document that was previously exported.

The resource will ensure that only the users that originally exported the document can access it.

If a different user attempts to access the exported document an UnauthorizedException will be thrown.

Author:
cliwa01

Field Summary
static java.lang.String RESOURCE_NAME
           
 
Constructor Summary
ExportResource(ApplicationContext applicationContext, ResourceContext context)
          Constructor.
 
Method Summary
 java.lang.String getInstance()
           
 java.lang.String getName()
           
 ResourceResponse handleRequest(SDataRequest request, AsyncStatusListener listener)
          Handle the specified request, passing information to the listener if there is one.
 void shutdown()
          Shut down the resource kind.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_NAME

public static final java.lang.String RESOURCE_NAME
See Also:
Constant Field Values
Constructor Detail

ExportResource

public ExportResource(ApplicationContext applicationContext,
                      ResourceContext context)
Constructor.

Parameters:
applicationContext -
context -
Method Detail

handleRequest

public ResourceResponse handleRequest(SDataRequest request,
                                      AsyncStatusListener listener)
Description copied from interface: ResourceKind
Handle the specified request, passing information to the listener if there is one.

Note that even if an implementation is not thread-safe it must allow for the ResourceKind.shutdown() call to execute in parallel.

Specified by:
handleRequest in interface ResourceKind
Parameters:
request - the request to handle
listener - null or a listener than can be used for asynchronous tasks to monitor progress.
Returns:
a ResourceResponse to the request

shutdown

public void shutdown()
Description copied from interface: ResourceKind
Shut down the resource kind. Note that this may be called on a shutdown thread even though a different thread is executing ResourceKind.handleRequest(SDataRequest, AsyncStatusListener).

Specified by:
shutdown in interface ResourceKind

getInstance

public java.lang.String getInstance()
Specified by:
getInstance in interface ResourceKind

getName

public java.lang.String getName()
Specified by:
getName in interface ResourceKind


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