* Intercepts and enriches http access, mainly focusing on security and
* transactionality.
*/
+@Deprecated
public class NodeHttp implements KernelConstants {
private final static Log log = LogFactory.getLog(NodeHttp.class);
- public final static String DEFAULT_SERVICE = "HTTP";
-
private final BundleContext bc = FrameworkUtil.getBundle(getClass()).getBundleContext();
private ServiceTracker<Repository, Repository> repositories;
private String httpRealm = "Argeo";
private String webDavConfig = HttpUtils.WEBDAV_CONFIG;
- private final boolean cleanState;
+// private final boolean cleanState;
- public NodeHttp(boolean cleanState) {
- this.cleanState = cleanState;
+ public NodeHttp() {
+// this.cleanState = cleanState;
httpServiceTracker = new PrepareHttpStc();
// httpServiceTracker.open();
KernelUtils.asyncOpen(httpServiceTracker);
try {
registerWebdavServlet(httpService, alias, repository);
registerRemotingServlet(httpService, alias, repository);
- if (NodeConstants.EGO.equals(alias))
+ if (NodeConstants.EGO_REPOSITORY.equals(alias))
registerFilesServlet(httpService, alias, repository);
if (log.isTraceEnabled())
log.trace("Registered servlets for repository '" + alias + "'");
try {
httpService.unregister(webdavPath(alias));
httpService.unregister(remotingPath(alias));
- if (NodeConstants.EGO.equals(alias))
+ if (NodeConstants.EGO_REPOSITORY.equals(alias))
httpService.unregister(filesPath(alias));
if (log.isTraceEnabled())
log.trace("Unregistered servlets for repository '" + alias + "'");
throw new CmsException("An http service is already configured");
repositories = new RepositoriesStc(bc, httpService);
// repositories.open();
- if (cleanState)
- KernelUtils.asyncOpen(repositories);
+
+ ///if (cleanState)
+ // FIXME properly publish servlets
+ //KernelUtils.asyncOpen(repositories);
+
log.info(httpPortsMsg(httpPort, httpsPort));
// httpAvailable = true;
// checkReadiness();