- Timestamp:
- 2018-09-13T14:18:16+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/UserTracker.java
r28966 r32453 16 16 public class UserTracker extends ServiceRack 17 17 { 18 static Logger logger = Logger.getLogger(org.greenstone.gsdl3.service. DocXMLUtil.class.getName());18 static Logger logger = Logger.getLogger(org.greenstone.gsdl3.service.UserTracker.class.getName()); 19 19 20 20 /************************************************** … … 27 27 String[] services = { RECORD_USER_ACTION, GET_ACTIVITY_ON_PAGE }; 28 28 29 // the parameters these services use 30 protected static final String USER_PARAM = "username"; 31 protected static final String COLLECTION_PARAM = "collection"; 32 protected static final String SITE_PARAM = "site"; 33 protected static final String OID_PARAM = "oid"; 34 protected static final String ACTION_PARAM = "action"; 35 29 36 /** configure this service */ 30 37 public boolean configure(Element info, Element extra_info) … … 35 42 } 36 43 37 logger.info("Configuring DocXMLUtil...");44 logger.info("Configuring UserTracker..."); 38 45 this.config_info = info; 39 46 … … 46 53 } 47 54 55 // should any of the params be saved to the session? 56 // assuming not at this stage. But if they do need to be, then 57 // sture them here in save_params. 58 // this.save_params.add(XXX_PARAM); 48 59 return true; 49 60 } … … 78 89 79 90 HashMap<String, Serializable> params = GSXML.extractParams(paramList, true); 80 String username = (String) params.get( "username");81 String collection = (String) params.get( "collection");82 String site = (String) params.get( "site");83 String oid = (String) params.get( "oid");84 String action = (String) params.get( "action");91 String username = (String) params.get(USER_PARAM); 92 String collection = (String) params.get(COLLECTION_PARAM); 93 String site = (String) params.get(SITE_PARAM); 94 String oid = (String) params.get(OID_PARAM); 95 String action = (String) params.get(ACTION_PARAM); 85 96 86 97 DerbyWrapper database = new DerbyWrapper(GlobalProperties.getGSDL3Home() + File.separatorChar + "etc" + File.separatorChar + "usersDB"); … … 106 117 107 118 HashMap<String, Serializable> params = GSXML.extractParams(paramList, true); 108 String collection = (String) params.get( "collection");109 String site = (String) params.get( "site");110 String oid = (String) params.get( "oid");119 String collection = (String) params.get(COLLECTION_PARAM); 120 String site = (String) params.get(SITE_PARAM); 121 String oid = (String) params.get(OID_PARAM); 111 122 112 123 DerbyWrapper database = new DerbyWrapper(GlobalProperties.getGSDL3Home() + File.separatorChar + "etc" + File.separatorChar + "usersDB");
Note:
See TracChangeset
for help on using the changeset viewer.