01: package com.salmonllc.sql;
02:
03: import javax.servlet.http.HttpServletRequest;
04:
05: /**
06: * Implement this method for any DataStore that you want to expose remotely via the a ProxyDataStore.
07: */
08: public interface Remotable {
09:
10: public static final String OPERATION_CREATE = DataStoreProxy.OPERATION_CREATE;
11: public static final String OPERATION_RETRIEVE = DataStoreProxy.OPERATION_RETRIEVE;
12: public static final String OPERATION_CANCEL = DataStoreProxy.OPERATION_CANCEL;
13: public static final String OPERATION_PING = DataStoreProxy.OPERATION_PING;
14: public static final String OPERATION_UPDATE = DataStoreProxy.OPERATION_UPDATE;
15: public static final String OPERATION_COUNT = DataStoreProxy.OPERATION_COUNT;
16: public static final String OPERATION_DESTROY = DataStoreProxy.OPERATION_DESTROY;
17:
18: /**
19: * This method gets fired before each remote request to the DataStore is made (including the create method).
20: * @return true if the request should be granted and false if the request should be denied.
21: * @param reqType The type of request being made. See operation constants for valid values.
22: * @param req javax.servlet.http.HttpServletRequest The servlet request used.
23: * @param sessionValid true if this request came from a valid session or false if a new one had to be created.
24: * @param userID The user id making the request
25: * @param password The password of the user id making the request
26: * @param criteria The selection criteria passed from the request
27: */
28: public boolean request(String reqType, HttpServletRequest req,
29: boolean sessionValid, String userID, String password,
30: String criteria) throws DataStoreException;
31: }
|