*
*/
public void run() {
try {
PluginProperties props = blog.getPluginProperties();
XmlRpcClient xmlrpc = new XmlRpcClient(props.getProperty(getPropertyPrefix() + XMLRPC_URL_KEY));
Vector<Object> params = new Vector<Object>();
params.add(props.getProperty(getPropertyPrefix() + BLOG_KEY));
params.add(props.getProperty(getPropertyPrefix() + USERNAME_KEY));
params.add(props.getProperty(getPropertyPrefix() + PASSWORD_KEY));
int numberOfBlogEntries = 10;
try {
numberOfBlogEntries = Integer.parseInt(props.getProperty(getPropertyPrefix() + BLOG_ENTRIES_KEY));
} catch (NumberFormatException nfe) {
// do nothing, the value has already been defaulted
}
params.add(numberOfBlogEntries);
// get the remote blog entries
Vector<Hashtable> remoteBlogEntries = (Vector<Hashtable>)xmlrpc.execute("pebble.getRecentBlogEntries", params);
// loop through them and add them to the local blog
for (Hashtable remoteBlogEntry : remoteBlogEntries) {
String id = (String)remoteBlogEntry.get(PebbleAPIHandler.ID);
String title = (String)remoteBlogEntry.get(PebbleAPIHandler.TITLE);