org.wildfly.extras.creaper.commands.foundation.offline.xml
Class GroovyXmlTransform
java.lang.Object
org.wildfly.extras.creaper.commands.foundation.offline.xml.GroovyXmlTransform
- All Implemented Interfaces:
- Command, OfflineCommand
public final class GroovyXmlTransform
- extends Object
- implements OfflineCommand
An offline command that runs a XML transformation on the configuration file which the offline management client
is connected to. The transformation is defined by a Groovy script loaded from classpath.
| Fields inherited from interface org.wildfly.extras.creaper.core.offline.OfflineCommand |
NOOP |
of
public static GroovyXmlTransform.Builder of(Class clazz)
- A convenience shortcut for a case when the script is stored alongside the
clazz on the classpath,
has the same name and the .groovy extension.
- Parameters:
clazz - the class that will be used for loading the script and also for discovering its name- See Also:
of(Class, String)
of
public static GroovyXmlTransform.Builder of(Class resourceLoader,
String path)
- Creates a
GroovyXmlTransform from a script loaded from classpath at path. The resource
will be loaded by the resourceLoader class (Class.getResourceAsStream(String)).
- Parameters:
resourceLoader - class that will be used to load the script from classpathpath - path to the script on classpath (absolute or relative to resourceLoader)
apply
public void apply(OfflineCommandContext ctx)
throws CommandFailedException,
IOException
- Specified by:
apply in interface OfflineCommand
- Throws:
CommandFailedException
IOException
toString
public String toString()
- Specified by:
toString in interface OfflineCommand- Overrides:
toString in class Object
Copyright © 2020. All rights reserved.