Class XSLTTransformation
- java.lang.Object
-
- org.ocpsoft.rewrite.config.DefaultOperationBuilder
-
- org.jboss.windup.config.operation.GraphOperation
-
- org.jboss.windup.config.operation.iteration.AbstractIterationOperation<XmlFileModel>
-
- org.jboss.windup.rules.apps.xml.operation.xslt.XSLTTransformation
-
- All Implemented Interfaces:
XSLTTransformationDescription
,XSLTTransformationEffort
,XSLTTransformationExtension
,XSLTTransformationFileSystem
,XSLTTransformationLocation
,XSLTTransformationOf
,org.ocpsoft.rewrite.config.Operation
,org.ocpsoft.rewrite.config.OperationBuilder
public class XSLTTransformation extends AbstractIterationOperation<XmlFileModel> implements XSLTTransformationDescription, XSLTTransformationExtension, XSLTTransformationLocation, XSLTTransformationFileSystem, XSLTTransformationOf
Graph operation doing the xslt transformation using the .xslt source on the target xml object- Author:
- Matej Briskar
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addXsltParameter(String key, String value)
String
getDescription()
String
getExtension()
String
getTemplate()
Map<String,String>
getXsltParameters()
boolean
isUseSaxon()
Indicates whether this is configured to use saxonstatic XSLTTransformationOf
of(String variable)
Create a new transformation for the given ref.void
perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)
Set the payload to the fileModel of the given instance even though the variable is not directly of it's type.void
perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, XmlFileModel payload)
void
setContextClassLoader(ClassLoader classLoader)
XSLTTransformation
setUseSaxon(boolean useSaxon)
Switch to Saxon, instead of the builtin Java parser (Xalan).static XSLTTransformationLocation
using(String location)
Create a newXSLTTransformation
using the given location of the source XSLT file within the currentThread.getContextClassLoader()
.static XSLTTransformationLocation
using(String location, ClassLoader classLoader)
Create a newXSLTTransformation
using the given location of the source XSLT file within the givenClassLoader
.static XSLTTransformationFileSystem
usingFilesystem(String location)
Create a newXSLTTransformation
using the given location of the source XSLT file path on the file-system.XSLTTransformationLocation
usingTemplate(String template)
Set the location of the XSLT template to be used.XSLTTransformationLocation
usingTemplate(String location, ClassLoader loader)
Set the location of the XSLT template to be used, and theClassLoader
within which the template is contained.XSLTTransformationDescription
withDescription(String description)
Description of theXSLTTransformation
operationXSLTTransformation
withEffort(int effort)
Set the estimated effort associated with thisXSLTTransformation
;XSLTTransformationExtension
withExtension(String extension)
Extension to be appended to the result file.XSLTTransformationEffort
withParameters(Map<String,String> parameters)
Set the parameters associated with thisXSLTTransformation
;-
Methods inherited from class org.jboss.windup.config.operation.iteration.AbstractIterationOperation
camelCase, checkVariableName, getVariableName, hasVariableNameSet, resolvePayload, resolveVariable, setVariableName, toString
-
Methods inherited from class org.jboss.windup.config.operation.GraphOperation
perform
-
-
-
-
Method Detail
-
of
public static XSLTTransformationOf of(String variable)
Create a new transformation for the given ref.
-
using
public static XSLTTransformationLocation using(String location)
Create a newXSLTTransformation
using the given location of the source XSLT file within the currentThread.getContextClassLoader()
.
-
usingFilesystem
public static XSLTTransformationFileSystem usingFilesystem(String location)
Create a newXSLTTransformation
using the given location of the source XSLT file path on the file-system.
-
using
public static XSLTTransformationLocation using(String location, ClassLoader classLoader)
Create a newXSLTTransformation
using the given location of the source XSLT file within the givenClassLoader
.
-
perform
public void perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)
Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the creation of the rule, when the FileModel itself is not being iterated but just a model referencing it.- Overrides:
perform
in classAbstractIterationOperation<XmlFileModel>
-
isUseSaxon
public boolean isUseSaxon()
Indicates whether this is configured to use saxon
-
setUseSaxon
public XSLTTransformation setUseSaxon(boolean useSaxon)
Switch to Saxon, instead of the builtin Java parser (Xalan).
-
withDescription
public XSLTTransformationDescription withDescription(String description)
Description copied from interface:XSLTTransformationLocation
Description of theXSLTTransformation
operation- Specified by:
withDescription
in interfaceXSLTTransformationFileSystem
- Specified by:
withDescription
in interfaceXSLTTransformationLocation
-
usingTemplate
public XSLTTransformationLocation usingTemplate(String template)
Description copied from interface:XSLTTransformationOf
Set the location of the XSLT template to be used.- Specified by:
usingTemplate
in interfaceXSLTTransformationOf
-
usingTemplate
public XSLTTransformationLocation usingTemplate(String location, ClassLoader loader)
Description copied from interface:XSLTTransformationOf
Set the location of the XSLT template to be used, and theClassLoader
within which the template is contained.- Specified by:
usingTemplate
in interfaceXSLTTransformationOf
-
withExtension
public XSLTTransformationExtension withExtension(String extension)
Description copied from interface:XSLTTransformationDescription
Extension to be appended to the result file.- Specified by:
withExtension
in interfaceXSLTTransformationDescription
-
perform
public void perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, XmlFileModel payload)
- Specified by:
perform
in classAbstractIterationOperation<XmlFileModel>
-
withParameters
public XSLTTransformationEffort withParameters(Map<String,String> parameters)
Set the parameters associated with thisXSLTTransformation
;- Specified by:
withParameters
in interfaceXSLTTransformationExtension
-
withEffort
public XSLTTransformation withEffort(int effort)
Set the estimated effort associated with thisXSLTTransformation
;- Specified by:
withEffort
in interfaceXSLTTransformationEffort
-
setContextClassLoader
public void setContextClassLoader(ClassLoader classLoader)
-
getDescription
public String getDescription()
-
getTemplate
public String getTemplate()
-
getExtension
public String getExtension()
-
-