MCPcopy Create free account
hub / github.com/BaseXdb/basex / find

Method find

basex-api/src/main/java/org/basex/http/web/WebModules.java:144–157  ·  view source on GitHub ↗

Returns RESTXQ and permissions functions that match the current request. @param conn HTTP connection @param error error code (assigned if error function is to be called) @param perm permission flag @return list of matching functions, ordered by specifity @throws QueryException query exception @throw

(final HTTPConnection conn, final QNm error, final boolean perm)

Source from the content-addressed store, hash-verified

142 * @throws IOException I/O exception
143 */
144 private List<RestXqFunction> find(final HTTPConnection conn, final QNm error, final boolean perm)
145 throws QueryException, IOException {
146
147 // collect and sort all functions
148 final ArrayList<RestXqFunction> list = new ArrayList<>();
149 for(final WebModule module : cache(conn.context).values()) {
150 for(final RestXqFunction func : module.functions()) {
151 if(func.matches(conn, error, perm)) list.add(func);
152 }
153 }
154 // sort by specifity
155 Collections.sort(list);
156 return list;
157 }
158
159 /**
160 * Returns permission functions that match the current request.

Callers 15

restxqMethod · 0.95
checksMethod · 0.95
recv_until_terminatorMethod · 0.45
createMethod · 0.45
checkVariableMethod · 0.45
removeReadOnlyRangesFunction · 0.45
compareCollapsedMarkersFunction · 0.45
visualLineFunction · 0.45
visualLineEndFunction · 0.45
visualLineContinuedFunction · 0.45
visualLineEndNoFunction · 0.45

Calls 6

cacheMethod · 0.95
addMethod · 0.65
valuesMethod · 0.45
functionsMethod · 0.45
matchesMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected