/** * Creates a resolver that is based on a call (request, response couple). It * first looks up the response attributes, then the request attributes and * finally the variables listed in this class Javadocs above. * * @param request * The request. * @param response * The response. * @return The call resolver. */ public static Resolver<?> createResolver(Request request, Response response) { return new CallResolver(request, response); }
return (entity != null && entity.getCharacterSet() != null) ? entity.getCharacterSet().getName() : null; case "ee": return getEncodingsAsString(entity); case "eed": return getExpirationDateAsString(entity); case "el": return getLanguagesAsString(entity); case "emd": return getModificationDateAsString(entity); case "emt": return (entity != null && entity.getMediaType() != null) ? entity.getMediaType().getName() : null; default: if (variableName.startsWith("o")) { return getReferenceContent(variableName.substring(1), this.request.getRootRef()); } else if (variableName.startsWith("f")) { return getReferenceContent(variableName.substring(1), this.request.getReferrerRef()); } else if (variableName.startsWith("h")) { return getReferenceContent(variableName.substring(1), this.request.getHostRef()); } else if (variableName.startsWith("r")) { return getReferenceContent(variableName.substring(1), this.request.getResourceRef()); return (entity != null && entity.getCharacterSet() != null) ? entity.getCharacterSet().getName() : null; case "EE": return getEncodingsAsString(entity); case "EED": return getExpirationDateAsString(entity); case "EL": return getLanguagesAsString(entity);
default: if (partName.startsWith("b")) { return getReferenceContent(partName.substring(1), reference.getBaseRef()); } else if (partName.startsWith("t")) { return getReferenceContent(partName.substring(1), reference.getTargetRef()); } else if (partName.isEmpty()) { return reference.toString(false, false);