Examples of allowed()


Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    for (Item item : protocol.cast(XMucAdmin.class).getItem()) {
      // 同Nickname多JID
      for (JID each : this.mapping.mapping(item.actor(context.jid()).group(group))) {
        MucRelation relation = super.ourRelation(each, group).cast(MucRelation.class);
        for (JID to : super.whoSubscribedMe(group)) {
          super.findOne(to, true).write(item.presence().add(this.judger.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(item.hidden(room.allowed(to, RoomConfig.WHOISALLOW, each)).relation(relation.cast(MucRelation.class).role(item.getRole(), true)).actor(context.jid()))).cast(XUser.class)));
        }
      }
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    for (Item item : protocol.cast(XMucAdmin.class).getItem()) {
      // 同Nickname多JID
      for (JID each : this.mapping.mapping(item.actor(context.jid()).group(group))) {
        MucRelation relation = super.ourRelation(each, group).cast(MucRelation.class);
        for (JID to : super.whoSubscribedMe(group)) {
          super.findOne(to, true).write(item.presence().add(this.judger.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(item.hidden(room.allowed(to, RoomConfig.WHOISALLOW, each)).relation(relation.cast(MucRelation.class).role(item.getRole(), true)).actor(context.jid()))).cast(XUser.class)));
        }
      }
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    XMucAdmin admin = protocol.cast(XMucAdmin.class);
    JID group = super.build(admin.clear().parent().getTo());
    Room room = this.room.build(group);
    for (Relation relation : this.relationContext.myRelations(group, admin.role())) {
      // 根据房间配置 可选的JID
      admin.add(new Item(room.allowed(context.jid(), RoomConfig.WHOISALLOW, group.resource(relation.name())), relation.cast(MucRelation.class)));
    }
    context.write(protocol.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
}
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    Room room = this.room.build(group);
    return room.allowed(context.jid(), RoomConfig.AFFILIATIONEXISTS) ? this.writeAndReturn(super.build(protocol.cast(Message.class).getMuc().getInvite().getTo()), group, room) : true;
  }

  private boolean writeAndReturn(JID jid, JID group, Room room) {
    this.affiliation.build(group).update(jid, room.pull(Dictionary.FIELD_AFFILIATION, String.class));
    return true;
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class).noneRole();
    Room room = this.room.build(group);
    Presence presence = new Presence();
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.cast(MucRelation.class).jid());
      super.findOne(to, true).write(presence.clear().add(this.judger.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), relation))).cast(XUser.class)).type(PresenceType.UNAVAILABLE).setFrom(protocol.getTo()));
    }
    return true;
  }
}
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class).noneRole();
    Room room = this.room.build(group);
    Presence presence = new Presence();
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.cast(MucRelation.class).jid());
      super.findOne(to, true).write(presence.clear().add(this.judger.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), relation))).cast(XUser.class)).type(PresenceType.UNAVAILABLE).setFrom(protocol.getTo()));
    }
    return true;
  }
}
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    Room room = this.room.build(group);
    // 通知其他房客昵称修改
    Presence presence = new Presence();
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.cast(MucRelation.class).jid());
      super.findOne(to, true).write(presence.clear().add(this.adder.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), nickname, relation))).cast(XUser.class)).type(PresenceType.UNAVAILABLE).setFrom(group.resource(relation.name())));
    }
    return false;
  }
}
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    Room room = this.room.build(group);
    // 通知其他房客昵称修改
    Presence presence = new Presence();
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.cast(MucRelation.class).jid());
      super.findOne(to, true).write(presence.clear().add(this.adder.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), nickname, relation))).cast(XUser.class)).type(PresenceType.UNAVAILABLE).setFrom(group.resource(relation.name())));
    }
    return false;
  }
}
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

   */
  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    Room room = this.room.build(group);
    if (!room.allowed(context.jid(), RoomConfig.CONFIGED)) {
      return true;
    }
    Presence presence = new Presence();
    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class);
    for (Relation each : super.myRelations(group)) {
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.Room.allowed()

    }
    Presence presence = new Presence();
    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class);
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.jid());
      super.findOne(to, true).write(presence.clear().clauses(context.status().clauses()).add(this.judger.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), relation))).cast(XUser.class)).setFrom(protocol.getTo()));
    }
    return true;
  }
}
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.