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

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


            }
         }
      }

      attributeMap.put(ResourceCollection.class, resourceCollection);
      ScaffoldGenerationContext genCtx = (ScaffoldGenerationContext) attributeMap.get(ScaffoldGenerationContext.class);
      if (uiContext.getProvider().isGUI())
      {
         if (useCustomTemplate.getValue())
         {
            genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
         }
      }
      else
      {
         genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
      }
      return null;
   }
View Full Code Here


            }
         }
      }

      attributeMap.put(ResourceCollection.class, resourceCollection);
      ScaffoldGenerationContext genCtx = (ScaffoldGenerationContext) attributeMap.get(ScaffoldGenerationContext.class);
      if (uiContext.getProvider().isGUI())
      {
         if (useCustomTemplate.getValue())
         {
            genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
         }
      }
      else
      {
         genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
      }
      return null;
   }
View Full Code Here

      scaffoldProvider.setup(setupContext);

      // Execute
      List<Resource<?>> scaffoldables = new ArrayList<Resource<?>>();
      scaffoldables.add(resourceFactory.create(new Scaffoldable("mock")));
      ScaffoldGenerationContext generationContext = new ScaffoldGenerationContext("", scaffoldables, project);
      List<Resource<?>> generatedResources = scaffoldProvider.generateFrom(generationContext);

      // Verify
      assertTrue(generatedResources.size() > 0);
      assertTrue(generatedResources.get(0) instanceof ScaffoldedResource);
View Full Code Here

         }
      }
      Map<Object, Object> attributeMap = context.getUIContext().getAttributeMap();

      attributeMap.put(ResourceCollection.class, resourceCollection);
      ScaffoldGenerationContext genCtx = (ScaffoldGenerationContext) attributeMap.get(ScaffoldGenerationContext.class);
      genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
      return null;
   }
View Full Code Here

   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context, Collection<?> resources)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      generationContext.setResources(resources);
      return generationContext;
   }
View Full Code Here

   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      if (generationContext == null)
      {
         return new ScaffoldGenerationContext(webRoot.getValue(), overwrite.getValue(), null);
      }
      else
      {
         generationContext.setTargetDirectory(webRoot.getValue());
         generationContext.setOverwrite(overwrite.getValue());
         return generationContext;
      }
   }
View Full Code Here

   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context, Collection<Resource<?>> resources)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      generationContext.setResources(resources);
      return generationContext;
   }
View Full Code Here

   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      if (generationContext == null)
      {
         return new ScaffoldGenerationContext(webRoot.getValue(), overwrite.getValue(), null);
      }
      else
      {
         generationContext.setTargetDirectory(webRoot.getValue());
         generationContext.setOverwrite(overwrite.getValue());
         return generationContext;
      }
   }
View Full Code Here

   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      if (generationContext == null)
      {
         return new ScaffoldGenerationContext(webRoot.getValue(), overwrite.getValue(), null);
      }
      else
      {
         generationContext.setTargetDirectory(webRoot.getValue());
         generationContext.setOverwrite(overwrite.getValue());
         return generationContext;
      }
   }
View Full Code Here

   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context, Collection<?> resources)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      generationContext.setResources(resources);
      return generationContext;
   }
View Full Code Here

TOP

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

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.