org.jboss.maven.plugins.thirdparty
Class ComponentInfoWriter

java.lang.Object
  extended by org.jboss.maven.plugins.thirdparty.ComponentInfoWriter

public class ComponentInfoWriter
extends java.lang.Object


Field Summary
static java.lang.String DEFAULT_COMP_INFO_FILENAME
           
static java.lang.String DEFAULT_TEMPLATE_FILENAME
           
 
Constructor Summary
ComponentInfoWriter()
           
 
Method Summary
static void fillPlaceholder(java.lang.StringBuffer buffer, java.lang.String placeholder, java.lang.String value)
          Replace all instances of placeholder with value in the given buffer.
static java.lang.String generateComponentInfo(ComponentInfo compInfo)
           
static java.lang.String getComponentInfoTemplate()
           
static java.lang.String getLibrariesEntEntry(ComponentInfo compInfo)
          Generate an entry for the libraries.ent file based on the given componentInfo object
static void loadTemplate()
          Load the component-info template file.
static void setComponentInfoTemplate(java.lang.String theComponentInfoTemplate)
           
static void writeComponentInfo(ComponentInfo compInfo, java.io.File outputFile)
          Write a componentInfo object to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TEMPLATE_FILENAME

public static final java.lang.String DEFAULT_TEMPLATE_FILENAME
See Also:
Constant Field Values

DEFAULT_COMP_INFO_FILENAME

public static final java.lang.String DEFAULT_COMP_INFO_FILENAME
See Also:
Constant Field Values
Constructor Detail

ComponentInfoWriter

public ComponentInfoWriter()
Method Detail

getComponentInfoTemplate

public static java.lang.String getComponentInfoTemplate()

setComponentInfoTemplate

public static void setComponentInfoTemplate(java.lang.String theComponentInfoTemplate)

loadTemplate

public static void loadTemplate()
                         throws java.io.IOException
Load the component-info template file.

Throws:
java.io.IOException

writeComponentInfo

public static void writeComponentInfo(ComponentInfo compInfo,
                                      java.io.File outputFile)
                               throws java.io.IOException
Write a componentInfo object to a file.

Parameters:
compInfo -
outputFile -
Throws:
java.io.IOException

generateComponentInfo

public static java.lang.String generateComponentInfo(ComponentInfo compInfo)

getLibrariesEntEntry

public static java.lang.String getLibrariesEntEntry(ComponentInfo compInfo)
Generate an entry for the libraries.ent file based on the given componentInfo object

Parameters:
compInfo -
Returns:

fillPlaceholder

public static void fillPlaceholder(java.lang.StringBuffer buffer,
                                   java.lang.String placeholder,
                                   java.lang.String value)
Replace all instances of placeholder with value in the given buffer. For example if placeholder is "project.name", this method will search the buffer for "${project.name}" and replace it with the value provided.

Parameters:
buffer - The buffer to be modified
var - The name of the variable to be evaluated.
value - The replacement string.


Copyright © 2007-2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.