|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.scape_project.xa.tw.gen.Substitutor
eu.scape_project.xa.tw.gen.PropertiesSubstitutor
public class PropertiesSubstitutor
PropertiesSubstitutor
Field Summary |
---|
Fields inherited from class eu.scape_project.xa.tw.gen.Substitutor |
---|
ve |
Constructor Summary | |
---|---|
PropertiesSubstitutor()
Default constructor |
|
PropertiesSubstitutor(String propertiesAbsPath)
Reads the properties from the project configuration properties file and creates the substitution variable map. |
Method Summary | |
---|---|
void |
addVariable(String key,
String val)
Adds a key value pair to the subsitutor |
void |
deriveVariables()
Derives some variables from the service definition |
String |
getContextProp(String string)
Note that the velocity context variables are underscore (_) separated, e.g. |
String |
getGenerateDir()
Getter for the generated directory |
String |
getGlobalProjectPrefix()
Getter for the global project prefix |
String |
getProjectDirectory()
Getter for the project midfix (e.g. |
String |
getProjectMidfix()
Getter for the project midfix (e.g. |
String |
getProjectPackagePath()
Getter for the project midfix (e.g. |
String |
getProjectResourcesDir()
Getter for the resources directory |
String |
getProp(String string)
Note that the properties are dot separated like defined in the properties file (e.g. |
PropertyUtil |
getPropertyUtils()
Getter for the property utils |
ServiceDef |
getServiceDef()
|
String |
getTemplateDir()
Getter for the template directory |
void |
processFile(File path)
|
void |
setServiceDef(ServiceDef serviceDef)
|
Methods inherited from class eu.scape_project.xa.tw.gen.Substitutor |
---|
applySubstitution, applySubstitution, getContext, processDirectory, putKeyValuePair, replaceVars |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesSubstitutor()
public PropertiesSubstitutor(String propertiesAbsPath) throws GeneratorException
propertiesAbsPath
- the path to the properties file
GeneratorException
Method Detail |
---|
public void addVariable(String key, String val)
key
- the keyval
- the value associated with the keypublic void deriveVariables() throws GeneratorException
GeneratorException
public void processFile(File path) throws GeneratorException
processFile
in class Substitutor
GeneratorException
public String getGlobalProjectPrefix()
public String getProjectResourcesDir()
public String getTemplateDir()
public String getGenerateDir()
public String getProjectMidfix()
public String getProjectDirectory()
public PropertyUtil getPropertyUtils()
public String getProjectPackagePath()
public String getProp(String string)
string
- Variable
public String getContextProp(String string)
string
- Variable
public ServiceDef getServiceDef()
public void setServiceDef(ServiceDef serviceDef)
serviceDef
- the serviceDef to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |