Exemplo n.º 1
0
 /*
  * (non-Javadoc)
  * @see org.encuestame.core.service.SetupOperations#validateInstall()
  */
 public void validateInstall() {
     log.debug("validateInstall ------------");
     final XMLConfigurationFileSupport config = EnMePlaceHolderConfigurer.getConfigurationManager();
     log.debug("validateInstall ------------"+config.getXmlConfiguration().getBasePath());
     config.getXmlConfiguration().addProperty("install.date", DateUtil.getCurrentFormatedDate());
     config.getXmlConfiguration().addProperty("install.uuid", RandomStringUtils.randomAlphanumeric(50));
     log.debug("validateInstall ------------");
 }
Exemplo n.º 2
0
 /**
  * Check status version.
  * @return the status.
  */
 public String checkStatus() {
     //TODO: replace by ENUMs
     log.debug("Check Version Status");
     String status = "install";
     final String currentVersion = EnMePlaceHolderConfigurer.getProperty("app.version");
     log.debug("Current Version : "+ currentVersion);
     final String installedVersion = EnMePlaceHolderConfigurer.getConfigurationManager().getInstalledVersion();
     log.debug("Installed Version : "+installedVersion);
     if (installedVersion != null) {
         float f1 = Float.valueOf(cleanVersion(currentVersion));
         log.debug("Current Version : "+f1);
         float f2 = Float.valueOf(cleanVersion(installedVersion));
         log.debug("Installed Version : "+f2);
         if (f2 < f1) {
             status = "upgrade";
         }
     }
     return status;
 }
Exemplo n.º 3
0
 /**
  *
  * @return
  */
 @Deprecated
 private String getTypeDatabase() {
     final String typeDatabase = EnMePlaceHolderConfigurer
             .getConfigurationManager().getProperty("database.type");
     return typeDatabase;
 }