+ public void addHttpHandler(HttpHandler httpHandler, Map<String, String> properties) {
+ final String contextPath = properties.get(CONTEXT_PATH);
+ if (contextPath == null) {
+ log.warn("Property " + CONTEXT_PATH + " not set on HTTP handler " + properties + ". Ignoring it.");
+ return;
+ }
+ boolean isPublic = Boolean.parseBoolean(properties.get(CmsConstants.CONTEXT_PUBLIC));
+ CmsAuthenticator authenticator = isPublic ? new PublicCmsAuthenticator() : new CmsAuthenticator();
+ httpHandlers.put(contextPath, httpHandler);
+ httpAuthenticators.put(contextPath, authenticator);
+ if (httpServer == null) {
+ return;
+ } else {
+ createHttpContext(contextPath, httpHandler, authenticator);