Package org.jboss.forge.spec.javaee.validation.provider

Examples of org.jboss.forge.spec.javaee.validation.provider.ValidationProvider


            @Option(name = "messageInterpolator", type = PromptType.JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = PromptType.JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = PromptType.JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider provider = providerType.getValidationProvider(beanManager);

      if (!project.hasFacet(ValidationFacet.class))
      {
         request.fire(new InstallFacets(ValidationFacet.class));
      }

      installDependencies(provider.getDependencies());

      if (!provider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + providerType.getName() + " additional dependencies?", false)) {
            installDependencies(provider.getAdditionalDependencies());
         }
      }

      if (provider.getDefaultDescriptor() != null)
      {
         final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
         final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class)
                  .setDefaultProvider(providerDescriptor.getDefaultProvider())
                  .setMessageInterpolator( messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
                  .setTraversableResolver( traversableResolver == null ? providerDescriptor.getTraversableResolver() : traversableResolver)
                  .setConstraintValidatorFactory( constraintValidatorFactory == null ? providerDescriptor.getConstraintValidatorFactory() : constraintValidatorFactory);
View Full Code Here


            @Option(name = "messageInterpolator", type = PromptType.JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = PromptType.JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = PromptType.JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider provider = providerType.getValidationProvider(beanManager);

      if (!project.hasFacet(ValidationFacet.class))
      {
         request.fire(new InstallFacets(ValidationFacet.class));
      }

      installDependencies(provider.getDependencies());

      if (!provider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + providerType.getName() + " additional dependencies?", false)) {
            installDependencies(provider.getAdditionalDependencies());
         }
      }

      if (provider.getDefaultDescriptor() != null)
      {
         final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
         final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class)
                  .setDefaultProvider(providerDescriptor.getDefaultProvider())
                  .setMessageInterpolator( messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
                  .setTraversableResolver( traversableResolver == null ? providerDescriptor.getTraversableResolver() : traversableResolver)
                  .setConstraintValidatorFactory( constraintValidatorFactory == null ? providerDescriptor.getConstraintValidatorFactory() : constraintValidatorFactory);
View Full Code Here

            @Option(name = "messageInterpolator", type = PromptType.JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = PromptType.JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = PromptType.JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider provider = providerType.getValidationProvider(beanManager);

      if (!project.hasFacet(ValidationFacet.class))
      {
         request.fire(new InstallFacets(ValidationFacet.class));
      }

      installDependencies(provider.getDependencies());

      if (!provider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + providerType.getName() + " additional dependencies?", false)) {
            installDependencies(provider.getAdditionalDependencies());
         }
      }

      if (provider.getDefaultDescriptor() != null)
      {
         final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
         final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class)
                  .setDefaultProvider(providerDescriptor.getDefaultProvider())
                  .setMessageInterpolator( messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
                  .setTraversableResolver( traversableResolver == null ? providerDescriptor.getTraversableResolver() : traversableResolver)
                  .setConstraintValidatorFactory( constraintValidatorFactory == null ? providerDescriptor.getConstraintValidatorFactory() : constraintValidatorFactory);
View Full Code Here

            @Option(name = "messageInterpolator", type = PromptType.JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = PromptType.JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = PromptType.JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider provider = providerType.getValidationProvider(beanManager);

      if (!project.hasFacet(ValidationFacet.class))
      {
         request.fire(new InstallFacets(ValidationFacet.class));
      }

      installDependencies(provider.getDependencies());

      if (!provider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + providerType.getName() + " additional dependencies?", false)) {
            installDependencies(provider.getAdditionalDependencies());
         }
      }

      if (provider.getDefaultDescriptor() != null)
      {
         final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
         final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class)
                  .setDefaultProvider(providerDescriptor.getDefaultProvider())
                  .setMessageInterpolator( messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
                  .setTraversableResolver( traversableResolver == null ? providerDescriptor.getTraversableResolver() : traversableResolver)
                  .setConstraintValidatorFactory( constraintValidatorFactory == null ? providerDescriptor.getConstraintValidatorFactory() : constraintValidatorFactory);
View Full Code Here

            @Option(name = "messageInterpolator", type = JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider validationProvider = provider.getValidationProvider(beanManager);

      installValidationFacet();
      installDependencies(validationProvider.getDependencies());

      if (!validationProvider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + provider.getName() + " additional dependencies?", false)) {
            installDependencies(validationProvider.getAdditionalDependencies());
         }
      }

      // generates the default provider validation configuration file
      final ValidationDescriptor providerDescriptor = validationProvider.getDefaultDescriptor();
      final ValidationDescriptor descriptor = create(ValidationDescriptor.class)
               .defaultProvider(providerDescriptor.getDefaultProvider())
               .messageInterpolator(
                        messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
               .traversableResolver(
View Full Code Here

                      @Option(name = "messageInterpolator", type = JAVA_CLASS) String messageInterpolator,
                      @Option(name = "traversableResolver", type = JAVA_CLASS) String traversableResolver,
                      @Option(name = "constraintValidatorFactory", type = JAVA_CLASS) String constraintValidatorFactory)
    {
        // instantiates the validation provider specified by the user
        final ValidationProvider validationProvider = provider.getValidationProvider(beanManager);

        installValidationFacet();
        installDependencies(validationProvider.getDependencies());

        if (!validationProvider.getAdditionalDependencies().isEmpty())
        {
            if (prompt.promptBoolean("Would you install " + provider.getName() + " additional dependencies?" ,false)){
                installDependencies(validationProvider.getAdditionalDependencies());
            }
        }

        // generates the default provider validation configuration file
        final ValidationDescriptor providerDescriptor = validationProvider.getDefaultDescriptor();
        final ValidationDescriptor descriptor = create(ValidationDescriptor.class)
                .defaultProvider(providerDescriptor.getDefaultProvider())
                .messageInterpolator(messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
                .traversableResolver(traversableResolver == null ? providerDescriptor.getTraversableResolver() : traversableResolver)
                .constraintValidatorFactory(constraintValidatorFactory == null ? providerDescriptor.getConstraintValidatorFactory() : constraintValidatorFactory);
View Full Code Here

            @Option(name = "messageInterpolator", type = PromptType.JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = PromptType.JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = PromptType.JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider provider = providerType.getValidationProvider(beanManager);

      if (!project.hasFacet(ValidationFacet.class))
      {
         request.fire(new InstallFacets(ValidationFacet.class));
      }

      installDependencies(provider.getDependencies());

      if (!provider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + providerType.getName() + " additional dependencies?", false)) {
            installDependencies(provider.getAdditionalDependencies());
         }
      }

      if (provider.getDefaultDescriptor() != null)
      {
         final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
         final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class);
         String defaultProvider = providerDescriptor.getDefaultProvider();
         if (defaultProvider != null && !defaultProvider.isEmpty())
         {
            descriptor.setDefaultProvider(defaultProvider);
View Full Code Here

            @Option(name = "messageInterpolator", type = PromptType.JAVA_CLASS) final String messageInterpolator,
            @Option(name = "traversableResolver", type = PromptType.JAVA_CLASS) final String traversableResolver,
            @Option(name = "constraintValidatorFactory", type = PromptType.JAVA_CLASS) final String constraintValidatorFactory)
   {
      // instantiates the validation provider specified by the user
      final ValidationProvider provider = providerType.getValidationProvider(beanManager);

      if (!project.hasFacet(ValidationFacet.class))
      {
         request.fire(new InstallFacets(ValidationFacet.class));
      }

      installDependencies(provider.getDependencies());

      if (!provider.getAdditionalDependencies().isEmpty())
      {
         if (prompt.promptBoolean("Would you install " + providerType.getName() + " additional dependencies?", false)) {
            installDependencies(provider.getAdditionalDependencies());
         }
      }

      if (provider.getDefaultDescriptor() != null)
      {
         final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
         final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class)
                  .setDefaultProvider(providerDescriptor.getDefaultProvider())
                  .setMessageInterpolator( messageInterpolator == null ? providerDescriptor.getMessageInterpolator() : messageInterpolator)
                  .setTraversableResolver( traversableResolver == null ? providerDescriptor.getTraversableResolver() : traversableResolver)
                  .setConstraintValidatorFactory( constraintValidatorFactory == null ? providerDescriptor.getConstraintValidatorFactory() : constraintValidatorFactory);
View Full Code Here

TOP

Related Classes of org.jboss.forge.spec.javaee.validation.provider.ValidationProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.