Examples of resource()


Examples of br.gov.frameworkdemoiselle.security.RequiredPermission.resource()

   *         annotation or the class name itself
   */
  private String getResource(InvocationContext ic) {
    RequiredPermission requiredPermission = ic.getMethod().getAnnotation(RequiredPermission.class);

    if (requiredPermission == null || Strings.isEmpty(requiredPermission.resource())) {
      if (ic.getTarget().getClass().getAnnotation(Name.class) == null) {
        return ic.getTarget().getClass().getSimpleName();
      } else {
        return ic.getTarget().getClass().getAnnotation(Name.class).value();
      }
View Full Code Here

Examples of com.dotcms.repackage.com.sun.jersey.api.client.Client.resource()

                form.field("ENDPOINT_ID", endpoint.getId());
                form.bodyPart(new FileDataBodyPart("bundle", bundle, MediaType.MULTIPART_FORM_DATA_TYPE));


                //Sending bundle to endpoint
                WebResource resource = client.resource(endpoint.toURL()+"/api/bundlePublisher/publish");

                ClientResponse response =
                    resource.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class, form);

View Full Code Here

Examples of com.sissi.context.JID.resource()

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    // 重定向From为MUC JID
    protocol.setFrom(group.resource(super.ourRelation(context.jid(), group).name()));
    for (JID jid : super.whoSubscribedMe(group)) {
      super.findOne(jid, true).write(protocol);
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.context.JID.resource()

  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.parent().getTo());
    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class);
    for (Item item : protocol.cast(XMucAdmin.class).getItem()) {
      // 同Nickname多JID
      for (JID jid : this.mapping.mapping(group.resource(item.getNick()))) {
        if (ItemRole.parse(super.ourRelation(jid, group).cast(MucRelation.class).role()).contains(relation.role())) {
          return this.writeAndReturn(context, protocol);
        }
      }
    }
View Full Code Here

Examples of com.sissi.context.JID.resource()

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.parent().getTo());
    for (Item item : protocol.cast(XMucAdmin.class).getItem()) {
      this.role.build(item.getRole()).change(group.resource(item.getNick()));
    }
    return true;
  }
}
View Full Code Here

Examples of com.sissi.context.JID.resource()

    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.context.JID.resource()

  }

  @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.resource()

  @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.resource()

  }

  @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.resource()

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    String subject = room.build(group).pull(Dictionary.FIELD_SUBJECT, String.class);
    if (subject != null) {
      context.write(new Message().noneThread().subject(new Subject(subject)).setType(MessageType.GROUPCHAT).setFrom(group.resource(super.ourRelation(context.jid(), group).name())));
    }
    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.