(Predicate<Box> b, String propName)
| 125 | "<script src='/field/filesystem/field-boxbrowser.js'></script>" + |
| 126 | "</head><body><div class='all'>"; |
| 127 | static public final String postamble = "</div></body>"; |
| 128 | |
| 129 | private NanoHTTPD.Response handleBy(Predicate<Box> b, String propName) { |
| 130 | |
| 131 | Optional<Box> first = root.breadthFirst(root.both()) |
| 132 | .filter(b) |
| 133 | .findFirst(); |
| 134 | |
| 135 | if (!first.isPresent()) |
| 136 | return new NanoHTTPD.Response(NanoHTTPD.Response.Status.NOT_FOUND, null, "can't find box matching request"); |
| 137 | |
| 138 | if (propName != null) return handleBox(first.get(), new Dict.Prop<>(propName)); |
| 139 | else return handleBoxAllProperties(first.get()); |
| 140 | } |
| 141 |
no test coverage detected