public interface SocialBookmark
Every OSGi service registered with this interface is available in the social
bookmarks configuration menu. When registering an implementation, the
property social.bookmarks.type must be set to a unique key
identifying the sharing service (e.g., facebook). If two services
share the same value for this property, the one with the highest service
ranking is used.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName(java.util.Locale locale)
Returns the social bookmark's name.
|
java.lang.String |
getPostURL(java.lang.String title,
java.lang.String url)
Returns the URL that users are redirected to when clicking the social
bookmark.
|
void |
render(java.lang.String target,
java.lang.String title,
java.lang.String url,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Renders the social bookmark's content.
|
java.lang.String getName(java.util.Locale locale)
locale - the requested locale of the messagejava.lang.String getPostURL(java.lang.String title,
java.lang.String url)
title - the title of the content being sharedurl - the URL of the content being shared (e.g., the current page)void render(java.lang.String target,
java.lang.String title,
java.lang.String url,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException,
javax.servlet.ServletException
inline display style.
This typically renders a link to the sharing URL with a custom icon or image. However, if the sharing platform provides code to display the bookmark, it can also be rendered from this method.
target - the desired target for the link (e.g., _blank)title - the title of the content being sharedurl - the URL of the content being shared (e.g., the current page)httpServletRequest - the servlet requesthttpServletResponse - the servlet responsejava.io.IOException - if an IO exception occurredjavax.servlet.ServletException - if a servlet exception occurred