Package org.jboss.forge.project.facets.events

Examples of org.jboss.forge.project.facets.events.InstallFacets


            description = "Name of the facet to install") final String facetName)
   {
      try
      {
         Facet facet = factory.getFacetByName(facetName);
         installFacets.fire(new InstallFacets(facet.getClass()));
      }
      catch (FacetNotFoundException e)
      {
         throw new RuntimeException("Could not find a facet with the name: " + facetName
                  + "; use 'project list-facets' to list all available facets.", e);
View Full Code Here


   @SetupCommand
   public void setup(@Option(name = "activatorType") RestActivatorType activatorType, final PipeOut out)
   {
      if (!project.hasFacet(RestFacet.class))
      {
         request.fire(new InstallFacets(RestFacet.class));
      }

      String rootpath = prompt.prompt("What root path do you want to use for your resources?", "/rest");
      configuration.addProperty(RestFacet.ROOTPATH, rootpath);

      if (activatorType == null || activatorType == RestActivatorType.WEB_XML
               && !project.hasFacet(RestWebXmlFacetImpl.class))
      {
         request.fire(new InstallFacets(RestWebXmlFacetImpl.class));
      }
      else if (activatorType == RestActivatorType.APP_CLASS && !project.hasFacet(RestApplicationFacet.class))
      {
         String pkg = prompt.promptCommon("In what package do you want to store the Application class?",
                  PromptType.JAVA_PACKAGE);
         String restApplication = prompt.prompt("How do you want to name the Application class?", "RestApplication");
         configuration.addProperty(RestApplicationFacet.REST_APPLICATIONCLASS_PACKAGE, pkg);
         configuration.addProperty(RestApplicationFacet.REST_APPLICATIONCLASS_NAME, restApplication);
         request.fire(new InstallFacets(RestApplicationFacet.class));
      }

      if (project.hasFacet(RestFacet.class))
      {
         ShellMessages.success(out, "Rest Web Services (JAX-RS) is installed.");
View Full Code Here

      /*
       * Make sure we have all the features we need for this to work.
       */
      if (!project.hasAllFacets(Arrays.asList(EJBFacet.class, PersistenceFacet.class)))
      {
         request.fire(new InstallFacets(true, JTAFacet.class, EJBFacet.class, PersistenceFacet.class));
      }

      if (((targets == null) || (targets.length < 1))
               && (currentResource instanceof JavaResource))
      {
View Full Code Here

   public boolean install()
   {
      if (!(this.project.hasFacet(WebResourceFacet.class) && this.project.hasFacet(PersistenceFacet.class)
               && this.project.hasFacet(CDIFacet.class) && this.project.hasFacet(FacesFacet.class)))
      {
         this.install.fire(new InstallFacets(WebResourceFacet.class, PersistenceFacet.class, CDIFacet.class,
                  FacesFacet.class));
      }

      return true;
   }
View Full Code Here

   @Command("setup")
   public void setup(final PipeOut out)
   {
      if (!project.hasFacet(FacesFacet.class))
      {
         request.fire(new InstallFacets(FacesFacet.class));
      }

      if (project.hasFacet(FacesFacet.class))
      {
         ShellMessages.success(out, "JavaServer Faces is installed.");
View Full Code Here

   {
      if (!project.hasFacet(CDIFacet.class))
      {
         dependencyFacet = project.getFacet(DependencyFacet.class);

         install.fire(new InstallFacets(CDIFacet.class));
         installDependencies();
      }

   }
View Full Code Here

   public boolean install()
   {
      if (!(this.project.hasFacet(WebResourceFacet.class) && this.project.hasFacet(PersistenceFacet.class)
               && this.project.hasFacet(CDIFacet.class) && this.project.hasFacet(FacesFacet.class)))
      {
         this.install.fire(new InstallFacets(WebResourceFacet.class, PersistenceFacet.class, CDIFacet.class,
                  FacesFacet.class));
      }

      return true;
   }
View Full Code Here

       * Perform installation
       */
      if (!project.hasFacet(scaffoldImpl.getClass())
               && prompt.promptBoolean("Scaffold provider [" + scaffoldType + "] is not installed. Install it?"))
      {
         installFacets.fire(new InstallFacets(scaffoldImpl.getClass()));
      }
      else if (!project.hasFacet(scaffoldImpl.getClass()))
      {
         throw new RuntimeException("Aborted.");
      }
View Full Code Here

   private void installPersistence()
   {
      if (!project.hasFacet(PersistenceFacet.class))
      {
         request.fire(new InstallFacets(PersistenceFacet.class));
      }
   }
View Full Code Here

   @SetupCommand
   public void setup(final PipeOut out, @Option(name = "quickstart") final boolean quickstart)
   {
      if (!project.hasFacet(ServletFacet.class))
      {
         request.fire(new InstallFacets(ServletFacet.class));
      }
      if (quickstart)
      {
         // webRoot is created by the ServletFacet install
         DirectoryResource webRoot = project.getFacet(WebResourceFacet.class).getWebRootDirectory();
View Full Code Here

TOP

Related Classes of org.jboss.forge.project.facets.events.InstallFacets

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.