/** * Installs a given AMP file into a given WAR file. * * @see ModuleManagementTool#installModule(String, String, boolean, boolean, boolean) * * @param ampFileLocation the location of the AMP file to be installed * @param warFileLocation the location of the WAR file into which the AMP file is to be installed */ public void installModule(String ampFileLocation, String warFileLocation) { installModule(ampFileLocation, warFileLocation, false, false, true); }
/** * Creates a module details helper object based on a file location. * * @param location file location * @return Returns the module details or null if the location points to nothing * @throws IOException */ public static ModuleDetails createModuleDetailsFromPropertyLocation(String location) throws IOException { return createModuleDetailsFromPropertyLocation(location, null); }
/** * Installs all modules within a folder into the given WAR file. * @throws IOException * * @see #installModule(String, String, boolean, boolean, boolean) */ public void installModules(String directory, String warFileLocation) throws IOException { installModules(directory, warFileLocation, false, false, true); }
public void testPreviewInstall() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); // Initial install of module this.manager.installModule(ampLocation, warLocation, true, false, true); // TODO need to prove that the war file has not been updated in any way }
public void testBasicInstall() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); String ampV2Location = getFileLocation(".amp", "module/test_v2.amp"); installerSharedTests(warLocation, ampLocation, ampV2Location); }
public void testList() throws Exception { String warLocation = getFileLocation(".war", "module/test.war"); this.manager.listModules(warLocation); }
/** * Outputs a message to the console regardless of the verbose setting. * * @param message the message to output * @param indent indicates that the message should be formated with an indent */ private void outputMessage(String message, boolean indent) { outputMessage(message, indent, false, true); }
/** * Returns the location of the modifications file based on the module id * * @return the file location */ public String getFileLocation() { return this.warLocation + getFilePathInWar(); }
/** * Gets the file location * * @param warLocation the war location * @param moduleId the module id * @return the file location */ public static String getModulePropertiesFileLocation(String warLocation, String moduleId) { return warLocation + getModulePropertiesFilePathInWar(moduleId); }
/** * Factory method to create module details from a stream of a properties file * @param is the properties input stream, which will be closed during the call * @return Returns the initialized module details */ public static ModuleDetails createModuleDetailsFromPropertiesStream(InputStream is) throws IOException { return createModuleDetailsFromPropertiesStream(is, null); }
/** * Installs a given AMP file into a given WAR file. * * @see ModuleManagementTool#installModule(String, String, boolean, boolean, boolean) * * @param ampFileLocation the location of the AMP file to be installed * @param warFileLocation the location of the WAR file into which the AMP file is to be installed */ public void installModule(String ampFileLocation, String warFileLocation) { installModule(ampFileLocation, warFileLocation, false, false, true); }
/** * Installs all modules within a folder into the given WAR file. * @throws IOException * * @see #installModule(String, String, boolean, boolean, boolean) */ public void installModules(String directory, String warFileLocation) throws IOException { installModules(directory, warFileLocation, false, false, true); }
/** * Creates a module details helper object based on a file location. * * @param location file location * @return Returns the module details or null if the location points to nothing * @throws IOException */ public static ModuleDetails createModuleDetailsFromPropertyLocation(String location) throws IOException { return createModuleDetailsFromPropertyLocation(location, null); }
/** * Outputs a message the console (in verbose mode). * * @param message the message to output */ private void outputErrorMessage(String message) { outputMessage(message, false, true, false); }
/** * Returns the location of the modifications file based on the module id * * @return the file location */ public String getFileLocation() { return this.warLocation + getFilePathInWar(); }
/** * Gets the file location * * @param warLocation the war location * @param moduleId the module id * @return the file location */ public static String getModulePropertiesFileLocation(String warLocation, String moduleId) { return warLocation + getModulePropertiesFilePathInWar(moduleId); }
/** * Outputs a message the console (in verbose mode). * * @param message the message to output * @param indent indicates that the message should be formated with an indent */ private void outputVerboseMessage(String message, boolean indent) { outputMessage(message, indent, false, false); }
/** * Outputs a message the console (in verbose mode). * * @param message the message to output */ private void outputVerboseMessage(String message) { outputMessage(message, false, false, false); }
/** * Outputs a message the console (in verbose mode). * * @param message the message to output */ private void outputVerboseMessage(String message) { outputMessage(message, false, false, false); }
/** * Outputs a message the console (in verbose mode). * * @param message the message to output */ private void outputErrorMessage(String message) { outputMessage(message, false, true, false); }