protected void startUiFileContentServices() throws Throwable { Map<Path, String> pathToURIPath = new HashMap<>(); Path baseResourcePath = Utils.getServiceUiResourcePath(this); try { pathToURIPath = discoverUiResources(baseResourcePath, this); } catch (Throwable e) { log(Level.WARNING, "Error enumerating UI resources for %s: %s", this.getSelfLink(), Utils.toString(e)); } if (pathToURIPath.isEmpty()) { log(Level.WARNING, "No custom UI resources found for %s", this.getClass().getName()); return; } for (Entry<Path, String> e : pathToURIPath.entrySet()) { String value = e.getValue(); if (value.contains("/META-INF/")) { continue; } Operation post = Operation .createPost(UriUtils.buildUri(getHost(), value)); RestrictiveFileContentService fcs = new RestrictiveFileContentService( e.getKey().toFile()); getHost().startService(post, fcs); } }