Package net.solosky.maplefetion.bean

Examples of net.solosky.maplefetion.bean.Cord


    String cordIds = null;
    if(cordList!=null && cordList.size()>0) {
        StringBuffer buffer = new StringBuffer();
        Iterator<Cord> it = cordList.iterator();
        while(it.hasNext()) {
          Cord cord = it.next();
          buffer.append(Integer.toString(cord.getId()));
          buffer.append(";");
        }
        cordIds = buffer.toString()///这里应该是这样的 1;2;3;3; 多了一个分号
        cordIds = cordIds.substring(0, cordIds.length()-1);
    }else {
View Full Code Here


        Iterator<Cord> it = store.getCordList().iterator();
        int id=0;
        this.buddymap.clear();
        //分组显示好友
        while(it.hasNext()) {
          Cord cord = it.next();
          id = cord(cord.getId(),cord.getTitle(),id, store.getBuddyListByCord(cord));
        }
        id = cord(-1,"默认分组", id, store.getBuddyListWithoutCord());
      }
View Full Code Here

            } catch (NumberFormatException e) {
              println("分组编号不是数字,请检查后重新输入。");
              return;
            }
        if(cid!=-1) {
          Cord cord = this.client.getFetionStore().getCord(cid);
          if(cord==null) {
            println("分组编号不存在,请检查后重新输入。");
            return;
          }else {
            cordList.add(cord);
View Full Code Here

       * @param cordid
       * @param title
       */
      public void cordtitle(String cordId, String title)
      {
        Cord cord = this.getCord(cordId);
        if(cord!=null) {
          this.client.setCordTitle(cord, title, new ActionEventListener() {
                    public void fireEevent(ActionEvent event)
             {
               if(event.getEventType()==ActionEventType.SUCCESS){
View Full Code Here

       * 删除分组
       * @param cordid
       */
      public void delcord(String cordId)
      {
        Cord cord = this.getCord(cordId);
        if(cord!=null) {
          Collection<Buddy> list = this.client.getFetionStore().getBuddyListByCord(cord);
          if(list!=null && list.size()>0) {
            println("分组编号 "+cordId+" 中好友不为空,请移除该组的好友后再尝试删除。");
            return;
View Full Code Here

            cid = Integer.parseInt(cordId);
        } catch (NumberFormatException e) {
          println("分组编号不是数字,请检查后重新输入。");
          return null;
        }
    Cord cord = this.client.getFetionStore().getCord(cid);
    if(cord==null) {
      println("分组编号不存在,请检查后重新输入。");
      return null;
    }else {
      return cord;
View Full Code Here

    @Override
    public synchronized Cord getCord(int cordId)
    {
     Iterator<Cord> it = this.cordList.iterator();
     while(it.hasNext()) {
       Cord cord = it.next();
       if(cord.getId()==cordId)
         return cord;
     }
     return null;
    }
View Full Code Here

      throws FetionException
  {
    Element root = XMLHelper.build(response.getBody().toSendString());
    Element node = XMLHelper.find(root, "/results/contacts/buddy-lists/buddy-list");
    if(node!=null) {
      Cord cord = this.context.getFetionStore().getCord(Integer.parseInt(node.getAttributeValue("id")));
      if(cord!=null)
        this.context.getFetionStore().deleteCord(cord);
    }
   
    node = XMLHelper.find(root, "/results/contacts");
View Full Code Here

      //解析分组列表
      List list = XMLHelper.findAll(root, "/results/user-info/contact-list/buddy-lists/*buddy-list");
      Iterator it = list.iterator();
      while(it.hasNext()) {
        Element e = (Element) it.next();
        store.addCord(new Cord(Integer.parseInt(e.getAttributeValue("id")), e.getAttributeValue("name")));
      }
     
      //解析好友列表
      list = XMLHelper.findAll(root, "/results/user-info/contact-list/buddies/*b");
      it = list.iterator();
View Full Code Here

      throws FetionException
  {
    Element root = XMLHelper.build(response.getBody().toSendString());
    Element node = XMLHelper.find(root, "/results/contacts/buddy-lists/buddy-list");
    if(node!=null) {
      Cord c = new Cord(Integer.parseInt(node.getAttributeValue("id")), node.getAttributeValue("name"));
      this.context.getFetionStore().addCord(c);
    }
   
    node = XMLHelper.find(root, "/results/contacts");
    if(node!=null) {
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.bean.Cord

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.