Modifier and Type | Field and Description |
---|---|
static String |
ANONYMOUS |
static String |
AUTHOR_MAPPING_PREFIX |
static String |
DEFAULT_RESOURCE_TYPE |
static String |
DEFAULT_TEMPLATE |
static String |
DEFAULT_TITLE |
static String |
FEED_SUFFIX |
static String |
GENERATOR_NAME |
static String |
GENERATOR_URL |
static String |
NODE_ENTRIES |
static String |
PARAM_AUTHOR |
static String |
PARAM_PERIOD |
static String |
PARAM_QUERY |
static String |
PARAM_TAG |
static String |
PARAM_VIEW |
static String |
PROP_BLOG_ARCHIVE |
static String |
PROP_DESCRIPTION |
static String |
PROP_RESOURCE_TYPE |
static String |
PROP_TEMPLATE |
static String |
PROP_TITLE |
static String |
TRACKBACK_SUFFIX |
static String |
URL_SUFFIX |
static String |
VIEW_ARCHIVE |
static String |
VIEW_AUTHOR |
static String |
VIEW_DEFAULT |
static String |
VIEW_EDIT |
static String |
VIEW_NEW |
static String |
VIEW_SEARCH |
static String |
VIEW_TAG |
Modifier and Type | Method and Description |
---|---|
BlogEntry |
addEntry(String title,
String text,
Date date)
Adds a new entry to this blog.
|
BlogEntry |
addPage(String title,
String text)
Adds a new page to this blog.
|
String |
getAddEntryUrl(SlingHttpServletRequest request)
Returns the URL where a new blog entry can be added, or
null if not available. |
BlogArchive |
getArchive(int max,
DateFormat dateFormat)
Returns the archive for this blog.
|
String |
getArchiveAsHTML(int max,
DateFormat dateFormat)
Returns an HTML list created from the archive of this blog.
|
String |
getArchiveAsHTML(int max,
DateFormat dateFormat,
ResourceBundle resourceBundle)
Returns an HTML list created from the archive of this blog.
|
String |
getAuthorAsHTML(String author)
Returns the specified author as an HTML link.
|
String |
getAuthorAsHTML(String author,
ResourceBundle resourceBundle)
Returns the specified author as an HTML link.
|
String[] |
getAuthors()
Returns all authors of this blog.
|
String |
getAuthorsAsHTML()
Returns all authors of this blog as a list of HTML links.
|
String |
getAuthorsAsHTML(ResourceBundle resourceBundle)
Returns all authors of this blog as a list of HTML links.
|
String |
getDescription()
Returns the description of this blog.
|
List<BlogEntry> |
getEntries()
Returns the entries in this blog.
|
List<BlogEntry> |
getEntries(BlogEntryFilter filter)
Returns the entries in this blog using the specified filter.
|
List<BlogEntry> |
getEntries(List<BlogEntryFilter> filters)
Returns the entries in this blog using the specified filters.
|
BlogEntry |
getEntry()
Returns the blog entry if the underlying page is a blog entry page, or
null if it is a main blog
page. |
String |
getFeedUrl()
Returns the URL of the feed for this blog as absolute URL.
|
String |
getFeedUrl(boolean absolute)
Returns the URL of the feed for this blog.
|
String |
getFullUrl()
Returns the full URL of this blog, including scheme, server name and port.
|
BlogEntry |
getNextEntry(BlogEntry refEntry)
Returns the entry after the specified entry or
null if the specified entry is the last one. |
Page |
getPage()
Returns the page associated with this blog.
|
List<BlogEntry> |
getPages()
Returns the pages in this blog.
|
String |
getPagesAsHTML()
Returns the pages in this blog as a list of HTML links.
|
BlogEntry |
getPreviousEntry(BlogEntry refEntry)
Returns the entry before the specified entry or
null if the specified entry is the first one. |
Resource |
getResource()
Returns the resource associated with this blog entry.
|
String |
getTagAsHTML(Tag tag)
Returns the specified tag as an HTML link.
|
String |
getTagAsHTML(Tag tag,
ResourceBundle resourceBundle)
Returns the specified tag as an HTML link.
|
int |
getTagCount(Tag tag)
Returns the number of blog entries filed under the specified tag.
|
Tag[] |
getTags()
Returns all tags entries in this blog are filed under.
|
String |
getTagsAsHTML()
Returns all tags entries in this blog are filed under as a list of HTML links.
|
String |
getTagsAsHTML(ResourceBundle resourceBundle)
Returns all tags entries in this blog are filed under as a list of HTML links.
|
String |
getTitle()
Returns the title of this blog.
|
String |
getUrl()
Returns the server-local URL of this blog, omitting scheme, server name and port number.
|
String |
getViewUrl(String view)
Returns the URL for view of this blog.
|
boolean |
isArchive()
Returns whether the underlying resource is a blog archive, i.e.
|
boolean |
isEmpty()
Returns whether the blog contains any blog entries.
|
boolean |
isEntry()
Returns whether the underlying resource is a blog entry.
|
boolean |
isModified()
Returns whether this blog has been modified and needs to be saved.
|
void |
save()
Saves all changes made to this blog.
|
void |
setDescription(String desc)
Sets the description of this blog.
|
void |
setTitle(String title)
Sets the title of this blog.
|
static final String ANONYMOUS
static final String NODE_ENTRIES
static final String URL_SUFFIX
static final String FEED_SUFFIX
static final String TRACKBACK_SUFFIX
static final String GENERATOR_NAME
static final String GENERATOR_URL
static final String PARAM_VIEW
static final String PARAM_PERIOD
static final String PARAM_QUERY
static final String PARAM_TAG
static final String PARAM_AUTHOR
static final String VIEW_DEFAULT
static final String VIEW_NEW
static final String VIEW_EDIT
static final String VIEW_SEARCH
static final String VIEW_ARCHIVE
static final String VIEW_AUTHOR
static final String VIEW_TAG
static final String PROP_TITLE
static final String PROP_DESCRIPTION
static final String PROP_TEMPLATE
static final String PROP_RESOURCE_TYPE
static final String PROP_BLOG_ARCHIVE
static final String DEFAULT_TEMPLATE
static final String DEFAULT_RESOURCE_TYPE
static final String DEFAULT_TITLE
static final String AUTHOR_MAPPING_PREFIX
List<BlogEntry> getEntries(BlogEntryFilter filter)
filter
- The blog entry filterList<BlogEntry> getEntries(List<BlogEntryFilter> filters)
filters
- The blog entry filtersList<BlogEntry> getPages()
String getPagesAsHTML()
getPages()
BlogEntry addEntry(String title, String text, Date date)
title
- The title of the blog entrytext
- The text of the blog entrydate
- The date of the blog entry (optional)BlogEntry addPage(String title, String text)
title
- The title of the blog entrytext
- The text of the blog entryBlogEntry getPreviousEntry(BlogEntry refEntry)
null
if the specified entry is the first one.refEntry
- The reference entryBlogEntry getNextEntry(BlogEntry refEntry)
null
if the specified entry is the last one.refEntry
- The reference entryTag[] getTags()
String getTagAsHTML(Tag tag)
tag
- The tagString getTagAsHTML(Tag tag, ResourceBundle resourceBundle)
tag
- The tagresourceBundle
- ResourceBundle
to use for translationsString getTagsAsHTML()
String getTagsAsHTML(ResourceBundle resourceBundle)
resourceBundle
- ResourceBundle
to use for translationsint getTagCount(Tag tag)
tag
- The tagString[] getAuthors()
String getAuthorAsHTML(String author)
author
- The author nameString getAuthorAsHTML(String author, ResourceBundle resourceBundle)
author
- The author nameresourceBundle
- ResourceBundle
to use for translationsString getAuthorsAsHTML()
String getAuthorsAsHTML(ResourceBundle resourceBundle)
resourceBundle
- ResourceBundle
to use for translationsPage getPage()
Resource getResource()
BlogEntry getEntry()
null
if it is a main blog
page.boolean isEntry()
true
if the underlying resource is a blog entry, false
otherwiseboolean isArchive()
true
if the underlying resource is a blog archive, false
otherwiseString getTitle()
void setTitle(String title)
title
- The titleString getDescription()
void setDescription(String desc)
desc
- The descriptionString getUrl()
String getFullUrl()
String getFeedUrl()
String getFeedUrl(boolean absolute)
absolute
- true if the URL should be absolute (http://server.com/blog), false if it should be relative
(/blog)String getViewUrl(String view)
VIEW_DEFAULT
(default)VIEW_EDIT
VIEW_SEARCH
VIEW_ARCHIVE
view
- The viewString getAddEntryUrl(SlingHttpServletRequest request)
null
if not available.request
- The requestboolean isEmpty()
true
if blog is empty, false
otherwiseBlogArchive getArchive(int max, DateFormat dateFormat)
max
- The maximum number of items (optional)dateFormat
- The date format (optional)String getArchiveAsHTML(int max, DateFormat dateFormat)
max
- The maximum number of items (optional)dateFormat
- The date format (optional)String getArchiveAsHTML(int max, DateFormat dateFormat, ResourceBundle resourceBundle)
max
- The maximum number of items (optional)dateFormat
- The date format (optional)resourceBundle
- ResourceBundle
to use for translationsboolean isModified()
true
if blog is modified, false
otherwisesave()
void save() throws BlogException
BlogException
- if saving fails"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"