/** * Creates a module details instance based on a war location and the module id * * @param warLocation the war location * @param moduleId the module id * @return Returns the module details for the given module ID as it occurs in the WAR, or <tt>null</tt> * if there are no module details available. * @throws IOException */ public static ModuleDetails createModuleDetailsFromWarAndId(String warLocation, String moduleId) throws IOException { String modulePropertiesFileLocation = ModuleDetailsHelper.getModulePropertiesFileLocation(warLocation, moduleId); return ModuleDetailsHelper.createModuleDetailsFromPropertyLocation(modulePropertiesFileLocation); }
/** * 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); }
/** * 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); }
ModuleDetails installingModuleDetails = ModuleDetailsHelper.createModuleDetailsFromPropertyLocation(propertiesLocation, this); if (installingModuleDetails == null) ModuleDetailsHelper.saveModuleDetails(warFileLocation, installingModuleDetails);
/** * 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); }
/** * @param warLocation the location of the WAR file * @param moduleId the module ID within the WAR * @return Returns a file handle to the module properties file within the given WAR. * The file may or may not exist. */ public static TFile getModuleDetailsFileFromWarAndId(String warLocation, String moduleId) { String location = ModuleDetailsHelper.getModulePropertiesFileLocation(warLocation, moduleId); TFile file = new TFile(location); return file; }
ModuleDetails installingModuleDetails = ModuleDetailsHelper.createModuleDetailsFromPropertyLocation(propertiesLocation, this); if (installingModuleDetails == null) ModuleDetailsHelper.saveModuleDetails(warFileLocation, installingModuleDetails);
/** * 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); }
/** * @param warLocation the location of the WAR file * @param moduleId the module ID within the WAR * @return Returns a file handle to the module properties file within the given WAR. * The file may or may not exist. */ public static TFile getModuleDetailsFileFromWarAndId(String warLocation, String moduleId) { String location = ModuleDetailsHelper.getModulePropertiesFileLocation(warLocation, moduleId); TFile file = new TFile(location); return file; }
/** * Creates a module details instance based on a war location and the module id * * @param warLocation the war location * @param moduleId the module id * @return Returns the module details for the given module ID as it occurs in the WAR, or <tt>null</tt> * if there are no module details available. * @throws IOException */ public static ModuleDetails createModuleDetailsFromWarAndId(String warLocation, String moduleId) throws IOException { String modulePropertiesFileLocation = ModuleDetailsHelper.getModulePropertiesFileLocation(warLocation, moduleId); return ModuleDetailsHelper.createModuleDetailsFromPropertyLocation(modulePropertiesFileLocation); }
installingModuleDetails = ModuleDetailsHelper.createModuleDetailsFromPropertyLocation(propertiesLocation);
/** * 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); }
try String modulePropertiesFileLocation = getModulePropertiesFileLocation(warLocation, moduleId); TFile file = new TFile(modulePropertiesFileLocation); if (file.exists() == false)
/** * 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); }
try String modulePropertiesFileLocation = getModulePropertiesFileLocation(warLocation, moduleId); TFile file = new TFile(modulePropertiesFileLocation); if (file.exists() == false)
removeFile(warFileLocation, installedFilesPathInWar, preview); String modulePropertiesFileLocationInWar = ModuleDetailsHelper.getModulePropertiesFilePathInWar(moduleId); removeFile(warFileLocation, modulePropertiesFileLocationInWar, preview);
result = createModuleDetailsFromPropertiesStream(is, log);
removeFile(warFileLocation, installedFilesPathInWar, preview); String modulePropertiesFileLocationInWar = ModuleDetailsHelper.getModulePropertiesFilePathInWar(moduleId); removeFile(warFileLocation, modulePropertiesFileLocationInWar, preview);
moduleDetails.add(ModuleDetailsHelper.createModuleDetailsFromPropertiesStream(is));