public class RecordCachePlugin extends AbstractPlugin
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_CREATE |
static String |
ACTION_DELETE |
static String |
ACTION_LIST |
static String |
ACTION_READ |
static String |
PARAM_ACTION |
static String |
PARAM_COMMAND |
static String |
PARAM_RECID |
static String |
PARAM_SECTION |
static String |
PARAM_SOURCE |
static String |
SECTION_ALL |
static String |
SECTION_BASKET |
static String |
SECTION_VIEWED |
static String |
SOURCE_RECORD |
static String |
SOURCE_SHOW |
Constructor and Description |
---|
RecordCachePlugin() |
Modifier and Type | Method and Description |
---|---|
protected void |
doCreate(Document doc,
String cacheSection)
Adds a record to the specified section of the cache
|
protected void |
doDelete()
Truncates the cache
|
protected void |
doDelete(String id)
Deletes a record by recid from any cache section
|
protected void |
doList(javax.servlet.http.HttpServletRequest req,
ServiceResponse response)
Lists all records from a given section of the cache
|
protected void |
doRead(String id,
ServiceResponse response)
Returns one record by recid from the cache
|
Document |
modifyRecordResult(Document record,
RecordCacheDao cache) |
void |
serve(ServiceRequest request,
ServiceResponse response,
ChainControl chain)
This method gets called during the chain processing by the container.
|
getChainName, getConfig, getName, getNodeList, getXmlString, setChainName, setConfig, setName
public static final String PARAM_COMMAND
public static final String PARAM_ACTION
public static final String PARAM_SOURCE
public static final String PARAM_RECID
public static final String PARAM_SECTION
public static final String ACTION_CREATE
public static final String ACTION_READ
public static final String ACTION_LIST
public static final String ACTION_DELETE
public static final String SOURCE_SHOW
public static final String SOURCE_RECORD
public static final String SECTION_BASKET
public static final String SECTION_VIEWED
public static final String SECTION_ALL
public void serve(ServiceRequest request, ServiceResponse response, ChainControl chain) throws ServiceException, IOException
Plugin
serve
in interface Plugin
serve
in class AbstractPlugin
request
- service requestresponse
- service responsechain
- chain-control utilityIOException
- of any kindServiceException
protected void doRead(String id, ServiceResponse response) throws DOMException, IOException, StandardServiceException
id
- response
- DOMException
IOException
StandardServiceException
protected void doCreate(Document doc, String cacheSection) throws DOMException, StandardServiceException
doc
- cacheSection
- DOMException
StandardServiceException
protected void doDelete(String id) throws StandardServiceException
id
- StandardServiceException
protected void doDelete() throws StandardServiceException
StandardServiceException
protected void doList(javax.servlet.http.HttpServletRequest req, ServiceResponse response) throws StandardServiceException
req
- response
- StandardServiceException
public Document modifyRecordResult(Document record, RecordCacheDao cache)
Copyright © 2008-2015 Index Data. All Rights Reserved.