KIE EAP - Maven plugin 6.1.0.Final

org.kie.integration.eap.maven.template
Class EAPVelocityTemplateBuilder

java.lang.Object
  extended by org.kie.integration.eap.maven.template.EAPVelocityTemplateBuilder
All Implemented Interfaces:
EAPTemplateBuilder

@Component(role=EAPTemplateBuilder.class,
           hint="velocity")
public class EAPVelocityTemplateBuilder
extends Object
implements EAPTemplateBuilder


Nested Class Summary
static class EAPVelocityTemplateBuilder.EAPBaseDependency
           
static class EAPVelocityTemplateBuilder.EAPParent
           
 
Constructor Summary
EAPVelocityTemplateBuilder()
           
 
Method Summary
static String buildBasicPom(String groupId, String artifactId, String version, String packaging, String name, Collection<EAPVelocityTemplateBuilder.EAPBaseDependency> dependencies, Collection<String> modules, EAPVelocityTemplateBuilder.EAPParent parent, Map<String,String> properties)
           
 String buildDynamicModuleAssembly(EAPAssemblyTemplate assemblyTemplate)
          Build the assembly descriptor file for a given dynamic module.
 String buildDynamicModuleDependency(String name)
          Build the jboss-all.xml descriptor to add a dependency from a dynamic module to another one.
 String buildGlobalAssembly(String layerId, String[] formats, String layerDescriptorFilePath, String[] componentDescriptorsFilePaths)
          Builds the assembly descriptor file from a template.
 String buildJbossDeploymentStructure(Collection<? extends EAPModuleGraphNodeDependency> dependencies)
          Build the jboss deployment structure descriptor file for a given dynamic module (jboss-deployment-structure.xml)
 String buildLayersConfiguration(EAPModulesGraph graph)
          Builds the layers.conf file from a template.
 String buildModuleAssemblyComponent(EAPModuleGraphNode node, String moduleDescriptorPath, String outputPath)
          Build the assembly component descriptor file for a given static module.
 String buildModuleDescriptor(EAPModuleGraphNode node)
          Build the module descriptor file for a given static module (module.xml)
protected static org.apache.velocity.VelocityContext createContext()
           
protected  org.apache.velocity.VelocityContext createContext(EAPModuleGraphNode node)
           
protected static org.apache.velocity.Template getTemplate(String name, String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EAPVelocityTemplateBuilder

public EAPVelocityTemplateBuilder()
Method Detail

buildLayersConfiguration

public String buildLayersConfiguration(EAPModulesGraph graph)
Description copied from interface: EAPTemplateBuilder
Builds the layers.conf file from a template.

Specified by:
buildLayersConfiguration in interface EAPTemplateBuilder
Parameters:
graph - The modules graph.
Returns:
The layers.conf file.

buildGlobalAssembly

public String buildGlobalAssembly(String layerId,
                                  String[] formats,
                                  String layerDescriptorFilePath,
                                  String[] componentDescriptorsFilePaths)
Description copied from interface: EAPTemplateBuilder
Builds the assembly descriptor file from a template.

Specified by:
buildGlobalAssembly in interface EAPTemplateBuilder
Parameters:
layerId - The layer if.
formats - The assembly formats to generate.
layerDescriptorFilePath - The path for the generated layer descriptor file.
componentDescriptorsFilePaths - The path for the generated assembly components descriptors (one for each module to assemble).
Returns:
The assembly descriptor file from a template.

buildModuleAssemblyComponent

public String buildModuleAssemblyComponent(EAPModuleGraphNode node,
                                           String moduleDescriptorPath,
                                           String outputPath)
Description copied from interface: EAPTemplateBuilder
Build the assembly component descriptor file for a given static module.

Specified by:
buildModuleAssemblyComponent in interface EAPTemplateBuilder
Parameters:
node - The module graph node.
moduleDescriptorPath - The path for the generated assembly component descriptor file.
outputPath - The output path to generate the files.
Returns:
The assembly component descriptor file.

buildModuleDescriptor

public String buildModuleDescriptor(EAPModuleGraphNode node)
Description copied from interface: EAPTemplateBuilder
Build the module descriptor file for a given static module (module.xml)

Specified by:
buildModuleDescriptor in interface EAPTemplateBuilder
Parameters:
node - The module graph node.
Returns:
The module descriptor file for a given static module (module.xml)

buildJbossDeploymentStructure

public String buildJbossDeploymentStructure(Collection<? extends EAPModuleGraphNodeDependency> dependencies)
Description copied from interface: EAPTemplateBuilder
Build the jboss deployment structure descriptor file for a given dynamic module (jboss-deployment-structure.xml)

Specified by:
buildJbossDeploymentStructure in interface EAPTemplateBuilder
Parameters:
dependencies - The dynamic module dependencies to add in the generated jboss deployment structure.
Returns:
The jboss deployment structure descriptor file for a given dynamic module (jboss-deployment-structure.xml)

buildDynamicModuleAssembly

public String buildDynamicModuleAssembly(EAPAssemblyTemplate assemblyTemplate)
Description copied from interface: EAPTemplateBuilder
Build the assembly descriptor file for a given dynamic module.

Specified by:
buildDynamicModuleAssembly in interface EAPTemplateBuilder
Parameters:
assemblyTemplate - The assembly model.
Returns:
The assembly descriptor file for a given dynamic module.

buildDynamicModuleDependency

public String buildDynamicModuleDependency(String name)
Description copied from interface: EAPTemplateBuilder
Build the jboss-all.xml descriptor to add a dependency from a dynamic module to another one.

Specified by:
buildDynamicModuleDependency in interface EAPTemplateBuilder
Parameters:
name - The dependant module name.
Returns:
the jboss-all.xml descriptor content.

buildBasicPom

public static String buildBasicPom(String groupId,
                                   String artifactId,
                                   String version,
                                   String packaging,
                                   String name,
                                   Collection<EAPVelocityTemplateBuilder.EAPBaseDependency> dependencies,
                                   Collection<String> modules,
                                   EAPVelocityTemplateBuilder.EAPParent parent,
                                   Map<String,String> properties)

getTemplate

protected static org.apache.velocity.Template getTemplate(String name,
                                                          String path)

createContext

protected org.apache.velocity.VelocityContext createContext(EAPModuleGraphNode node)

createContext

protected static org.apache.velocity.VelocityContext createContext()

KIE EAP - Maven plugin 6.1.0.Final

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.