Examples of XAccount


Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

    }
    String title = "";
    if (parent instanceof XApplication) {
      title = "Create new Workbook";
    } else if (parent instanceof XAccount) {
      XAccount acc = (XAccount) parent;
      if (acc.getConnection().getConnectionType() != XConnection.TYPE_WSS) {
        return;
      }
      title = "Create new Workbook Template";
    } else {   
      return;
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

                WPaloServiceProvider.getInstance().getVariables(
                    report, user, new Callback<XVariableDescriptor>(){
                      public void onSuccess(
                          XVariableDescriptor desc) {
                        XWorkbook wb = ws.getWorkbook();
                        XAccount acc = wb.getAccount();
                        XConnection con = acc.getConnection();
                       
                        HashMap <XObject, String> mapping = desc.getVariableMapping();
                       
                        String host = con.getHost();
                        String service = con.getService();
                        if (service.indexOf(":") != -1) {
                          service = service.split(":")[1];
                        }
                       
                        String url = host + ":" + service + "/cc/auto_login.php?user=";
                        url += acc.getLogin() + "&pass=" + acc.getPassword();
                        url += "&app=" + wb.getAppName() + "&wb=" + wb.getName();
                        url += "&ws=" + ws.getName() + "&lang=en_US&w=1024&h=768";
//                        for (XElement xe: report.getElements()) {
//                          for (XObject match: mapping.keySet()) {
//                            if (match instanceof XHierarchy) {
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

    if(name == null || name.equals(""))
      item.setText(constants.notDefined());
    //set icon:
    String type = xObj.getType();
    if(type.equals(XAccount.TYPE)) {
      XAccount xAcc = (XAccount) xObj;
      item.setText(xAcc.getUser().getLogin()+" - "+xAcc.getConnection().getName());
      item.setIconStyle("icon-account");
    }
    return item;
 
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

            allIds.add(accountId);
          }
          ArrayList <TreeNode> toBeRemoved = new ArrayList<TreeNode>();
          for (TreeNode nod: treeStore.getAllItems()) {           
            if (nod.getXObject() != null && nod.getXObject() instanceof XAccount) {
              XAccount acc = (XAccount) nod.getXObject();
              if (acc.getId() != null && allIds.contains(acc.getId())) {
                toBeRemoved.add(nod);
              }
            }                   
          }
          for (TreeNode n: toBeRemoved) {
            TreeNode parent = n.getParent();
            treeStore.remove(parent, n);         
          }
          treeStore.update(root);
        } else if (target != null && target instanceof XConnection) {
          ArrayList <TreeNode> toBeRemoved = new ArrayList<TreeNode>();
          for (TreeNode nod: treeStore.getAllItems()) {           
            if (nod.getXObject() != null && nod.getXObject() instanceof XAccount) {
              XAccount acc = (XAccount) nod.getXObject();
              if (acc.getConnection().getId().equals(((XConnection) target).getId())) {
                toBeRemoved.add(nod);
              }
            }                   
          }
          for (TreeNode n: toBeRemoved) {
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

       
        String confirmMsg = constants.deleteMessageHeader();
        XObject xObj = node.getXObject();
        String type = xObj.getType();
        if (type.equals(XAccount.class.getName())) {
          XAccount acc = (XAccount) xObj;
          XUser usr = acc.getUser();
          String name;
          if (usr != null && usr.getName() != null && !usr.getName().isEmpty()) {
            name = usr.getName();
          } else {
            name = acc.getLogin();
          }         
          confirmMsg = messages.deleteAccount(name + " - " + acc.getConnection().getName());
        }
        else if (type.equals(XConnection.class.getName()))
          confirmMsg = messages.deleteConnection(((XConnection) xObj).getName());
       
        // confirm group deletion:
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

    };
  }

  public final String getTitle(XObject input) {
    if (input instanceof XAccount) {
      XAccount account = (XAccount) input;
      String name = account.getName();
      if (name != null && !name.equals(""))
        return messages.account(name);
    }
    return constants.newAccount();
  }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

    if(input instanceof XAccount) {
      XConnection conn = getConnection();
      XUser user = getUser();
      if(user == null || conn == null)
        return false;     
      XAccount account = (XAccount) input;
      account.setUser(user);
      account.setConnection(conn);     
      account.setLogin(login.getValue());
      account.setPassword(password.getValue());
    }
    return true;
  }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

  public void saveAs(String name, XObject input) {   
  }

  public void set(XObject input) {
    if(input instanceof XAccount) {
      XAccount account = (XAccount) input;     
      this.account = account;
      fillUsers(account.getUser());
      XUser forUser = null;
      if (usersCombo.getValue() != null) {
        forUser = (XUser) usersCombo.getValue().getXObject();
      }
      fillConnections(account.getConnection(), forUser);
     
      login.setValue(account.getLogin());
      password.setValue(account.getPassword())
     
    }
  }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

  private final void doAdd(int eventType) {
    Object input = null;
    IEditor editor = null;
    switch(eventType) {
    case ADD_ACCOUNT_ITEM:
      input = new TreeNode(null, new XAccount());
      editor = accountEditor;
      break;
    case ADD_CONNECTION_ITEM:
      input = new TreeNode(null, new XConnection());
      editor = connectionEditor;
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.account.XAccount

      if(o == null || !(o instanceof XTemplate)) {
            return false;
      }
      XTemplate t = (XTemplate) o;
        String id = t.getId();
        XAccount acc = t.account;
        boolean ret = getId() != null ? getId().equals(id) : id == null &&
             account != null ? account.getId().equals(acc.getId()) : t.account == null;
        return ret;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.