Examples of Jid


Examples of com.sissi.context.JID

  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    GroupItem item = protocol.cast(Roster.class).first();
    JID to = super.build(item.getJid());
    item.addOnEmpty(this.group).setAsk(this.ask()).setSubscription(this.subscription(context.jid(), to)).setJid(to.asStringWithBare());
    // Roster Set/Remove From必须=null
    super.broadcast(context.jid(), protocol.parent().setFrom((String) null));
    return true;
  }
View Full Code Here

Examples of com.sissi.context.JID

    this.mapping = mapping;
  }

  @Override
  protected VCard get(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.parent().getTo());
    return super.vcardContext.pull(group.resource(this.mapping.mapping(group).jid().asStringWithBare()), protocol.cast(VCard.class));
  }
View Full Code Here

Examples of com.sissi.context.JID

  abstract protected class BlockOutput implements Output {

    @Override
    public boolean output(JIDContext context, Element node) {
      JID applicant = this.applicant(context.jid(), node);
      if (this.isEmpty(context.jid(), applicant) || !BlockOutputBuilder.this.blockSupports.contains(node.getClass())) {
        return true;
      }
      return !BlockOutputBuilder.this.context.isBlock(this.verifier(context.jid(), node), applicant);
    }
View Full Code Here

Examples of com.sissi.context.JID

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    XUser user = this.extracter.extract(protocol.cast(Owner.class).getX(), new XUser()).cast(XUser.class);
    if (user.contain()) {
      JID group = super.build(protocol.parent().getTo());
      Protocol message = new Message().noneThread().muc(user).setType(MessageType.GROUPCHAT).setFrom(group);
      for (JID jid : super.whoSubscribedMe(group)) {
        super.findOne(jid, true).write(message);
      }
    }
View Full Code Here

Examples of com.sissi.context.JID

*/
public class MucOwnerDestoryLeaveProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.parent().getTo());
    Presence presence = new Presence().destory(protocol.cast(Owner.class).getDestory());
    for (JID jid : super.whoSubscribedMe(super.build(protocol.parent().getTo()))) {
      super.findOne(jid, true).write(presence.setFrom(group.resource(super.ourRelation(jid, group).name())));
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.context.JID

    this.mapping = mapping;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    // From = MUC JID
    protocol.setFrom(group.clone().resource(super.ourRelation(context.jid(), group).name()));
    JIDs jids = this.mapping.mapping(group);
    return jids.isEmpty() ? this.writeAndReturn(context, protocol) : this.writeAndReturn(protocol, jids);
  }
View Full Code Here

Examples of com.sissi.context.JID

    this.persistent = persistentElementBox;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    this.persistent.push(protocol.parent().setFrom(group.resource(super.ourRelation(context.jid(), group).name())));
    return true;
  }
View Full Code Here

Examples of com.sissi.context.JID

*/
public class MessageMuc2SubjectProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    protocol.cast(Message.class).noneThread().setFrom(group);
    for (JID jid : super.whoSubscribedMe(group)) {
      super.findOne(jid, true).write(protocol);
    }
    return true;
View Full Code Here

Examples of com.sissi.context.JID

    this.room = room;
  }

  @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;
  }
View Full Code Here

Examples of com.sissi.context.JID

    this.jidBuilder = jidBuilder;
  }

  @Override
  public boolean apply(JID invoker, JID target, Fields fields) {
    JID jid = this.jidBuilder.build(fields.findField(RequestConfig.JID.toString(), XField.class).getValue().toString());
    this.config.collection().update(BasicDBObjectBuilder.start().add(Dictionary.FIELD_JID, target.asStringWithBare()).add(Dictionary.FIELD_INFORMATIONS + "." + Dictionary.FIELD_JID, jid.asStringWithBare()).get(), BasicDBObjectBuilder.start("$pull", BasicDBObjectBuilder.start(Dictionary.FIELD_INFORMATIONS, BasicDBObjectBuilder.start(Dictionary.FIELD_JID, jid.asStringWithBare()).get()).get()).get());
    return false;
  }
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.