String httpMethod = mapping.getMethod(); if (httpMethod==null) httpMethod=ALL_METHODS;
protected void processConstraintMapping(ConstraintMapping mapping) { String pathSpec = mapping.getPathSpec(); StringTokenizer tok = new StringTokenizer(pathSpec, PATH_SPEC_SEPARATORS); String httpMethod = mapping.getMethod(); while (tok.hasMoreTokens()) { String spec = tok.nextToken().trim(); if (httpMethod == null) { if ("*".equals(spec)) { if (defaultRoleInfo == null) { defaultRoleInfo = new RoleInfo(); } addConstraint(defaultRoleInfo, mapping.getConstraint()); } else { throw new IllegalArgumentException("No method specified for PathSpec " + pathSpec + "."); } } RestPathMap<RoleInfo> mappings = constraintMap.get(httpMethod); if (mappings == null) { mappings = new RestPathMap<RoleInfo>(); constraintMap.put(httpMethod, mappings); } RoleInfo roleInfo = mappings.get(spec); if (roleInfo == null) { roleInfo = new RoleInfo(); mappings.put(spec, roleInfo); } addConstraint(roleInfo, mapping.getConstraint()); } }
String httpMethod = mapping.getMethod(); if (httpMethod==null) httpMethod=ALL_METHODS;
@Override public void removeSecurityConstraintMappings( final SecurityConstraintMappingModel model) { final ServletContextHandler context = server.getContext(model .getContextModel().getHttpContext()); if (context == null) { return; // context already gone } final SecurityHandler securityHandler = context.getSecurityHandler(); if (securityHandler == null) { throw new IllegalStateException( "Internal error: Cannot find the security handler. Please report."); } List<ConstraintMapping> constraintMappings = ((ConstraintSecurityHandler) securityHandler) .getConstraintMappings(); for (ConstraintMapping constraintMapping : constraintMappings) { boolean urlMatch = constraintMapping.getPathSpec() .equalsIgnoreCase(model.getUrl()); boolean methodMatch = (constraintMapping.getMethod() == null && model.getMapping() == null) || (constraintMapping.getMethod().equalsIgnoreCase(model.getMapping())); if (urlMatch && methodMatch) { constraintMappings.remove(constraintMapping); } } removeContext(model.getContextModel().getHttpContext()); }
String httpMethod = mapping.getMethod(); if (httpMethod==null) httpMethod=ALL_METHODS;
String httpMethod = mapping.getMethod(); if (httpMethod==null) httpMethod=ALL_METHODS;
String httpMethod = mapping.getMethod(); if (httpMethod==null) httpMethod=ALL_METHODS;
String httpMethod = mapping.getMethod(); if (httpMethod==null) httpMethod=ALL_METHODS;
String httpMethod = mapping.getMethod(); RoleInfo roleInfo = mappings.get(httpMethod); if (roleInfo == null)
String httpMethod = mapping.getMethod(); RoleInfo roleInfo = mappings.get(httpMethod); if (roleInfo == null)
String httpMethod = mapping.getMethod(); RoleInfo roleInfo = mappings.get(httpMethod); if (roleInfo == null)
String httpMethod = mapping.getMethod(); RoleInfo roleInfo = mappings.get(httpMethod); if (roleInfo == null)