Package org.apache.shindig.social.opensocial.model

Examples of org.apache.shindig.social.opensocial.model.Message


        // A message collection has been specified, allow for posting

        HandlerPreconditions.requireEmpty(messageIds, "Message IDs not allowed here, use PUT instead");

        Message message = request.getTypedParameter("entity", Message.class);
        HandlerPreconditions.requireNotEmpty(message.getRecipients(), "No recipients specified");

        return service.createMessage(userIds.iterator().next(), request.getAppId(), msgCollId, message,
                request.getToken());
    }
View Full Code Here


            return service.modifyMessageCollection(user, msgCollection, request.getToken());
        }

        HandlerPreconditions.requireSingular(messageIds, "Only one messageId at a time");

        Message message = request.getTypedParameter("entity", Message.class);
        // TODO, do more validation.

        if (message == null || message.getId() == null) {
            throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST,
                    "cannot parse message or missing ID");
        }

        return service.modifyMessage(user, msgCollId, messageIds.get(0), message, request.getToken());
View Full Code Here

    // A message collection has been specified, allow for posting

    HandlerPreconditions.requireEmpty(messageIds,"Message IDs not allowed here, use PUT instead");

    Message message = request.getTypedParameter("entity", Message.class);
    HandlerPreconditions.requireNotEmpty(message.getRecipients(), "No recipients specified");

    return service.createMessage(userIds.iterator().next(), request.getAppId(), msgCollId, message,
        request.getToken());
  }
View Full Code Here

      return service.modifyMessageCollection(user, msgCollection, request.getToken());
    }

    HandlerPreconditions.requireSingular(messageIds, "Only one messageId at a time");

    Message message = request.getTypedParameter("entity", Message.class);
    // TODO, do more validation.

    if (message == null || message.getId() == null) {
      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST,
        "cannot parse message or missing ID");
    }

    return service.modifyMessage(user, msgCollId, messageIds.get(0), message, request.getToken());
View Full Code Here

    // A message collection has been specified, allow for posting

    HandlerPreconditions.requireEmpty(messageIds,"Message IDs not allowed here, use PUT instead");

    Message message = request.getTypedParameter("entity", Message.class);
    HandlerPreconditions.requireNotEmpty(message.getRecipients(), "No recipients specified");

    return service.createMessage(userIds.iterator().next(), request.getAppId(), msgCollId, message,
        request.getToken());
  }
View Full Code Here

      return service.modifyMessageCollection(user, msgCollection, request.getToken());
    }

    HandlerPreconditions.requireSingular(messageIds, "Only one messageId at a time");

    Message message = request.getTypedParameter("entity", Message.class);
    // TODO, do more validation.

    if (message == null || message.getId() == null) {
      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST,
        "cannot parse message or missing ID");
    }

    return service.modifyMessage(user, msgCollId, messageIds.get(0), message, request.getToken());
View Full Code Here

    // A message collection has been specified, allow for posting

    HandlerPreconditions.requireEmpty(messageIds,"Message IDs not allowed here, use PUT instead");

    Message message = request.getTypedParameter("entity", Message.class);
    HandlerPreconditions.requireNotEmpty(message.getRecipients(), "No recipients specified");

    return service.createMessage(userIds.iterator().next(), request.getAppId(), msgCollId, message,
        request.getToken());
  }
View Full Code Here

      return service.modifyMessageCollection(user, msgCollection, request.getToken());
    }

    HandlerPreconditions.requireSingular(messageIds, "Only one messageId at a time");

    Message message = request.getTypedParameter("entity", Message.class);
    // TODO, do more validation.

    if (message == null || message.getId() == null) {
      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST,
        "cannot parse message or missing ID");
    }

    return service.modifyMessage(user, msgCollId, messageIds.get(0), message, request.getToken());
View Full Code Here

    // A message collection has been specified, allow for posting

    HandlerPreconditions.requireEmpty(messageIds,"Message IDs not allowed here, use PUT instead");

    Message message = request.getTypedParameter("entity", Message.class);
    HandlerPreconditions.requireNotEmpty(message.getRecipients(), "No recipients specified");

    return service.createMessage(userIds.iterator().next(), request.getAppId(), msgCollId, message,
        request.getToken());
  }
View Full Code Here

      return service.modifyMessageCollection(user, msgCollection, request.getToken());
    }

    HandlerPreconditions.requireSingular(messageIds, "Only one messageId at a time");

    Message message = request.getTypedParameter("entity", Message.class);
    // TODO, do more validation.

    if (message == null || message.getId() == null) {
      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST,
        "cannot parse message or missing ID");
    }

    return service.modifyMessage(user, msgCollId, messageIds.get(0), message, request.getToken());
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.opensocial.model.Message

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.