public void systemDatabaseBackup(String dumpPath) throws MyAlumniBaseException { // spring.properties properties file. Properties prop = new Properties(); String dbUser = new String(); String dbPswd = new String(); String dbIpAddress = new String(); String dbName = new String(); String dbPort = new String(); String dbDialet = new String(); String dbPath = new String(); InputStream is = null; try { is = getClass().getResourceAsStream("/spring.properties"); prop.load(is); dbUser = prop.getProperty("username"); dbPswd = prop.getProperty("password"); dbIpAddress = prop.getProperty("dbip"); dbName = prop.getProperty("dbname"); dbPort = prop.getProperty("dbport"); dbDialet = prop.getProperty("hibernate.dialect"); dbPath = prop.getProperty("dbpath"); if (!(new File(dbPath).exists())) { throw new MyAlumniBaseException("myalumni.errorcode.00005"); } if (dbDialet != null && dbDialet.endsWith(DBHelper.DIALET_MYSQL)) { dbDialet = DBHelper.DB_TYPE_MYSQL; } else if (dbDialet != null && dbDialet.endsWith(DBHelper.DIALET_DB2)) { dbDialet = DBHelper.DB_TYPE_DB2; } else if (dbDialet != null && dbDialet.endsWith(DBHelper.DIALET_ORACLE)) { dbDialet = DBHelper.DB_TYPE_ORACLE; } else if (dbDialet != null && dbDialet.endsWith(DBHelper.DIALET_POSTGRESQL)) { dbDialet = DBHelper.DB_TYPE_POSTGRESQL; } else if (dbDialet != null && dbDialet.endsWith(DBHelper.DIALET_SYBASE)) { dbDialet = DBHelper.DB_TYPE_SYBASE; } } catch (IOException e) { // logger.error(e.getMessage()); throw new MyAlumniBaseException( "myalumni.errorcode.00003"); // Unable to read spring properties file. } finally { try { if (is != null) { is.close(); } } catch (IOException exception) { // ignored } } systemTasksDao.systemDatabaseBackup( dbName, dbDialet, dbUser, dbPswd, dbIpAddress, dbPort, dumpPath, dbPath); }
public EmailExceptionVO getEmailException(String id) { return systemTasksDao.getEmailException(id); }
public void deleteLogEmailException(EmailExceptionVO email) { systemTasksDao.deleteLogEmailException(email); }
public List getAllEmailExceptions() { return systemTasksDao.getAllEmailExceptions(); }
public void logEmailException(EmailExceptionVO email) { systemTasksDao.logEmailException(email); }