|
|||||||||
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,
java.lang.Boolean replace)
Adds the given bookmark to the delicious service. |
void |
addBookmarks(BookmarkGroup group,
java.lang.Boolean replace)
Adds the given group of bookmarks. |
void |
addBookmarks(java.util.List bookmarks,
java.lang.Boolean replace)
Adds the given list of bookmars to the delicious service. |
void |
addBookmarks(java.io.Reader links,
java.lang.Boolean replace)
Adds the links found at the given reader to the delicious service. |
void |
addBookmarks(java.lang.String linksPage,
java.lang.Boolean replace)
Adds the links found at the given path, that can be a local file or net URL. |
void |
addPost(java.lang.String url,
java.lang.String description,
java.lang.String tags,
java.lang.String extended,
java.lang.Boolean replace)
Adds the post with the given information. |
void |
deletePost(java.lang.String url)
Deletes the post at the given url. |
void |
doService(java.lang.String category,
java.lang.String command,
java.util.HashMap formFields)
Invokes the delicous service defined by the supplied url and query. |
void |
fetchAllPosts(java.lang.String tags)
Fetches all posts. |
void |
fetchDates(java.lang.String tags)
Fetches a list of dates with the number of posts at each date. |
void |
fetchPosts(java.lang.String tags,
java.lang.String date,
java.lang.String url)
Fetches a list of posts with the given search criteria. |
void |
fetchRecentPosts(java.lang.String tags,
java.lang.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(java.lang.RuntimeException e)
Returns true if the given exception represents the service unavailable exception. |
void |
renameTag(java.lang.String oldName,
java.lang.String newName)
Renames the given tag. |
void |
setListener(DeliciousListener listener)
Currently sets the one and only listener. |
void |
setUser(java.lang.String userName,
java.lang.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(java.lang.RuntimeException e)
e
-
public DeliciousListener getListener()
public void setListener(DeliciousListener listener)
listener
- public int getCode()
public void addBookmarks(java.io.Reader links, java.lang.Boolean replace) throws java.io.IOException, java.lang.InterruptedException
links
- replace
-
java.io.IOException
java.lang.InterruptedException
public void addBookmarks(BookmarkGroup group, java.lang.Boolean replace) throws java.io.IOException, java.lang.InterruptedException
group
- replace
-
java.io.IOException
java.lang.InterruptedException
public void addBookmarks(java.util.List bookmarks, java.lang.Boolean replace) throws java.io.IOException, java.lang.InterruptedException
bookmarks
- replace
-
java.lang.InterruptedException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.lang.InterruptedException
public void addBookmark(Bookmark bookmark, java.lang.Boolean replace) throws java.io.IOException, java.lang.InterruptedException
bookmark
- replace
- TODO
java.io.IOException
java.lang.InterruptedException
public void addBookmarks(java.lang.String linksPage, java.lang.Boolean replace) throws java.io.IOException, java.lang.InterruptedException
replace
- links
-
java.io.IOException
java.lang.InterruptedException
public void setUser(java.lang.String userName, java.lang.String password)
userName
- password
- public void fetchDates(java.lang.String tags) throws java.io.IOException, java.lang.InterruptedException
tags
-
java.io.IOException
java.lang.InterruptedException
public void fetchPosts(java.lang.String tags, java.lang.String date, java.lang.String url) throws java.io.IOException, java.lang.InterruptedException
tags
-
java.io.IOException
java.lang.InterruptedException
public void fetchRecentPosts(java.lang.String tags, java.lang.String count) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void fetchAllPosts(java.lang.String tags) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void fetchUpdateTime() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void addPost(java.lang.String url, java.lang.String description, java.lang.String tags, java.lang.String extended, java.lang.Boolean replace) throws java.io.IOException, java.lang.InterruptedException
url
- description
- tags
- extended
- replace
-
java.io.IOException
java.lang.InterruptedException
public void deletePost(java.lang.String url) throws java.io.IOException, java.lang.InterruptedException
url
-
java.io.IOException
java.lang.InterruptedException
public void fetchTags() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void renameTag(java.lang.String oldName, java.lang.String newName) throws java.io.IOException, java.lang.InterruptedException
url
-
java.io.IOException
java.lang.InterruptedException
public void doService(java.lang.String category, java.lang.String command, java.util.HashMap formFields) throws java.io.IOException, java.lang.InterruptedException
category
- TODOcommand
- formFields
-
java.io.IOException
java.lang.InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |