public interface JournalEntry
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PAR_NAME |
static String |
DEFAULT_TEXT |
static String |
FIELD_INDEX_CATEGORY_DATE |
static String |
FIELD_INDEX_CATEGORY_YEAR |
static String |
FIELD_INDEX_MODIFIED_DATE |
static String |
NODE_COMMENTS |
static String |
NODE_TEXT |
static String |
NODE_TRACKBACKS |
static String |
PROP_AUTHOR |
static String |
PROP_CREATED |
static String |
PROP_ID |
static String |
PROP_LASTMODIFIED |
static String |
PROP_LASTMODIFIEDBY |
static String |
PROP_LASTREPLICATED |
static String |
PROP_LASTREPLICATEDBY |
static String |
PROP_PUBLISHED |
static String |
PROP_TAGS |
static String |
PROP_TEXT |
static String |
PROP_TITLE |
static String |
TYPE_COMMENTS |
static String |
TYPE_PARSYS |
static String |
TYPE_TEXT |
static String |
TYPE_TITLE |
static String |
TYPE_TRACKBACKS |
Modifier and Type | Method and Description |
---|---|
Resource |
addAttachment(String name,
Binary data,
String contentType)
Adds an attachment to the journal Entry.
|
Comment |
addComment(String text,
String author)
Adds a comment to this journal entry sing the specified text.
|
void |
addTrackback(String title,
String excerpt,
String url,
String journalName,
String ip)
Adds a trackback to this journal entry.
|
int |
countComments()
Returns the number of comments (including comments to comments).
|
List<Resource> |
getAttachments()
Returns the paths to the attachments of this journal entry.
|
String |
getAuthor()
Returns the author of this journal entry.
|
Iterator<Comment> |
getComments()
Returns all comments (including comments to comments) to this journal entry in chronological order.
|
Resource |
getContentResource()
Returns the content resource of this journal entry.
|
Date |
getDate()
Returns the date this journal entry has been published on.
|
String |
getEditUrl(SlingHttpServletRequest request)
Returns the URL this journal entry can be edited at, or
null if not available. |
String |
getFeedUrl()
Returns the URL of the feed for this journal entry as absolute URL.
|
String |
getFeedUrl(boolean absolute)
Returns the URL of the feed for this journal entry.
|
String |
getFullUrl()
Returns the full URL of this journal entry, including scheme, server name and port.
|
String |
getId()
Returns the unique ID of this journal entry.
|
Journal |
getJournal()
Returns the journal this journal entry belongs to or
null if no journal can be found. |
Page |
getPage()
Returns the page associated with this journal entry.
|
Resource |
getResource()
Returns the resource associated with this journal entry.
|
Tag[] |
getTags()
Returns the tags associated with this journal entry.
|
String |
getTagsAsHTML()
Returns a comma-separated string of HTML links for the specified tags.
|
String |
getTagsAsHTML(ResourceBundle resourceBundle)
Returns a comma-separated string of HTML links for the specified tags.
|
String |
getTagsAsString()
Returns a comma-separated string of names the specified tags.
|
String |
getText()
Returns the text of this journal entry.
|
Comment |
getTextComment()
Returns the UGC comment comment node that has the entry details.
|
String |
getTitle()
Returns the title of this journal entry.
|
String |
getTrackBackUrl()
Returns the track back URL for this journal entry.
|
String |
getUrl()
Returns the server-local URL of this journal entry, omitting scheme, server name and port number.
|
boolean |
hasAttachments()
Returns
true if this journal entry has one or more attachments. |
boolean |
hasComments()
Returns
true if this journal entry has one or more comments. |
boolean |
hasTag(String path)
Returns
true if this journal entry is filed under the tag at the specified path. |
boolean |
isDraft()
Returns
true if this journal entry is an unpublished draft. |
boolean |
isModified()
Returns whether this journal entry has been modified and needs to be saved.
|
boolean |
isPage()
Returns
true if this journal entry is a page that doesn't show up in the timeline of the journal,
e.g. |
void |
removeAttachment(Resource attachment)
Remove an attachment from the journal Entry.
|
void |
save()
Saves all changes made to this journal entry.
|
void |
setAuthor(String author)
Sets the author of this journal entry.
|
void |
setDate(Date date)
Sets the date this journal entry has been published on.
|
void |
setId(String id)
Sets the unique ID of this journal entry.
|
void |
setTags(Tag[] tags)
Sets the tags associated with this journal entry.
|
void |
setText(String text)
Sets the text of this journal entry.
|
void |
setTitle(String title)
Sets the title of this journal entry.
|
static final String DEFAULT_TEXT
static final String PROP_ID
static final String PROP_TITLE
static final String PROP_TEXT
static final String PROP_TAGS
static final String PROP_AUTHOR
static final String PROP_CREATED
static final String PROP_LASTMODIFIED
static final String PROP_LASTMODIFIEDBY
static final String PROP_PUBLISHED
static final String PROP_LASTREPLICATED
static final String PROP_LASTREPLICATEDBY
static final String NODE_TEXT
static final String NODE_COMMENTS
static final String NODE_TRACKBACKS
static final String TYPE_TITLE
static final String TYPE_TEXT
static final String TYPE_COMMENTS
static final String TYPE_TRACKBACKS
static final String TYPE_PARSYS
static final String FIELD_INDEX_MODIFIED_DATE
static final String FIELD_INDEX_CATEGORY_DATE
static final String FIELD_INDEX_CATEGORY_YEAR
static final String DEFAULT_PAR_NAME
String getId()
void setId(String id)
id
- The IDString getTitle()
void setTitle(String title)
title
- The titleResource getContentResource()
String getText()
void setText(String text)
text
- The textString getAuthor()
void setAuthor(String author)
author
- The authorDate getDate()
void setDate(Date date)
date
- The dateTag[] getTags()
void setTags(Tag[] tags)
TagManager
in order
to retrieve and/or create tags.tags
- The tagsString getTagsAsString()
String getTagsAsHTML()
String getTagsAsHTML(ResourceBundle resourceBundle)
resourceBundle
- ResourceBundle
to use for translationsList<Resource> getAttachments()
Iterator<Comment> getComments()
int countComments()
Comment addComment(String text, String author)
text
- The textauthor
- The author of the comment (optional)void addTrackback(String title, String excerpt, String url, String journalName, String ip)
title
- The titleexcerpt
- The excerpt of the trackbackjournalName
- The author's journalNameurl
- The URL of the author's websiteip
- The ip of the authorJournal getJournal()
null
if no journal can be found.Resource getResource()
Page getPage()
String getUrl()
String getFullUrl()
String getFeedUrl()
getFeedUrl(true)
.String getFeedUrl(boolean absolute)
absolute
- true if the URL should be absolute (http://server.com/journal), false if it should be relative
(/journal)String getTrackBackUrl()
String getEditUrl(SlingHttpServletRequest request)
null
if not available.request
- The requestboolean isPage()
true
if this journal entry is a page that doesn't show up in the timeline of the journal,
e.g. an "About" page.true
if journal entry is a page, false
otherwiseboolean isDraft()
true
if this journal entry is an unpublished draft.true
if journal entry is a draft, false
otherwiseboolean hasTag(String path)
true
if this journal entry is filed under the tag at the specified path.path
- the tag pathtrue
if journal entry has this tag, false
otherwiseboolean hasAttachments()
true
if this journal entry has one or more attachments.true
if journal entry has attachments, false
otherwiseboolean hasComments()
true
if this journal entry has one or more comments.true
if journal entry has comments, false
otherwiseboolean isModified()
true
if journal entry is modified, false
otherwisesave()
void save() throws JournalException
JournalException
- if saving failsComment getTextComment()
Resource addAttachment(String name, Binary data, String contentType)
name
- attachment namedata
- binary data for the attachmentcontentType
- the mime type of the attachmentvoid removeAttachment(Resource attachment)
attachment
- the attachment to remove"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"