|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.util.BlogUtils
public class BlogUtils
Collection of utility methods used across blogs
Includes replaceNonAlphanumeric() from Roller Weblogger server (Apache license).
| Field Summary | |
|---|---|
static String |
VALID_BLOG_NAME_CHARS
|
| Method Summary | |
|---|---|
static String |
format8601Date(Date date)
|
static String |
getAuthorFeedURL(Blog blog,
User author)
Returns a string containing the path to the author feed for a specific blog / author combination. |
static String |
getAuthorPermalink(Blog blog)
Returns a author permalink for a blog which is a combination of the base URL, the blog display name and the word 'authors'. |
static String |
getAuthorPermalink(Blog blog,
User author)
Returns a author permalink for a blog and author which is a combination of the base URL, the blog display name and the word 'authors' and the authors username. |
static String |
getBlogCommentFeedURL()
Returns a string containing the path to a feed which contains recent comments across the entire system. |
static String |
getBlogFeedURL()
Returns a string containing the path to a feed which contains newly created blogs across the entire system. |
static String |
getBlogTrackbackFeedURL()
Returns a string containing the path to a feed which contains recent trackbacks across the entire system. |
static String |
getBlogURL(Blog blog)
Returns the URL for the blog as a fully-qualified path based on jiveHome. |
static String |
getBlogURL(Blog blog,
boolean absolute)
Returns the URL for the blog as either a fully qualified URL or as a relative resource depending on the absolute parameter. |
static String |
getBlogURL(Blog blog,
HttpServletRequest request)
Returns the URL for the blog as a fully-qualified path based on jiveHome. |
static String |
getBlogURL(Blog blog,
String context)
Returns the URL for the blog which is a combination of the base URL and the blog display name. |
static String |
getCommentFeedURL(Blog blog)
Returns a string containing the path to the comments feed for a blog. |
static String |
getCommentFeedURL(BlogPost post)
Returns a string containing the path to the comments feed for a specific post. |
static String |
getCommentPermalink(Comment comment)
Returns a permalink for a blog comment which is a combination of the base URL, the blog display name, the year / month / day, the entry name and a suffix / comment ID. |
static String |
getCommentURL(BlogPost post)
Returns a string containing the path to the script that accepts comment postings which is a combination of the base URL, the blog display name and the post permalink. |
static String |
getCommentURL(BlogPost post,
HttpServletRequest request)
Returns a string containing the path to the script that accepts comment postings which is a combination of the base URL, the blog display name and the post permalink. |
static String |
getFeedURL()
Returns a string containing the path to a feed which contains recent posts across the entire system. |
static String |
getFeedURL(Blog blog)
Returns a string containing the path to the feed which is a combination of the base URL, the blog display name and the default system feed type. |
static String |
getFromEmail()
Get an available email address to use for outbound emails. |
static String |
getFromName()
Get an available from name to use for outbound emails. |
static String |
getHumanFriendlyDate(Date dateToFormat)
Deprecated. Replaced by DateUtils#displayFriendly(long) |
static String |
getNestedContainerContext(Community community)
|
static String |
getNestedContainerContext(Project project)
|
static String |
getPostPermalink(BlogPost post)
Returns a permalink for a blog post which is a combination of the base URL, the blog display name and the post permalink. |
static String |
getRelativePostLink(BlogPost post)
|
static List<String> |
getReservedURIs()
Returns a list of reserved words that cannot be used by blog authors as display names. |
static String[] |
getReservedWords()
|
static String |
getSearchURL(Blog blog)
Returns a string containing the path to the script that accepts search queries for a blog which is a combination of the base URL, the blog display name and the search path. |
static String |
getTagFeedURL(Blog blog,
ContentTag tag)
Returns a string containing the path to the tag feed which is a combination of the base URL, the blog display name, the word 'feed-tags' and the given tag or tags. |
static String |
getTagFeedURL(Blog blog,
List<ContentTag> tags)
Returns a string containing the path to the tag feed which is a combination of the base URL, the blog display name, the word 'feed-tags' and the given tag or tags. |
static String |
getTagFeedURL(Blog blog,
String tags)
Returns a string containing the path to the tag feed which is a combination of the base URL, the blog display name, the word 'feed-tags' and the given tag or tags. |
static String |
getTagFeedURL(ContentTag tag)
Returns a string containing the path to the tag feed for the system and a given tag. |
static String |
getTagFeedURL(List<ContentTag> tags)
Returns a string containing the path to the tag feed for the system and a given list of tags. |
static String |
getTagFeedURLPrefix()
Returns the tag feed URL prefix for the system tag feeds, which the getTagFeedURL(com.jivesoftware.community.ContentTag) methods depend on. |
static String |
getTagFeedURLPrefix(Blog blog)
Returns the tag feed URL prefix for a given blog, which the getTagFeedURL(com.jivesoftware.community.ContentTag) methods depend on. |
static String |
getTagPermalink(Blog blog,
ContentTag tag)
Returns a tag permalink for a blog which is a combination of the base URL, the blog display name, the word 'tags' and the given tag.. |
static String |
getTagPermalink(Blog blog,
List<ContentTag> tags)
Returns a tag permalink for a blog which is a combination of the base URL, the blog display name, the word 'tags' and a list of tags. |
static String |
getTagPermalink(Blog blog,
String tags)
Returns a tag permalink for a blog which is a combination of the base URL, the blog display name, the word 'tags' and the given tag or tags, delimited using a plus (+) sign. |
static String |
getTagPermalink(String tag)
Returns a tag permalink for the system which is a combination of the base URL, the word 'tags' and the tag. |
static String |
getTagsPermalink(Blog blog)
Returns a tag permalink for a blog which is a combination of the base URL, the blog display name and the word 'tags'. |
static String |
getTrackbackFeedURL(Blog blog)
Returns a string containing the path to the trackbacks feed for a blog. |
static String |
getTrackbackFeedURL(BlogPost post)
Returns a string containing the path to the trackbacks feed for a specific post. |
static String |
getTrackbackPermalink(Trackback trackback)
Returns a permalink for a blog trackback which is a combination of the base URL, the blog display name, the year / month / day, the entry name and a suffix / trackback ID. |
static String |
getTrackbackURL(BlogPost post)
Returns a trackback URL for a blog post which is a combination of the base URL, the blog display name and the post permalink. |
static String |
getUserFeedURL(String username)
Returns a string containing the path to the feed which is a combination of the base URL, the username and the default system feed type. |
static String |
getUserFeedURLPrefix()
|
static boolean |
isFeedEnabled(Blog blog)
Simple method to check if feeds are enabled on given blog |
static boolean |
isReservedURI(String displayName)
Used by blog config to make sure a display name provided by a user does not conflict with one of the reserved names in the /blog/ namespace. |
static boolean |
isValidDisplayName(String str)
Method to validate a display name for a blog. |
static boolean |
isValidName(String str)
Method to validate the name for a blog. |
static boolean |
isValidPostSubject(String subject)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VALID_BLOG_NAME_CHARS
| Method Detail |
|---|
public static String getFeedURL()
public static String getBlogFeedURL()
public static String getBlogCommentFeedURL()
public static String getBlogTrackbackFeedURL()
public static String getUserFeedURL(String username)
username - the username of the user to display the feed for
public static String getTagFeedURL(ContentTag tag)
tag - The tag to get the feed url for.
public static String getTagFeedURL(List<ContentTag> tags)
tags - The list of tags to get the feed url for.
public static String getFeedURL(Blog blog)
blog - the blog to display the feed for
public static String getCommentFeedURL(Blog blog)
blog - the blog to display the comments feed for
public static String getCommentFeedURL(BlogPost post)
post - the post to display the feed for
public static String getAuthorFeedURL(Blog blog,
User author)
blog - the blog to display the feed forauthor - the user to display the feed for
public static String getAuthorPermalink(Blog blog)
blog - The blog to get a author permalink for.
public static String getAuthorPermalink(Blog blog,
User author)
blog - The blog to get an author permalink for.author - The user to get an author permalink for
public static String getTrackbackFeedURL(Blog blog)
blog - the blog to display the trackbacks feed for
public static String getTrackbackFeedURL(BlogPost post)
post - the post to display the feed for
public static String getTagFeedURL(Blog blog,
ContentTag tag)
blog - the blog to get the feed fortag - the tag to get the feed for
public static String getTagFeedURL(Blog blog,
List<ContentTag> tags)
blog - The blog to get a feed url for.tags - List of tags under the blog to get a feed url for.
public static String getTagFeedURL(Blog blog,
String tags)
blog - The blog to get a feed url for.tags - List of tags under the blog to get a feed url for.
public static String getTagFeedURLPrefix(Blog blog)
getTagFeedURL(com.jivesoftware.community.ContentTag) methods depend on. Useful for classes
that need to build a tag feed URL without knowing what tags
will be used.
blog - The blog to get the url tag feed url prefix for.
public static String getTagFeedURLPrefix()
getTagFeedURL(com.jivesoftware.community.ContentTag) methods depend on. Useful for classes
that need to build a tag feed URL without knowing what tags
will be used.
public static String getUserFeedURLPrefix()
public static String getBlogURL(Blog blog,
boolean absolute)
blog - absolute -
public static String getBlogURL(Blog blog)
blog - The blog to get a url for.
public static String getBlogURL(Blog blog,
HttpServletRequest request)
blog - The blog to get a url for.request - request is used to figure out whether to user http or https.
public static String getBlogURL(Blog blog,
String context)
blog - The blog to get a url for.context - The context to append to the beginning of the URL.
public static final String getNestedContainerContext(Community community)
public static final String getNestedContainerContext(Project project)
public static String getPostPermalink(BlogPost post)
More information: http://en.wikipedia.org/wiki/Permalink
post - The blog post to get a perma link for.
public static String getRelativePostLink(BlogPost post)
public static String getCommentPermalink(Comment comment)
comment - the comment to get a link for
public static String getTrackbackPermalink(Trackback trackback)
trackback - the trackback to get a link for
public static String getTagsPermalink(Blog blog)
blog - The blog to get a tag permalink for.
public static String getTagPermalink(String tag)
tag - The tag to get a permalink for.
public static String getTagPermalink(Blog blog,
ContentTag tag)
blog - The blog to get a permalink for.tag - The tag under the blog to get a permalink for.
public static String getTagPermalink(Blog blog,
List<ContentTag> tags)
blog - The blog to get a permalink for.tags - The tags under the blog to get a permalink for.
public static String getTagPermalink(Blog blog,
String tags)
blog - The blog to get a permalink for.tags - The tags under the blog to get a permalink for.
public static String getCommentURL(BlogPost post)
post - The blog post to get a comment url for.
public static String getCommentURL(BlogPost post,
HttpServletRequest request)
post - The blog post to get a comment url for.request - Request used to figure out whether to use http or https.
public static String getSearchURL(Blog blog)
blog - The blog to get a search url for.
public static String getTrackbackURL(BlogPost post)
post - The blog post to get a track back url for.
public static boolean isValidDisplayName(String str)
str - the blog display name to check.
getReservedURIs()public static boolean isValidName(String str)
str - the blog name to check.
public static String getFromEmail()
blogs.email.fromEmail.
public static String getFromName()
blogs.email.fromName.
public static boolean isReservedURI(String displayName)
displayName - The display name of the blog.
public static List<String> getReservedURIs()
public static String format8601Date(Date date)
@Deprecated public static String getHumanFriendlyDate(Date dateToFormat)
DateUtils#displayFriendly(long)
Ported from JavaScript library by Nelson Minar.
dateToFormat - The date to format.
public static String[] getReservedWords()
public static boolean isValidPostSubject(String subject)
public static boolean isFeedEnabled(Blog blog)
blog - the blog to check
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||