|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.mojo.delicious.DeliciousService
public class DeliciousService
A high level service access class for Delicious bookmarks.
Constructor Summary | |
---|---|
DeliciousService()
Creates a service that can connect to the REST api. |
|
DeliciousService(DeliciousConnection connection)
Plugin an alternative connection - probably for testing. |
Method Summary | |
---|---|
void |
addBookmark(Bookmark bookmark,
Boolean replace)
Adds the given bookmark to the delicious service. |
void |
addBookmarks(BookmarkGroup group,
Boolean replace)
Adds the given group of bookmarks. |
void |
addBookmarks(List bookmarks,
Boolean replace)
Adds the given list of bookmars to the delicious service. |
void |
addBookmarks(Reader links,
Boolean replace)
Adds the links found at the given reader to the delicious service. |
void |
addBookmarks(String linksPage,
Boolean replace)
Adds the links found at the given path, that can be a local file or net URL. |
void |
addPost(String url,
String description,
String tags,
String extended,
Boolean replace)
Adds the post with the given information. |
void |
deletePost(String url)
Deletes the post at the given url. |
void |
doService(String category,
String command,
HashMap formFields)
Invokes the delicous service defined by the supplied url and query. |
void |
fetchAllPosts(String tags)
Fetches all posts. |
void |
fetchDates(String tags)
Fetches a list of dates with the number of posts at each date. |
void |
fetchPosts(String tags,
String date,
String url)
Fetches a list of posts with the given search criteria. |
void |
fetchRecentPosts(String tags,
String count)
Fetches a list of most recent posts, possibly filtered by tag, maxes out at 100. |
void |
fetchTags()
Fetches the tags used by this account. |
void |
fetchUpdateTime()
Gets the time of the last update. |
int |
getCode()
The code of the most recent server communication. |
DeliciousListener |
getListener()
Gets the currently set listener. |
boolean |
isServiceUnavailableException(RuntimeException e)
Returns true if the given exception represents the service unavailable exception. |
void |
renameTag(String oldName,
String newName)
Renames the given tag. |
void |
setListener(DeliciousListener listener)
Currently sets the one and only listener. |
void |
setUser(String userName,
String password)
Sets the credential to be used for this service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeliciousService(DeliciousConnection connection)
public DeliciousService()
Method Detail |
---|
public boolean isServiceUnavailableException(RuntimeException e)
e
-
public DeliciousListener getListener()
public void setListener(DeliciousListener listener)
listener
- public int getCode()
public void addBookmarks(Reader links, Boolean replace) throws IOException, InterruptedException
links
- replace
-
IOException
InterruptedException
public void addBookmarks(BookmarkGroup group, Boolean replace) throws IOException, InterruptedException
group
- replace
-
IOException
InterruptedException
public void addBookmarks(List bookmarks, Boolean replace) throws IOException, InterruptedException
bookmarks
- replace
-
InterruptedException
IOException
ParserConfigurationException
SAXException
IOException
InterruptedException
public void addBookmark(Bookmark bookmark, Boolean replace) throws IOException, InterruptedException
bookmark
- replace
- TODO
IOException
InterruptedException
public void addBookmarks(String linksPage, Boolean replace) throws IOException, InterruptedException
replace
- links
-
IOException
InterruptedException
public void setUser(String userName, String password)
userName
- password
- public void fetchDates(String tags) throws IOException, InterruptedException
tags
-
IOException
InterruptedException
public void fetchPosts(String tags, String date, String url) throws IOException, InterruptedException
tags
-
IOException
InterruptedException
public void fetchRecentPosts(String tags, String count) throws IOException, InterruptedException
IOException
InterruptedException
public void fetchAllPosts(String tags) throws IOException, InterruptedException
IOException
InterruptedException
public void fetchUpdateTime() throws IOException, InterruptedException
IOException
InterruptedException
public void addPost(String url, String description, String tags, String extended, Boolean replace) throws IOException, InterruptedException
url
- description
- tags
- extended
- replace
-
IOException
InterruptedException
public void deletePost(String url) throws IOException, InterruptedException
url
-
IOException
InterruptedException
public void fetchTags() throws IOException, InterruptedException
IOException
InterruptedException
public void renameTag(String oldName, String newName) throws IOException, InterruptedException
url
-
IOException
InterruptedException
public void doService(String category, String command, HashMap formFields) throws IOException, InterruptedException
category
- TODOcommand
- formFields
-
IOException
InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |