KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > blogs > api > MovableTypeAPI


1 /*
2  * ____.
3  * __/\ ______| |__/\. _______
4  * __ .____| | \ | +----+ \
5  * _______| /--| | | - \ _ | : - \_________
6  * \\______: :---| : : | : | \________>
7  * |__\---\_____________:______: :____|____:_____\
8  * /_____|
9  *
10  * . . . i n j a h i a w e t r u s t . . .
11  *
12  *
13  *
14  * ----- BEGIN LICENSE BLOCK -----
15  * Version: JCSL 1.0
16  *
17  * The contents of this file are subject to the Jahia Community Source License
18  * 1.0 or later (the "License"); you may not use this file except in
19  * compliance with the License. You may obtain a copy of the License at
20  * http://www.jahia.org/license
21  *
22  * Software distributed under the License is distributed on an "AS IS" basis,
23  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
24  * for the rights, obligations and limitations governing use of the contents
25  * of the file. The Original and Upgraded Code is the Jahia CMS and Portal
26  * Server. The developer of the Original and Upgraded Code is JAHIA Ltd. JAHIA
27  * Ltd. owns the copyrights in the portions it created. All Rights Reserved.
28  *
29  * The Shared Modifications are Jahia View Helper.
30  *
31  * The Developer of the Shared Modifications is Jahia Solution Sàrl.
32  * Portions created by the Initial Developer are Copyright (C) 2002 by the
33  * Initial Developer. All Rights Reserved.
34  *
35  * ----- END LICENSE BLOCK -----
36  */

37
38 package org.jahia.blogs.api;
39
40 import java.util.Vector JavaDoc;
41
42 import org.apache.xmlrpc.XmlRpcException;
43
44 /**
45  * Movable Type adds a couple of other methods (to the MetawebLog API) of its
46  * own for manipulating the categories assigned to your entries.
47  *
48  * @author Xavier Lawrence
49  */

50 public interface MovableTypeAPI extends MetaWeblogAPI {
51     
52     /**
53      * Returns a bandwidth-friendly list of the most recent posts in the system.
54      *
55      * @param blogID Unique identifier of the blog to get the post titles from
56      * @param userName Login for a user who has permission to post to the blog
57      * @param passWord Password for given username
58      * @param numberOfPosts Number of Post titles to Retrieve
59      *
60      * @return A Vector of Hashtables containing dateCreated, userid, postid
61      * and title
62      * @throws XmlRpcException If something goes wrong
63      */

64     public Vector JavaDoc getRecentPostTitles(
65             final String JavaDoc blogID,
66             final String JavaDoc userName,
67             final String JavaDoc passWord,
68             final int numberOfPosts)
69             throws XmlRpcException;
70     
71     /**
72      * Returns a list of all categories defined in the weblog.
73      *
74      * @param blogID Unique identifier of the blog to get the categories from
75      * @param userName Login for a user who has permission to post to the blog
76      * @param passWord Password for given username
77      *
78      * @return A Vector of Hashtables containing categoryId and categoryName
79      * @throws XmlRpcException If something goes wrong
80      */

81     public Vector JavaDoc getCategoryList(
82             final String JavaDoc blogID,
83             final String JavaDoc userName,
84             final String JavaDoc passWord)
85             throws XmlRpcException;
86     
87     /**
88      * Returns a list of all categories to which the post is assigned.
89      *
90      * @param postID Unique identifier of the post to get the categories from
91      * @param userName Login for a user who has permission to post to the blog
92      * @param passWord Password for given username
93      *
94      * @return A Vector of Hashtables containing categoryId, categoryName and
95      * isPrimary
96      * @throws XmlRpcException If something goes wrong
97      */

98     public Vector JavaDoc getPostCategories(
99             final String JavaDoc postID,
100             final String JavaDoc userName,
101             final String JavaDoc passWord)
102             throws XmlRpcException;
103     
104     /**
105      * Sets the categories for a post.
106      *
107      * @param postID Unique identifier of the post to set the categories
108      * @param userName Login for a user who has permission to post to the blog
109      * @param passWord Password for given username
110      * @param categories Vector of hashtables containing categoryId and categoryName
111      *
112      * @return true if the operation was successful
113      * @throws XmlRpcException If something goes wrong
114      */

115     public boolean setPostCategories(
116             final String JavaDoc postID,
117             final String JavaDoc userName,
118             final String JavaDoc passWord,
119             final Vector JavaDoc categories)
120             throws XmlRpcException;
121     
122     /**
123      * Retrieve information about the XML-RPC methods supported by the server.
124      *
125      * @return a Vector of method names supported by the server
126      * @throws XmlRpcException If something goes wrong
127      */

128     public Vector JavaDoc supportedMethods() throws XmlRpcException;
129     
130     /**
131      * Retrieve information about the text formatting plugins supported by
132      * the server.
133      *
134      * @return a Vector of supported Text Filters supported by the server
135      * @throws XmlRpcException If something goes wrong
136      */

137     public Vector JavaDoc supportedTextFilters() throws XmlRpcException;
138     
139     /**
140      * Retrieve the list of TrackBack pings posted to a particular entry.
141      * This could be used to programmatically retrieve the list of pings for a
142      * particular entry, then iterate through each of those pings doing the same,
143      * until one has built up a graph of the web of entries referencing one
144      * another on a particular topic.
145      *
146      * @param postID Unique identifier of the post to get the TrackBakc Pings from
147      *
148      * @return a Vector of Hashtables containing pingTitle (the title of the
149      * entry sent in the ping), pingURL (the URL of the entry),
150      * and pingIP (the IP address of the host that sent the ping).
151      * @throws XmlRpcException If something goes wrong
152      */

153     public Vector JavaDoc getTrackbackPings(
154             final String JavaDoc postID)
155             throws XmlRpcException;
156     
157     /**
158      * Publish (rebuild) all of the static files related to an entry from your
159      * weblog. Equivalent to saving an entry in the system (but without the ping).
160      *
161      * @param blogID Unique identifier of the blog to publish the posts
162      * @param userName Login for a user who has permission to post to the blog
163      * @param passWord Password for given username
164      *
165      * @return true if the operation was successful
166      * @throws XmlRpcException If something goes wrong
167      */

168     public boolean publishPost(
169             final String JavaDoc blogID,
170             final String JavaDoc userName,
171             final String JavaDoc passWord)
172             throws XmlRpcException;
173 }
174
Popular Tags