public ResourceStd1Data(String projectRef) {
   this.projectRef = projectRef;
   String projNum = Model.getInstance().getProject(projectRef).getProjectNumber();
   prefs = Main.getProjPrefName().node(projNum).node("resources");
   //            try {
   values = setValues(null);
   //            }catch (Exception e){
   //                throw new Exception("Unable to set value for resourceStd1Data
   // "+e.getMessage());
   //            }
 }
Example #2
0
  public static Result anmeldenUnternehmen() {

    // Daten rausholen und in Map reinspeichern
    Map<String, String[]> daten = request().body().asFormUrlEncoded();
    // Daetn rausnehemen von der Map
    String email = daten.get("email")[0];
    String password = daten.get("password")[0];

    boolean ergebnis = model.Model.getInstance().getAnmelden().login(email, password);

    if (ergebnis == true) {
      response().setCookie("data", email);
      session("a", email);
      String user = session("a");
      return ok(afterloginUnternehmen.render(email));

    } else {
      return unauthorized(startseite.render("Falsches Passwort oder Email"));
    }
  }
Example #3
0
 /**
  * initializes uniqueId to 0
  *
  * @pre none
  * @post uniqueId = 0;
  */
 public ContainerManager() {
   assert true;
   uniqueId = 0;
   storageUnits = new TreeSet<StorageUnit>();
   containerDAO = Model.getInstance().getDAOFactory().createContainerDAO();
 }
Example #4
0
 private Model getModel() {
   return Model.getInstance();
 }