Search in sources :

Example 1 with JSFVersionProcessor

use of org.jboss.as.jsf.deployment.JSFVersionProcessor in project wildfly by wildfly.

the class JSFSubsystemAdd method performBoottime.

@Override
protected void performBoottime(OperationContext context, ModelNode operation, final ModelNode model) throws OperationFailedException {
    final String defaultJSFSlot = JSFResourceDefinition.DEFAULT_JSF_IMPL_SLOT.resolveModelAttribute(context, model).asString();
    final Boolean disallowDoctypeDecl = JSFResourceDefinition.DISALLOW_DOCTYPE_DECL.resolveModelAttribute(context, model).asBooleanOrNull();
    context.addStep(new AbstractDeploymentChainStep() {

        protected void execute(DeploymentProcessorTarget processorTarget) {
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_VERSION, new JSFVersionProcessor(defaultJSFSlot));
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_SHARED_TLDS, new JSFSharedTldsProcessor());
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_METADATA, new JSFMetadataProcessor(disallowDoctypeDecl));
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_JSF, new JSFDependencyProcessor());
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JSF_MANAGED_BEANS, new JSFComponentProcessor());
            CapabilityServiceSupport capabilities = context.getCapabilityServiceSupport();
            if (capabilities.hasCapability(WELD_CAPABILITY_NAME)) {
                processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JSF_CDI_EXTENSIONS, new JSFCdiExtensionDeploymentProcessor());
            }
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_JSF_ANNOTATIONS, new JSFAnnotationProcessor());
            if (context.hasOptionalCapability("org.wildfly.bean-validation", null, null)) {
                processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_JSF_VALIDATOR_FACTORY, new JSFBeanValidationFactoryProcessor());
            }
        }
    }, OperationContext.Stage.RUNTIME);
}
Also used : JSFVersionProcessor(org.jboss.as.jsf.deployment.JSFVersionProcessor) JSFMetadataProcessor(org.jboss.as.jsf.deployment.JSFMetadataProcessor) JSFCdiExtensionDeploymentProcessor(org.jboss.as.jsf.deployment.JSFCdiExtensionDeploymentProcessor) CapabilityServiceSupport(org.jboss.as.controller.capability.CapabilityServiceSupport) JSFAnnotationProcessor(org.jboss.as.jsf.deployment.JSFAnnotationProcessor) JSFBeanValidationFactoryProcessor(org.jboss.as.jsf.deployment.JSFBeanValidationFactoryProcessor) JSFDependencyProcessor(org.jboss.as.jsf.deployment.JSFDependencyProcessor) JSFComponentProcessor(org.jboss.as.jsf.deployment.JSFComponentProcessor) DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) JSFSharedTldsProcessor(org.jboss.as.jsf.deployment.JSFSharedTldsProcessor) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep)

Aggregations

CapabilityServiceSupport (org.jboss.as.controller.capability.CapabilityServiceSupport)1 JSFAnnotationProcessor (org.jboss.as.jsf.deployment.JSFAnnotationProcessor)1 JSFBeanValidationFactoryProcessor (org.jboss.as.jsf.deployment.JSFBeanValidationFactoryProcessor)1 JSFCdiExtensionDeploymentProcessor (org.jboss.as.jsf.deployment.JSFCdiExtensionDeploymentProcessor)1 JSFComponentProcessor (org.jboss.as.jsf.deployment.JSFComponentProcessor)1 JSFDependencyProcessor (org.jboss.as.jsf.deployment.JSFDependencyProcessor)1 JSFMetadataProcessor (org.jboss.as.jsf.deployment.JSFMetadataProcessor)1 JSFSharedTldsProcessor (org.jboss.as.jsf.deployment.JSFSharedTldsProcessor)1 JSFVersionProcessor (org.jboss.as.jsf.deployment.JSFVersionProcessor)1 AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)1 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)1