Examples of XmlRpcStruct


Examples of redstone.xmlrpc.XmlRpcStruct

   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings({ "unchecked", "nls", "boxing" })
  public int newCategory(String name, String slug, int parentId)
      throws XmlRpcFault {
    XmlRpcStruct h = new XmlRpcStruct();
    h.put("name", name);
    h.put("slug", slug);
    h.put("parent_id", parentId);
    return this.wp.newCategory(0, this.username, this.password, h);
  }
View Full Code Here

Examples of redstone.xmlrpc.XmlRpcStruct

    Attachment att = new Attachment();
    att.setType(mimeType);
    att.setOverwrite(overwrite);
    att.setName(file.getName());
    att.setBits(getBytesFromFile(file));
    XmlRpcStruct d = att.toXmlRpcStruct();
    XmlRpcStruct r = this.mw.newMediaObject(0, this.username, this.password, d);
    MediaObject result = new MediaObject();
    result.fromXmlRpcStruct(r);
    return result;
  }
View Full Code Here

Examples of redstone.xmlrpc.XmlRpcStruct

   * @throws XmlRpcFault
   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public CommentCount getCommentsCount(Integer post_ID) throws XmlRpcFault {
    XmlRpcStruct struct;
    if (post_ID != -1)
      struct = this.wp
          .getCommentCount(0, this.username, this.password, post_ID);
    else
      struct = this.wp.getCommentCount(0, this.username, this.password);
View Full Code Here

Examples of redstone.xmlrpc.XmlRpcStruct

   */
  @SuppressWarnings({ "unchecked", "nls", "boxing" })
  public List<Comment> getComments(String status, Integer post_id,
      Integer number, Integer offset) throws XmlRpcFault {

    XmlRpcStruct filter = new XmlRpcStruct();

    if (status != null) {
      filter.put("status", status);
    }

    if (post_id != null) {
      filter.put("post_id", post_id);
    }

    if (number != null) {
      filter.put("number", number);
    }

    if (offset != null) {
      filter.put("offset", offset);
    }

    XmlRpcArray r = this.wp
        .getComments(0, this.username, this.password, filter);
    return fillFromXmlRpcArray(r, Comment.class);
View Full Code Here

Examples of redstone.xmlrpc.XmlRpcStruct

   * @throws XmlRpcFault
   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public Comment getComment(Integer comment_id) throws XmlRpcFault {
    XmlRpcStruct struct = this.wp.getComment(0, this.username, this.password,
        comment_id);

    Comment comment = new Comment();
    comment.fromXmlRpcStruct(struct);

View Full Code Here

Examples of redstone.xmlrpc.XmlRpcStruct

  @SuppressWarnings({ "unchecked", "nls", "boxing" })
  public Integer newComment(Integer post_id, Integer comment_parent,
      String content, String author, String author_url, String author_email)
      throws XmlRpcFault {

    XmlRpcStruct comment = new XmlRpcStruct();

    if (comment_parent != null) {
      comment.put("comment_parent", comment_parent);
    }

    comment.put("content", content);
    if (author != null)
      comment.put("author", author);
    if (author_url != null)
      comment.put("author_url", author_url);
    if (author_email != null)
      comment.put("author_email", author_email);

    Integer comment_id = this.wp.newComment(0, this.username, this.password,
        post_id, comment);

    return comment_id;
View Full Code Here

Examples of redstone.xmlrpc.XmlRpcStruct

  /**
   * @return the comment status list
   */
  public CommentStatusList getCommentStatusList() {
    XmlRpcStruct csl = this.wp.getCommentStatusList(0, this.username,
        this.password);
    CommentStatusList result = new CommentStatusList();
    result.fromXmlRpcStruct(csl);
    return result;
  }
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.