Class FileAppender
- java.lang.Object
-
- org.wildfly.galleon.plugin.config.FileAppender
-
- All Implemented Interfaces:
WildFlyPackageTask
public class FileAppender extends java.lang.Object implements WildFlyPackageTask
Task to append content to the `target` file whefre it matches the matcher pattern. If `allMatches` is set to false only the first match will be used. The lines will be added after the first line of the target file that matches the `match` configuration If you need to append some content to the matching line you can set it using `add-to-matching-line`. The lines to be added can be provided either via a file or via a list of lines. You can `ignore` the fact that the target file doesn't exist.- Author:
- Emmanuel Hugonnet
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wildfly.galleon.plugin.WildFlyPackageTask
WildFlyPackageTask.Phase
-
-
Constructor Summary
Constructors Constructor Description FileAppender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(java.lang.String line)voidexecute(WfInstallPlugin plugin, org.jboss.galleon.runtime.PackageRuntime pkg)java.util.regex.PatterngetMatch()booleanisIgnore()voidsetAddToMatchingLine(java.lang.String addToMatchingLine)voidsetAllMatches(boolean allMatches)voidsetIgnore(boolean ignore)voidsetMatch(java.lang.String match)voidsetSource(java.lang.String src)voidsetTarget(java.lang.String target)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.galleon.plugin.WildFlyPackageTask
getPhase
-
-
-
-
Method Detail
-
setTarget
public void setTarget(java.lang.String target)
-
getMatch
public java.util.regex.Pattern getMatch()
-
setMatch
public void setMatch(java.lang.String match)
-
addLine
public void addLine(java.lang.String line)
-
isIgnore
public boolean isIgnore()
-
setIgnore
public void setIgnore(boolean ignore)
-
setSource
public void setSource(java.lang.String src)
-
setAddToMatchingLine
public void setAddToMatchingLine(java.lang.String addToMatchingLine)
-
setAllMatches
public void setAllMatches(boolean allMatches)
-
execute
public void execute(WfInstallPlugin plugin, org.jboss.galleon.runtime.PackageRuntime pkg) throws org.jboss.galleon.ProvisioningException
- Specified by:
executein interfaceWildFlyPackageTask- Throws:
org.jboss.galleon.ProvisioningException
-
-