Package org.jboss.forge.addon.scaffold.spi

Examples of org.jboss.forge.addon.scaffold.spi.ScaffoldProvider


   @Override
   public void validate(UIValidationContext validator)
   {
      super.validate(validator);
      ScaffoldProvider scaffold = provider.getValue();
      scaffold.validate(validator);
   }
View Full Code Here


   }
  
   @Override
   public NavigationResult next(UINavigationContext context) throws Exception
   {
      ScaffoldProvider selectedProvider = provider.getValue();
      UIContext uiContext = context.getUIContext();
      Project project = getSelectedProject(uiContext);
      uiContext.setAttribute(Project.class, project);
      uiContext.setAttribute(ScaffoldProvider.class, selectedProvider);
      uiContext.setAttribute(ScaffoldGenerationContext.class, populateGenerationContext(uiContext));
      ((AbstractFacet) selectedProvider).setFaceted(project);
     
      // Get the step sequence from the selected scaffold provider
      List<Class<? extends UICommand>> generationFlow = selectedProvider.getGenerationFlow();
     
      // Add the execution logic step in the end so that the scaffold generation step is executed last after all other
      // steps
      generationFlow.add(ExecuteGenerationStep.class);
View Full Code Here

      overwrite.setEnabled(new Callable<Boolean>()
      {
         @Override
         public Boolean call() throws Exception
         {
            ScaffoldProvider selectedProvider = provider.getValue();
            ScaffoldContext scaffoldContext = newScaffoldContext();
            return selectedProvider != null && selectedProvider.needsOverwriteConfirmation(scaffoldContext);
         }
      });
      builder.add(provider).add(target).add(overwrite).add(installTemplates);
   }
View Full Code Here

   @Override
   public void validate(UIValidationContext validator)
   {
      super.validate(validator);
      ScaffoldProvider scaffold = scaffoldType.getValue();
      scaffold.validate(validator);
   }
View Full Code Here

      overwrite.setEnabled(new Callable<Boolean>()
      {
         @Override
         public Boolean call() throws Exception
         {
            ScaffoldProvider selectedProvider = provider.getValue();
            ScaffoldContext scaffoldContext = newScaffoldContext();
            return selectedProvider != null && selectedProvider.needsOverwriteConfirmation(scaffoldContext);
         }
      });
      builder.add(provider).add(target).add(overwrite).add(installTemplates);
   }
View Full Code Here

   @Override
   public void validate(UIValidationContext validator)
   {
      super.validate(validator);
      ScaffoldProvider scaffold = scaffoldType.getValue();
      scaffold.validate(validator);
   }
View Full Code Here

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      Map<Object, Object> attributeMap = context.getUIContext().getAttributeMap();

      ScaffoldProvider selectedProvider = (ScaffoldProvider) attributeMap.get(ScaffoldProvider.class);
      ScaffoldSetupContext setupContext = (ScaffoldSetupContext) attributeMap.get(ScaffoldSetupContext.class);
      selectedProvider.setup(setupContext);
      // No-op. Scaffold setup is done in a separate step.
      return Results.success("Scaffold was setup successfully.");
   }
View Full Code Here

   public NavigationResult next(UINavigationContext context) throws Exception
   {
      UIContext uiContext = context.getUIContext();
      Map<Object, Object> attributeMap = uiContext.getAttributeMap();

      ScaffoldProvider selectedProvider = provider.getValue();
      ScaffoldSetupContext setupContext = createSetupContext(uiContext);
      attributeMap.put(ScaffoldProvider.class, selectedProvider);
      attributeMap.put(ScaffoldSetupContext.class, setupContext);

      // Get the navigation result entries from the selected scaffold provider
      NavigationResult setupFlow = selectedProvider.getSetupFlow(setupContext);

      // Add the execution logic step in the end so that the scaffold setup step is executed last after all other steps
      NavigationResultBuilder builder = NavigationResultBuilder.create(setupFlow);
      NavigationResult navigationResult = builder.add(ScaffoldExecuteSetupStep.class).build();
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.scaffold.spi.ScaffoldProvider

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.