01: //** Copyright Statement ***************************************************
02: //The Salmon Open Framework for Internet Applications (SOFIA)
03: // Copyright (C) 1999 - 2002, Salmon LLC
04: //
05: // This program is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU General Public License version 2
07: // as published by the Free Software Foundation;
08: //
09: // This program is distributed in the hope that it will be useful,
10: // but WITHOUT ANY WARRANTY; without even the implied warranty of
11: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: // GNU General Public License for more details.
13: //
14: // You should have received a copy of the GNU General Public License
15: // along with this program; if not, write to the Free Software
16: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: //
18: // For more information please visit http://www.salmonllc.com
19: //** End Copyright Statement ***************************************************
20: package com.salmonllc.sql;
21:
22: import javax.servlet.http.*;
23:
24: /**
25: * This class should be extended for each data store that will be retrieved remotely via the DataServer servlet. The structure of the DataStore should be set up via addColumn methods in the constructor. Also the constructor should set the application name and the dbprofile name for the datastore.
26: * @see DataStoreProxy
27: */
28: public abstract class RemoteDataStore extends DataStore {
29:
30: public RemoteDataStore() {
31: super ();
32: }
33:
34: /**
35: * This method gets fired before each remote request to the DataStore is made (including the create method).
36: * @return true if the request should be granted and false if the request should be denied.
37: * @param reqType The type of request being made.
38: * @param req javax.servlet.http.HttpServletRequest The servlet request used.
39: * @param sessionValid true if this request came from a valid session or false if a new one had to be created.
40: * @param userID The user id making the request
41: * @param password The password of the user id making the request
42: * @param criteria The selection criteria passed from the request
43: */
44: public boolean request(String reqType, HttpServletRequest req,
45: boolean sessionValid, String userID, String password,
46: String criteria) throws DataStoreException {
47: return sessionValid;
48: }
49:
50: }
|