Exemplo n.º 1
0
 public StartupKodo() {
   RosterSessionUtils.setMemoryProperty("thickClient", "false");
   if (CONNECTION == WombatConnectionEnum.REMOTE_WOMBAT_KODO) {
     RosterSessionUtils.setMemoryProperty("live", "true");
   } else {
     RosterSessionUtils.setMemoryProperty("live", "false");
   }
   RosterSessionUtils.setMemoryProperty("memory", "false");
   init();
   Err.setVisualDurationMonitor(true);
   dataStoreFactory.addConnection(CONNECTION);
   if (CONNECTION == WombatConnectionEnum.REMOTE_WOMBAT_KODO) {
     PropertiesChecker propertiesChecker =
         new PropertiesChecker(getPropertyFileName(), properties, this.getClass().getName());
     propertiesChecker.chkSecureServicePropertiesSet();
   }
 }
Exemplo n.º 2
0
 public boolean setCredentials() {
   boolean isLive = RosterSessionUtils.getProperty("live").equals("true");
   String username = null;
   String password = null;
   if (!isLive) {
     // If not live then automatically fill the login screen:
     if (JUST_POPULATED) {
       // When have done a fresh call to PopulateForDemo, rather than the data having been
       // populated from PROD, or MakeNewUserDetails having been called on this DB.
       username = "******";
       password = "******";
     } else {
       UserDetailsProviderI userDetails =
           UserDetailsFactory.newUserDetails(UserDetailsFactory.LIVE_TERESA_USER_DETAILS);
       Object details[] = userDetails.get(0);
       username = (String) details[0];
       Assert.notNull(username, "Expect a username for auto login");
       password = (String) details[1];
       Assert.notNull(password, "Expect a password for auto login");
     }
   }
   LoginHelper.Params params =
       LoginHelper.newParams(
           CONNECTION,
           dataStoreFactory,
           "Rosterer Login", // TeresaSpringConstant.CLIENT_CONTEXT_CONFIG_LOCATION,
           username,
           password,
           false);
   LoginHelper loginHelper = new LoginHelper(params);
   boolean ok = loginHelper.login();
   if (ok) {
     RosterSessionUtils.setDataStore(dataStoreFactory.getDataStore());
   }
   return ok;
 }