tbrugz avatar tbrugz committed ef94d33

servlet: removed some 'static'

Comments (0)

Files changed (1)

src/tbrugz/queryon/QueryOn.java

 		String outputTypeStr = DEFAULT_OUTPUT_SYNTAX;
 		DumpSyntax outputSyntax = null;
 		
-		public RequestSpec(HttpServletRequest req, Properties prop) throws ServletException {
+		public RequestSpec(QueryOn qon, HttpServletRequest req, Properties prop) throws ServletException {
 			String varUrl = req.getPathInfo();
 			int lastDotIndex = varUrl.lastIndexOf('.');
 			if(lastDotIndex>-1) {
 				params.add(URIpartz.get(i));
 			}
 			
-			outputSyntax = getDumpSyntax(outputTypeStr, prop);
+			outputSyntax = qon.getDumpSyntax(outputTypeStr, prop);
 			if(outputSyntax == null) {
 				throw new ServletException("Unknown output syntax: "+outputTypeStr);
 			}
 		}
 	} 
 	
-	static Log log = LogFactory.getLog(QueryOn.class);
+	static final Log log = LogFactory.getLog(QueryOn.class);
 
 	static final String PROPERTIES_RESOURCE = "/queryon.properties";
 	static final String CONN_PROPS_PREFIX = "queryon";
 			throws ServletException, IOException {
 		log.info(">> pathInfo: "+req.getPathInfo());
 		
-		RequestSpec reqspec = new RequestSpec(req, prop);
+		RequestSpec reqspec = new RequestSpec(this, req, prop);
 		
 		String[] objectParts = reqspec.object.split("\\.");
 		
 		conn.close();
 	}
 	
-	static Map<String, DumpSyntax> syntaxes = new HashMap<String, DumpSyntax>();
+	Map<String, DumpSyntax> syntaxes = new HashMap<String, DumpSyntax>();
 	
-	static DumpSyntax getDumpSyntax(String format, Properties prop) {
+	DumpSyntax getDumpSyntax(String format, Properties prop) {
 		DumpSyntax dsx = syntaxes.get(format);
 		if(dsx!=null) { return dsx; }
 		
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.