@Override public void writeServices( String resourceName, TextWriteHandle sourceHandle, ExtensionMetadata metadata, MethodParameters... methodParams ) { if (resourceName == null) throw new IllegalArgumentException("Writing resource services with null name"); if (logger.isInfoEnabled()) logger.info("Writing resource services source for {}", resourceName); HandleImplementation sourceBase = HandleAccessor.checkHandle(sourceHandle, "resource"); RequestParameters extraParams = (metadata != null) ? metadata.asParameters() : new RequestParameters(); if (methodParams != null) { for (MethodParameters params : methodParams) { String method = params.getMethod().toString().toLowerCase(); extraParams.add("method", method); String prefix = method+":"; for (Map.Entry<String,List<String>> entry: params.entrySet()) { extraParams.put(prefix+entry.getKey(), entry.getValue()); } } } services.putValue(requestLogger, "config/resources", resourceName, extraParams, "application/xquery", sourceBase); }
if (methodParams != null) { for (MethodParameters params : methodParams) { String method = params.getMethod().toString().toLowerCase(); extraParams.add("method", method); String prefix = method+":";
/** * Returns whether the method declaration is the same. */ @Override public boolean equals(Object other) { if (other == null) return false; if (!(other instanceof MethodParameters)) return false; MethodParameters otherParam = (MethodParameters) other; if (!getMethod().equals(otherParam.getMethod())) return false; return super.equals(otherParam); } }
/** * Returns whether the method declaration is the same. */ @Override public boolean equals(Object other) { if (other == null) return false; if (!(other instanceof MethodParameters)) return false; MethodParameters otherParam = (MethodParameters) other; if (!getMethod().equals(otherParam.getMethod())) return false; return super.equals(otherParam); } }
/** * Returns the hash code for the method. */ @Override public int hashCode() { return getMethod().hashCode(); } /**
/** * Returns the hash code for the method. */ @Override public int hashCode() { return getMethod().hashCode(); } /**