Package com.projity.company

Examples of com.projity.company.DefaultUser


  }

  public boolean doLogin(GraphicManager graphicManager) {
    if (Environment.getStandAlone()){
//      graphicManager.getFrame().setVisible(true);
      Environment.setUser(new DefaultUser());
      return true;
    }
    credentials.put("serverUrl",serverUrl);
    getCredentials();
    Environment.setNewLook(true);

    int badLoginCount = 0;
    while (true) { // until a good login or exit because of too many bad
//      graphicManager.getFrame().setVisible(true);
      if (login==null||password==null || badLoginCount > 0){
        URL loginUrl=null;
        if (login==null||password==null){
          try {
            loginUrl=new URL(serverUrl+"/login");
          } catch (MalformedURLException e) {}
        }
        LoginForm form = LoginDialog.doLogin(graphicManager.getFrame(),loginUrl); // it's actually a singleton
        if (form.isCancelled())
          System.exit(-1);
        if (form.isUseMenus())
          Environment.setNewLook(false);

        login=form.getLogin();
        password=form.getPassword();
      }

      if ("_SA".equals(login)||Environment.getStandAlone()) {// for testing purposes!
        Environment.setStandAlone(true);
        Environment.setUser(new DefaultUser());
        break;
      } else {
        credentials.put("login",login);
        credentials.put("password",password);
View Full Code Here


  }

  public boolean doLogin(GraphicManager graphicManager) {
    if (Environment.getStandAlone()){
//      graphicManager.getFrame().setVisible(true);
      Environment.setUser(new DefaultUser());
      return true;
    }
    credentials.put("serverUrl",serverUrl);
    getCredentials();
    Environment.setNewLook(true);

    int badLoginCount = 0;
    while (true) { // until a good login or exit because of too many bad
//      graphicManager.getFrame().setVisible(true);
      if (login==null||password==null || badLoginCount > 0){
        URL loginUrl=null;
        if (login==null||password==null){
          try {
            loginUrl=new URL(serverUrl+"/login");
          } catch (MalformedURLException e) {}
        }
        LoginForm form = LoginDialog.doLogin(graphicManager.getFrame(),loginUrl); // it's actually a singleton
        if (form.isCancelled())
          System.exit(-1);
        if (form.isUseMenus())
          Environment.setNewLook(false);

        login=form.getLogin();
        password=form.getPassword();
      }

      if ("_SA".equals(login)||Environment.getStandAlone()) {// for testing purposes!
        Environment.setStandAlone(true);
        Environment.setUser(new DefaultUser());
        break;
      } else {
        credentials.put("login",login);
        credentials.put("password",password);
View Full Code Here

TOP

Related Classes of com.projity.company.DefaultUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.