Package org.appng.cli.commands.platform
Class ExtractData
- java.lang.Object
-
- org.appng.cli.commands.platform.ExtractData
-
- All Implemented Interfaces:
ExecutableCliCommand
public class ExtractData extends Object implements ExecutableCliCommand
Extracts the data from$APPNG_HOME
to$appngData
.
This includes movingWEB-INF/web.xml
to$appngData/WEB-INF/web.xml
WEB-INF/conf
to$appngData/conf
WEB-INF/bin
to$appngData/bin
WEB-INF/logs
to$appngData/logs
/applications
to$appngData/applications
/repository
to$appngData/repository
Additionally, a <Resources> element is being added to
$APPNG_HOME/META-INF/context.xml
, referencing theappngData
directory.Usage: extract-data [options] Options: * -appngData The folder to extract the data to. -copy Copy data instead of moving. Default: false -revert Revert previously extracted data. Default: false
- Author:
- Matthias Müller
-
-
Constructor Summary
Constructors Constructor Description ExtractData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyBatchFileToBin(File binFolder, String appngData, String appngHome, String name)
void
execute(CliEnvironment cle)
Executes the command.protected void
extract(String appngHome, CliEnvironment cle, String applicationDir, String repositoryPath)
protected static void
replaceInFile(File file, String search, String replacement)
protected void
setCacheConfig(CliEnvironment cle)
protected void
writeContextXml(String appngHome)
-
-
-
Method Detail
-
execute
public void execute(CliEnvironment cle) throws BusinessException
Description copied from interface:ExecutableCliCommand
Executes the command.- Specified by:
execute
in interfaceExecutableCliCommand
- Parameters:
cle
- theCliEnvironment
to use- Throws:
BusinessException
- if on error occurs while executing the command
-
extract
protected void extract(String appngHome, CliEnvironment cle, String applicationDir, String repositoryPath) throws BusinessException
- Throws:
BusinessException
-
copyBatchFileToBin
protected void copyBatchFileToBin(File binFolder, String appngData, String appngHome, String name) throws IOException
- Throws:
IOException
-
writeContextXml
protected void writeContextXml(String appngHome) throws IOException, URISyntaxException
- Throws:
IOException
URISyntaxException
-
setCacheConfig
protected void setCacheConfig(CliEnvironment cle)
-
replaceInFile
protected static void replaceInFile(File file, String search, String replacement) throws IOException
- Throws:
IOException
-
-