Package com.sissi.protocol.iq.data

Examples of com.sissi.protocol.iq.data.XInput


  private final XInput empty = new XInput(null, Dictionary.FIELD_MAXUSERS, RoomInfo.OCCUPANTS.toString().toString(), "0");

  @Override
  public Field<?> read(Map<String, Object> element) {
    Object count = element.get(Dictionary.FIELD_MAXUSERS);
    return count == null ? this.empty : new XInput(null, Dictionary.FIELD_MAXUSERS, MucDomain.ROOMINFO_OCCUPANTS.toString(), count.toString());
  }
View Full Code Here


    this.subject = subject;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Message message = new Message().noneThread().subject(this.subject).setFrom(protocol.parent().getTo()).cast(Message.class).data(this.register.register(protocol.cast(Register.class).findField(XData.NAME, XData.class), new XData().setType(XDataType.FORM)).add(new XInput(XFieldType.HIDDEN.toString(), null, RequestConfig.GROUP.toString(), protocol.parent().getTo())).add(new XInput(XFieldType.HIDDEN.toString(), null, RequestConfig.JID.toString(), context.jid().asStringWithBare())));
    for (Relation relation : this.relationContext.myRelations(super.build(protocol.parent().getTo()), ItemRole.MODERATOR.toString())) {
      super.findOne(super.build(relation.jid()), true).write(message);
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of com.sissi.protocol.iq.data.XInput

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.