com.silverpeas.util.template
Class SilverpeasStringTemplate

java.lang.Object
  extended by com.silverpeas.util.template.SilverpeasStringTemplate
All Implemented Interfaces:
SilverpeasTemplate

public class SilverpeasStringTemplate
extends Object
implements SilverpeasTemplate


Field Summary
 Map<String,Object> attributes
           
 Properties templateConfig
           
 
Fields inherited from interface com.silverpeas.util.template.SilverpeasTemplate
TEMPLATE_CUSTOM_DIR, TEMPLATE_ROOT_DIR
 
Constructor Summary
SilverpeasStringTemplate(Properties templateConfig)
           
 
Method Summary
protected  String applyAttributes(org.antlr.stringtemplate.StringTemplate template)
           
 String applyFileTemplate(String fileName)
           
 String applyFileTemplateOnComponent(String componentName, String fileName)
           
 String applyStringTemplate(String label)
           
 Map<String,Object> getAttributes()
           
 boolean isCustomTemplateExists(String componentName, String fileName)
           
 void setAttribute(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

public Map<String,Object> attributes

templateConfig

public Properties templateConfig
Constructor Detail

SilverpeasStringTemplate

public SilverpeasStringTemplate(Properties templateConfig)
Method Detail

applyFileTemplate

public String applyFileTemplate(String fileName)
Specified by:
applyFileTemplate in interface SilverpeasTemplate

applyStringTemplate

public String applyStringTemplate(String label)
Specified by:
applyStringTemplate in interface SilverpeasTemplate

applyAttributes

protected String applyAttributes(org.antlr.stringtemplate.StringTemplate template)

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface SilverpeasTemplate

getAttributes

public Map<String,Object> getAttributes()
Specified by:
getAttributes in interface SilverpeasTemplate

applyFileTemplateOnComponent

public String applyFileTemplateOnComponent(String componentName,
                                           String fileName)
Specified by:
applyFileTemplateOnComponent in interface SilverpeasTemplate

isCustomTemplateExists

public boolean isCustomTemplateExists(String componentName,
                                      String fileName)
Specified by:
isCustomTemplateExists in interface SilverpeasTemplate


Copyright © 2016 Silverpeas. All Rights Reserved.