public OTPRequest (Request req, Graph graph) { this.graph = graph; for (String key : req.getParameterNames()) { params.put(key, req.getParameter(key)); } String path = req.getPathInfo(); sfmt = SerializeFormat.JSON; if (req.getHeader("Accept").contains("application/xml")) { sfmt = SerializeFormat.XML; } if (req.getHeader("Accept").contains("application/json")) { sfmt = SerializeFormat.JSON; } if (path.endsWith(".xml")) { path = path.substring(0, path.length() - 4); sfmt = SerializeFormat.XML; }; if (path.endsWith(".json")) { path = path.substring(0, path.length() - 5); sfmt = SerializeFormat.JSON; }; parts = path.split("/"); // path always begins with a slash, so part 0 is empty if (parts.length > 1) action = parts[1]; if (parts.length > 2) id = parts[2]; }
@Override public Set<String> run() { return request.getParameterNames(); } }
@Override public Set<String> run() { return request.getParameterNames(); } }
@Override public Set<String> run() { return request.getParameterNames(); } }
@Override public Set<String> run() { return request.getParameterNames(); } }
@Override public Set<String> run() { return request.getParameterNames(); } }
@Override public Set<String> run() { return request.getParameterNames(); } }
/** * */ private void logRequest(Request req) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "AdminConsoleAdapter''s STATE IS: {0}", getStateMsg()); logger.log(Level.FINE, "Current Thread: {0}", Thread.currentThread().getName()); for (final String name : req.getParameterNames()) { final String values = Arrays.toString(req.getParameterValues(name)); logger.log(Level.FINE, "Parameter name: {0} values: {1}", new Object[]{name, values}); } } }
/** * Return the names of all defined request parameters for this request. */ @Override public Enumeration<String> getParameterNames() { /* if (!requestParametersParsed) { parseRequestParameters(); } */ processParameters(); return new Enumerator<String>(coyoteRequest.getParameterNames()); }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Enumeration<String> getParameterNames() { if (request == null) { throw new IllegalStateException("Null request object"); } if (System.getSecurityManager() != null){ return new Enumerator(AccessController.doPrivileged( new GetParameterNamesPrivilegedAction())); } else { return new Enumerator(request.getParameterNames()); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Enumeration<String> getParameterNames() { if (request == null) { throw new IllegalStateException("Null request object"); } if (System.getSecurityManager() != null){ return new Enumerator(AccessController.doPrivileged( new GetParameterNamesPrivilegedAction())); } else { return new Enumerator(request.getParameterNames()); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Enumeration<String> getParameterNames() { if (request == null) { throw new IllegalStateException("Null request object"); } if (System.getSecurityManager() != null){ return new Enumerator(AccessController.doPrivileged( new GetParameterNamesPrivilegedAction())); } else { return new Enumerator(request.getParameterNames()); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Enumeration<String> getParameterNames() { if (request == null) { throw new IllegalStateException("Null request object"); } if (System.getSecurityManager() != null){ return new Enumerator(AccessController.doPrivileged( new GetParameterNamesPrivilegedAction())); } else { return new Enumerator(request.getParameterNames()); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Enumeration<String> getParameterNames() { if (request == null) { throw new IllegalStateException("Null request object"); } if (System.getSecurityManager() != null){ return new Enumerator(AccessController.doPrivileged( new GetParameterNamesPrivilegedAction())); } else { return new Enumerator(request.getParameterNames()); } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Enumeration<String> getParameterNames() { if (request == null) { throw new IllegalStateException("Null request object"); } if (System.getSecurityManager() != null){ return new Enumerator(AccessController.doPrivileged( new GetParameterNamesPrivilegedAction())); } else { return new Enumerator(request.getParameterNames()); } }
/** * Returns a {@link java.util.Map} of the parameters of this request. * Request parameters are extra information sent with the request. * For HTTP servlets, parameters are contained in the query string * or posted form data. * * @return A {@link java.util.Map} containing parameter names as keys * and parameter values as map values. */ public Map<String,String[]> getParameterMap() { if (parameterMap.isLocked()) return parameterMap; for (final String name : getParameterNames()) { final String[] values = getParameterValues(name); parameterMap.put(name, values); } parameterMap.setLocked(true); return parameterMap; }
/** * Returns a {@link java.util.Map} of the parameters of this request. * Request parameters are extra information sent with the request. * For HTTP servlets, parameters are contained in the query string * or posted form data. * * @return A {@link java.util.Map} containing parameter names as keys * and parameter values as map values. */ public Map<String,String[]> getParameterMap() { if (parameterMap.isLocked()) return parameterMap; for (final String name : getParameterNames()) { final String[] values = getParameterValues(name); parameterMap.put(name, values); } parameterMap.setLocked(true); return parameterMap; }
/** * Returns a {@link java.util.Map} of the parameters of this request. * Request parameters are extra information sent with the request. * For HTTP servlets, parameters are contained in the query string * or posted form data. * * @return A {@link java.util.Map} containing parameter names as keys * and parameter values as map values. */ public Map<String,String[]> getParameterMap() { if (parameterMap.isLocked()) return parameterMap; for (final String name : getParameterNames()) { final String[] values = getParameterValues(name); parameterMap.put(name, values); } parameterMap.setLocked(true); return parameterMap; }
/** * Returns a {@link java.util.Map} of the parameters of this request. * Request parameters are extra information sent with the request. * For HTTP servlets, parameters are contained in the query string * or posted form data. * * @return A {@link java.util.Map} containing parameter names as keys * and parameter values as map values. */ public Map<String,String[]> getParameterMap() { if (parameterMap.isLocked()) return parameterMap; for (final String name : getParameterNames()) { final String[] values = getParameterValues(name); parameterMap.put(name, values); } parameterMap.setLocked(true); return parameterMap; }
/** * Returns a {@link java.util.Map} of the parameters of this request. * Request parameters are extra information sent with the request. * For HTTP servlets, parameters are contained in the query string * or posted form data. * * @return A {@link java.util.Map} containing parameter names as keys * and parameter values as map values. */ public Map<String,String[]> getParameterMap() { if (parameterMap.isLocked()) return parameterMap; for (final String name : getParameterNames()) { final String[] values = getParameterValues(name); parameterMap.put(name, values); } parameterMap.setLocked(true); return parameterMap; }