Class FileContent
- java.lang.Object
-
- org.ocpsoft.rewrite.config.DefaultConditionBuilder
-
- org.jboss.windup.config.condition.GraphCondition
-
- org.jboss.windup.config.parameters.ParameterizedGraphCondition
-
- org.jboss.windup.rules.files.condition.FileContent
-
- All Implemented Interfaces:
FileContentFileName
,FileContentMatches
,org.ocpsoft.rewrite.config.Condition
,org.ocpsoft.rewrite.config.ConditionBuilder
,org.ocpsoft.rewrite.param.Parameterized
public class FileContent extends ParameterizedGraphCondition implements FileContentMatches, FileContentFileName
Matches on file contents based upon parameterization. Example:FileContent
.matches("Some example {text}").inFilesNamed("{filename}")- Author:
- Jesse Sightler
-
-
Constructor Summary
Constructors Constructor Description FileContent()
FileContent(String contentPattern)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.ocpsoft.rewrite.config.ConditionBuilder
as(String variable)
Optionally specify the variable name to use for the output of this conditionprotected boolean
evaluateAndPopulateValueStores(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, FrameCreationContext frameCreationContext)
protected boolean
evaluateWithValueStore(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, FrameContext frameContext)
static FileContentFrom
from(String from)
Set<String>
getRequiredParameterNames()
protected String
getVarname()
FileContentFileName
inFileNamed(String filenamePattern)
Match filenames against the provided parameterized string.static FileContentMatches
matches(String contentPattern)
Match file contents against the provided parameterized string.void
setParameterStore(org.ocpsoft.rewrite.param.ParameterStore store)
String
toString()
-
Methods inherited from class org.jboss.windup.config.parameters.ParameterizedGraphCondition
evaluate
-
Methods inherited from class org.jboss.windup.config.condition.GraphCondition
evaluate, getInputVariablesName, getOutputVariablesName, setInputVariablesName, setOutputVariablesName, setResults
-
Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, or, orNot
-
-
-
-
Constructor Detail
-
FileContent
public FileContent()
-
FileContent
public FileContent(String contentPattern)
-
-
Method Detail
-
from
public static FileContentFrom from(String from)
-
matches
public static FileContentMatches matches(String contentPattern)
Match file contents against the provided parameterized string.
-
as
public org.ocpsoft.rewrite.config.ConditionBuilder as(String variable)
Optionally specify the variable name to use for the output of this condition- Specified by:
as
in interfaceFileContentFileName
- Specified by:
as
in interfaceFileContentMatches
-
inFileNamed
public FileContentFileName inFileNamed(String filenamePattern)
Match filenames against the provided parameterized string.- Specified by:
inFileNamed
in interfaceFileContentMatches
-
getRequiredParameterNames
public Set<String> getRequiredParameterNames()
- Specified by:
getRequiredParameterNames
in interfaceorg.ocpsoft.rewrite.param.Parameterized
-
setParameterStore
public void setParameterStore(org.ocpsoft.rewrite.param.ParameterStore store)
- Specified by:
setParameterStore
in interfaceorg.ocpsoft.rewrite.param.Parameterized
-
getVarname
protected String getVarname()
- Specified by:
getVarname
in classParameterizedGraphCondition
-
evaluateAndPopulateValueStores
protected boolean evaluateAndPopulateValueStores(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, FrameCreationContext frameCreationContext)
- Specified by:
evaluateAndPopulateValueStores
in classParameterizedGraphCondition
-
evaluateWithValueStore
protected boolean evaluateWithValueStore(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, FrameContext frameContext)
- Specified by:
evaluateWithValueStore
in classParameterizedGraphCondition
-
-