fr.obeo.acceleo.gen.template.scripts.imports.services
Class PropertiesServices


public class PropertiesServices
extends java.lang.Object

System services for the properties files.


Constructor Summary
PropertiesServices(fr.obeo.acceleo.gen.template.scripts.SpecificScript script)
          Constructor.
 
Method Summary
 fr.obeo.acceleo.gen.template.eval.ENode getBestProperty(fr.obeo.acceleo.gen.template.eval.ENode current, java.lang.String key)
          Gets the best value for the key in all the property files.
 fr.obeo.acceleo.gen.template.eval.ENode getProperty(fr.obeo.acceleo.gen.template.eval.ENode current, java.lang.String key)
          Gets the value for the key in all the property files.
 fr.obeo.acceleo.gen.template.eval.ENode getProperty(fr.obeo.acceleo.gen.template.eval.ENode current, java.lang.String name, java.lang.String key)
          Gets the property for the key and the property file (without extension).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesServices

public PropertiesServices(fr.obeo.acceleo.gen.template.scripts.SpecificScript script)
Constructor.

Parameters:
script - is the script
Method Detail

getBestProperty

public fr.obeo.acceleo.gen.template.eval.ENode getBestProperty(fr.obeo.acceleo.gen.template.eval.ENode current,
                                                               java.lang.String key)
                                                        throws org.eclipse.core.runtime.CoreException,
                                                               java.io.IOException
Gets the best value for the key in all the property files.

Sample : key == "aa.bb.cc.dd"

It returns getProperty("aa.bb.cc.dd") || getProperty("aa.bb.cc") || getProperty("aa.bb") || getProperty("aa").

Parameters:
current - is the current node
key - is the key
Returns:
the value for the given key
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException

getProperty

public fr.obeo.acceleo.gen.template.eval.ENode getProperty(fr.obeo.acceleo.gen.template.eval.ENode current,
                                                           java.lang.String key)
                                                    throws org.eclipse.core.runtime.CoreException,
                                                           java.io.IOException
Gets the value for the key in all the property files.

Parameters:
current - is the current node
key - is the key
Returns:
the value for the given key
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException

getProperty

public fr.obeo.acceleo.gen.template.eval.ENode getProperty(fr.obeo.acceleo.gen.template.eval.ENode current,
                                                           java.lang.String name,
                                                           java.lang.String key)
                                                    throws org.eclipse.core.runtime.CoreException,
                                                           java.io.IOException
Gets the property for the key and the property file (without extension).

Parameters:
current - is the current node
name - is the name of the property file (without ".properties" extension)
key - is the key
Returns:
the value for the given key
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException