Klasse TemplateOutletImpl
java.lang.Object
org.apache.torque.generator.outlet.OutletImpl
org.apache.torque.generator.template.TemplateOutletImpl
- Alle implementierten Schnittstellen:
Outlet
,TemplateOutlet
- Bekannte direkte Unterklassen:
GroovyOutlet
,VelocityOutlet
An implementation of the TemplateOutlet interface.
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotected
TemplateOutletImpl
(QualifiedName name, ConfigurationProvider configurationProvider, String path, String encoding, TemplateFilter templateFilter) Constructs a TemplateOutletImpl with the given name. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetContent
(ControllerState controllerState) Returns the contents as a Template as a String.protected String
getDetokenizedPath
(ControllerState controllerState) getPath()
Returns the path to the template.protected String
load
(InputStream inputStream, String encoding, TemplateFilter filter) Loads the template, possibly filtering the content..toString()
Returns a String representation of this outlet for debugging purposes.Von Klasse geerbte Methoden org.apache.torque.generator.outlet.OutletImpl
addMergepointMapping, afterExecute, beforeExecute, execute, getInputClass, getInputElementName, getMergepointMapping, getMergepointMappings, getName, getVariable, mergepoint, setInputClass, setInputElementName, setMergepointMapping, setVariable, setVariable
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.apache.torque.generator.outlet.Outlet
addMergepointMapping, afterExecute, beforeExecute, execute, getInputClass, getInputElementName, getMergepointMapping, getMergepointMappings, getName, setInputClass, setInputElementName, setMergepointMapping
-
Konstruktordetails
-
TemplateOutletImpl
protected TemplateOutletImpl(QualifiedName name, ConfigurationProvider configurationProvider, String path, String encoding, TemplateFilter templateFilter) throws ConfigurationException Constructs a TemplateOutletImpl with the given name.- Parameter:
name
- the name of this outlet, not null.configurationProvider
- the provider for reading the templates, not null.path
- the path to the templates, not null. May contain tokens of the form ${....}, these are parsed.encoding
- the encoding of the file, or null if the system's default encoding should be used.templateFilter
- a possible filter for preprocessing the template, not null.- Löst aus:
NullPointerException
- if name or inputStream are null.ConfigurationException
- if the template cannot be loaded.
-
-
Methodendetails
-
getContent
Beschreibung aus Schnittstelle kopiert:TemplateOutlet
Returns the contents as a Template as a String.- Angegeben von:
getContent
in SchnittstelleTemplateOutlet
- Parameter:
controllerState
- the state of the controller, not null.- Gibt zurück:
- the template as a String.
- Löst aus:
ConfigurationException
- if the template cannot be read.
-
getDetokenizedPath
-
load
protected String load(InputStream inputStream, String encoding, TemplateFilter filter) throws IOException Loads the template, possibly filtering the content..- Parameter:
inputStream
- the stream to read from.encoding
- the encoding of the template, or null for auto detection.filter
- a filter for modifying the template, or null for no filtering.- Gibt zurück:
- the content of the read and filtered template.
- Löst aus:
IOException
- if an error occurs while reading the template.
-
getPath
Returns the path to the template.- Gibt zurück:
- the path to the template, not null.
-
toString
Returns a String representation of this outlet for debugging purposes.- Setzt außer Kraft:
toString
in KlasseOutletImpl
- Gibt zurück:
- a String representation of this outlet, never null.
- Siehe auch:
-