public void loadProperty() { try { File file = new File(confFileName); log.debug("file=" + file.getAbsolutePath()); confProperties = new Properties(); confProperties.loadFromXML(new FileInputStream(file)); bonitaApiHost = confProperties.getProperty("bonita.api.host"); bonitaApiUsername = confProperties.getProperty("bonita.api.username"); bonitaApiPassword = confProperties.getProperty("bonita.api.password"); bonitaApiHttpUsername = confProperties.getProperty("bonita.api.http.username"); bonitaApiHttpPassword = confProperties.getProperty("bonita.api.http.password"); bonitaApiPath = confProperties.getProperty("bonita.api.path"); rallyApiHost = confProperties.getProperty("rally.api.host"); rallyApiHttpUsername = confProperties.getProperty("rally.api.http.username"); rallyApiHttpPassword = confProperties.getProperty("rally.api.http.password"); rallyProjectIds = confProperties.getProperty("rally.project.ids"); // bonitaProcessId=properties.getProperty("bonita.process.xp_code.id"); workflowServiceUrl = confProperties.getProperty("service.url"); } catch (Exception e) { log.error("", e); } }
public static boolean deleteXmlDocument(String fileName) { File file = new File(fileName); if (!file.exists()) { return true; } if (!file.canWrite()) { return false; } return file.delete(); }
// When already existing adapted project is created , need to move to new adapted project private boolean deleteCIJobFile(ApplicationInfo appInfo) throws PhrescoException { S_LOGGER.debug("Entering Method ProjectAdministratorImpl.deleteCI()"); try { File ciJobInfo = new File(getCIJobPath(appInfo)); return ciJobInfo.delete(); } catch (ClientHandlerException ex) { S_LOGGER.error( "Entered into catch block of ProjectAdministratorImpl.deleteCI()" + ex.getLocalizedMessage()); throw new PhrescoException(ex); } }