fr.paris.lutece.plugins.pluginwizard.service.generator
Class AbstractGenerator

java.lang.Object
  extended by fr.paris.lutece.plugins.pluginwizard.service.generator.AbstractGenerator
All Implemented Interfaces:
Generator
Direct Known Subclasses:
AbstractFileGenerator, AdminJspBeanGenerator, AdminJspControllerGenerator, AdminJspGenerator, AdminTemplateGenerator, BusinessClassGenerator, PortletGenerator, PortletJspBeanGenerator, PortletJspGenerator, PortletTemplateGenerator, PortletXslGenerator, ResourcesGenerator, SiteDocumentationGenerator, SqlCodeGenerator, XPageGenerator

public abstract class AbstractGenerator
extends Object
implements Generator

AbstractGenerator


Constructor Summary
AbstractGenerator()
           
 
Method Summary
protected  String build(Map<String,Object> model)
          Build the code
protected  String build(PluginModel pm)
          Build the code
protected  String build(String strTemplate, Map<String,Object> model)
          Build the code
protected  String build(String strTemplate, PluginModel pm)
          Build the code
protected  String getFilePath(PluginModel pm, String strPath, String strFilename)
          Build the file path
protected  String getFirstCaps(String strValue)
          Returns the value of a string with first letter in caps
protected  Map<String,Object> getModel(PluginModel pm)
          Return the model filled with the plugin model
 String getTemplate()
          Returns the Template
 void setTemplate(String strTemplate)
          Sets the Template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.paris.lutece.plugins.pluginwizard.service.generator.Generator
generate
 

Constructor Detail

AbstractGenerator

public AbstractGenerator()
Method Detail

getTemplate

public String getTemplate()
Returns the Template

Returns:
The Template

setTemplate

public void setTemplate(String strTemplate)
Sets the Template

Parameters:
strTemplate - The Template

getFilePath

protected String getFilePath(PluginModel pm,
                             String strPath,
                             String strFilename)
Build the file path

Parameters:
pm - The Plugin Model
strPath - The relative path
strFilename - The file name
Returns:
The full path

getFirstCaps

protected String getFirstCaps(String strValue)
Returns the value of a string with first letter in caps

Parameters:
strValue - The value to be transformed
Returns:
The first letter is in Capital

getModel

protected Map<String,Object> getModel(PluginModel pm)
Return the model filled with the plugin model

Parameters:
pm - The plugin model
Returns:
The model

build

protected String build(PluginModel pm)
Build the code

Parameters:
pm - The plugin model
Returns:
The code

build

protected String build(String strTemplate,
                       PluginModel pm)
Build the code

Parameters:
strTemplate - The code template
pm - The plugin model
Returns:
The code

build

protected String build(Map<String,Object> model)
Build the code

Parameters:
model - The model
Returns:
The code

build

protected String build(String strTemplate,
                       Map<String,Object> model)
Build the code

Parameters:
strTemplate - The code template
model - The model
Returns:
The code


Copyright © 2013 Mairie de Paris. All Rights Reserved.