Esempio n. 1
0
  @Override
  public DeploymentInfo clone() {
    final DeploymentInfo info =
        new DeploymentInfo()
            .setClassLoader(classLoader)
            .setContextPath(contextPath)
            .setResourceLoader(resourceLoader)
            .setMajorVersion(majorVersion)
            .setMinorVersion(minorVersion)
            .setDeploymentName(deploymentName);

    for (Map.Entry<String, ServletInfo> e : servlets.entrySet()) {
      info.addServlet(e.getValue().clone());
    }

    for (Map.Entry<String, FilterInfo> e : filters.entrySet()) {
      info.addFilter(e.getValue().clone());
    }
    info.displayName = displayName;
    info.filterUrlMappings.addAll(filterUrlMappings);
    info.filterServletNameMappings.addAll(filterServletNameMappings);
    info.listeners.addAll(listeners);
    info.servletContainerInitializers.addAll(servletContainerInitializers);
    info.threadSetupActions.addAll(threadSetupActions);
    info.initParameters.putAll(initParameters);
    info.servletContextAttributes.putAll(servletContextAttributes);
    info.welcomePages.addAll(welcomePages);
    info.errorPages.addAll(errorPages);
    info.mimeMappings.addAll(mimeMappings);
    info.executorFactory = executorFactory;
    info.asyncExecutorFactory = asyncExecutorFactory;
    info.tempDir = tempDir;
    info.jspConfigDescriptor = jspConfigDescriptor;
    info.defaultServletConfig = defaultServletConfig;
    info.localeCharsetMapping.putAll(localeCharsetMapping);
    info.sessionManager = sessionManager;
    info.loginConfig = loginConfig;
    info.identityManager = identityManager;
    info.securityConstraints.addAll(securityConstraints);
    info.principleVsRoleMapping.putAll(principleVsRoleMapping);
    return info;
  }
Esempio n. 2
0
  @Override
  public DeploymentInfo clone() {
    final DeploymentInfo info =
        new DeploymentInfo()
            .setClassLoader(classLoader)
            .setContextPath(contextPath)
            .setResourceManager(resourceManager)
            .setMajorVersion(majorVersion)
            .setMinorVersion(minorVersion)
            .setDeploymentName(deploymentName)
            .setClassIntrospecter(classIntrospecter);

    for (Map.Entry<String, ServletInfo> e : servlets.entrySet()) {
      info.addServlet(e.getValue().clone());
    }

    for (Map.Entry<String, FilterInfo> e : filters.entrySet()) {
      info.addFilter(e.getValue().clone());
    }
    info.displayName = displayName;
    info.filterUrlMappings.addAll(filterUrlMappings);
    info.filterServletNameMappings.addAll(filterServletNameMappings);
    info.listeners.addAll(listeners);
    info.servletContainerInitializers.addAll(servletContainerInitializers);
    info.threadSetupActions.addAll(threadSetupActions);
    info.initParameters.putAll(initParameters);
    info.servletContextAttributes.putAll(servletContextAttributes);
    info.welcomePages.addAll(welcomePages);
    info.errorPages.addAll(errorPages);
    info.mimeMappings.addAll(mimeMappings);
    info.executor = executor;
    info.asyncExecutor = asyncExecutor;
    info.tempDir = tempDir;
    info.jspConfigDescriptor = jspConfigDescriptor;
    info.defaultServletConfig = defaultServletConfig;
    info.localeCharsetMapping.putAll(localeCharsetMapping);
    info.sessionManagerFactory = sessionManagerFactory;
    if (loginConfig != null) {
      info.loginConfig = loginConfig.clone();
    }
    info.identityManager = identityManager;
    info.confidentialPortManager = confidentialPortManager;
    info.defaultEncoding = defaultEncoding;
    info.urlEncoding = urlEncoding;
    info.securityConstraints.addAll(securityConstraints);
    info.outerHandlerChainWrappers.addAll(outerHandlerChainWrappers);
    info.innerHandlerChainWrappers.addAll(innerHandlerChainWrappers);
    info.initialHandlerChainWrappers.addAll(initialHandlerChainWrappers);
    info.securityRoles.addAll(securityRoles);
    info.notificationReceivers.addAll(notificationReceivers);
    info.allowNonStandardWrappers = allowNonStandardWrappers;
    info.defaultSessionTimeout = defaultSessionTimeout;
    info.servletContextAttributeBackingMap = servletContextAttributeBackingMap;
    info.servletSessionConfig = servletSessionConfig;
    info.hostName = hostName;
    info.denyUncoveredHttpMethods = denyUncoveredHttpMethods;
    info.servletStackTraces = servletStackTraces;
    info.invalidateSessionOnLogout = invalidateSessionOnLogout;
    info.defaultCookieVersion = defaultCookieVersion;
    info.sessionPersistenceManager = sessionPersistenceManager;
    info.principalVersusRolesMap.putAll(principalVersusRolesMap);
    info.ignoreFlush = ignoreFlush;
    info.authorizationManager = authorizationManager;
    info.authenticationMechanisms.putAll(authenticationMechanisms);
    info.servletExtensions.addAll(servletExtensions);
    info.jaspiAuthenticationMechanism = jaspiAuthenticationMechanism;
    info.securityContextFactory = securityContextFactory;
    info.serverName = serverName;
    info.metricsCollector = metricsCollector;
    info.sessionConfigWrapper = sessionConfigWrapper;
    info.eagerFilterInit = eagerFilterInit;
    info.disableCachingForSecuredPages = disableCachingForSecuredPages;
    this.lifecycleInterceptors.addAll(lifecycleInterceptors);
    return info;
  }