SMILA 1.0 API documentation

org.eclipse.smila.objectstore.httphandler
Class AStoreHandler

java.lang.Object
  extended by org.eclipse.smila.http.server.util.ARequestHandler
      extended by org.eclipse.smila.http.server.json.JsonRequestHandler
          extended by org.eclipse.smila.objectstore.httphandler.AStoreHandler
All Implemented Interfaces:
HttpHandler, RequestHandler
Direct Known Subclasses:
ObjectStoreServiceHandler, StoreAdminHandler, StoreObjectHandler

public abstract class AStoreHandler
extends JsonRequestHandler

base class for request handlers concerning objectstore access.

Author:
jschumacher

Field Summary
 
Fields inherited from class org.eclipse.smila.http.server.json.JsonRequestHandler
FACTORY, HTTP_UTILS
 
Constructor Summary
AStoreHandler()
           
 
Method Summary
protected  int getErrorStatus(java.lang.String method, java.lang.String requestUri, java.lang.Throwable ex)
          Select appropriate HTTP status codes for ObjectStoreException and subclasses.
protected  java.lang.String getObjectId(java.lang.String requestUri)
          Extracts the object id from the requestURI.
 ObjectStoreService getObjectStoreService()
           
protected  java.lang.String getStoreName(java.lang.String requestUri)
          Extracts the store name from the requestURI.
 void setObjectStoreService(ObjectStoreService objectStoreService)
          method for DS to set a service reference.
 void unsetObjectStoreService(ObjectStoreService objectStoreService)
          method for DS to unset a service reference.
 
Methods inherited from class org.eclipse.smila.http.server.json.JsonRequestHandler
getRequestHost, getSuccessStatus, getSuccessStatus, handle, isValidMethod, process, writeErrorResult, writeResultObject, writeSuccessResult
 
Methods inherited from class org.eclipse.smila.http.server.util.ARequestHandler
activate, getDynamicUriParts, getRootContextPath, getStaticUriParts, getUriPattern, matches, urlDecode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AStoreHandler

public AStoreHandler()
Method Detail

getObjectStoreService

public ObjectStoreService getObjectStoreService()
Returns:
object store service reference

setObjectStoreService

public void setObjectStoreService(ObjectStoreService objectStoreService)
method for DS to set a service reference.

Parameters:
objectStoreService - ObjectStoreService reference.

unsetObjectStoreService

public void unsetObjectStoreService(ObjectStoreService objectStoreService)
method for DS to unset a service reference.

Parameters:
objectStoreService - ObjectStoreService reference.

getStoreName

protected java.lang.String getStoreName(java.lang.String requestUri)
Extracts the store name from the requestURI.

Parameters:
requestUri - the request URI
Returns:
the store name

getObjectId

protected java.lang.String getObjectId(java.lang.String requestUri)
Extracts the object id from the requestURI.

Parameters:
requestUri - the request URI
Returns:
the object id

getErrorStatus

protected int getErrorStatus(java.lang.String method,
                             java.lang.String requestUri,
                             java.lang.Throwable ex)
Select appropriate HTTP status codes for ObjectStoreException and subclasses.

Overrides:
getErrorStatus in class JsonRequestHandler
See Also:
HTTP_UTILS#getErrorStatus(String, String, Throwable)

SMILA 1.0 API documentation