Package redstone.xmlrpc

Examples of redstone.xmlrpc.XmlRpcStruct


   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public Boolean editPage(int post_ID, Page page, String publish)
      throws XmlRpcFault {
    XmlRpcStruct post = page.toXmlRpcStruct();
    return this.wp.editPage(0, post_ID, this.username, this.password, post,
        publish);
  }
View Full Code Here


   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public Boolean editPost(int post_ID, Page page, String publish)
      throws XmlRpcFault {
    XmlRpcStruct post = page.toXmlRpcStruct();
    return this.mw.editPost(post_ID, this.username, this.password, post,
        publish);
  }
View Full Code Here

   * @throws XmlRpcFault
   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public Page getPage(int pageid) throws XmlRpcFault {
    XmlRpcStruct r = this.wp.getPage(0, pageid, this.username, this.password);
    Page result = new Page();
    result.fromXmlRpcStruct(r);
    return result;
  }
View Full Code Here

   * @throws XmlRpcFault
   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public Page getPost(int post_ID) throws XmlRpcFault {
    XmlRpcStruct r = this.mw.getPost(post_ID, this.username, this.password);
    Page result = new Page();
    result.fromXmlRpcStruct(r);
    return result;
  }
View Full Code Here

   * @throws XmlRpcFault
   *           Generic exception for xml-rpc operations
   */
  @SuppressWarnings("boxing")
  public User getUserInfo() throws XmlRpcFault {
    XmlRpcStruct r = this.blogger.getUserInfo(0, this.username, this.password);
    User result = new User();
    result.fromXmlRpcStruct(r);
    return result;
  }
View Full Code Here

   *           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

    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

   * @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

   */
  @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

   * @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

TOP

Related Classes of redstone.xmlrpc.XmlRpcStruct

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.