Package com.atlassian.confluence.pages
Class BlogPost
java.lang.Object
com.atlassian.core.bean.EntityObject
- All Implemented Interfaces:
Searchable
,Content
,Addressable
,ContentTypeAware
,HasLinkWikiMarkup
,Versioned
,RelatableEntity
,EditableLabelable
,Labelable
,ContentConvertible
,Spaced
,Serializable
,Cloneable
,Comparable<ContentEntityObject>
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
Name of the form field used to store the posting date of the blog poststatic final String
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DELETED_BY, DELETED_BY_ANON_VALUE, DRAFT, DUMMY_SYNC_REV, LIMITED_MODE_SYNC_REV_SOURCE, MODIFIED, SHARE_ID, SYNC_REV, SYNC_REV_SOURCE, SYNCHRONY_ACK_SYNC_REV_SOURCE, SYNCHRONY_RECOVERY, SYNCHRONY_RECOVERY_WITH_EXTERNAL_CHANGE, SYNCHRONY_SYNC_REV_SOURCE
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Calendar
getCalendarFromDatePath
(String datePath) BEFORE USING THIS - consider ifBlogPostReference
better suits your needs.Returns theContentId
for this Blog post.Alias forEntityObject.getCreationDate()
getPostingMonth
(DateFormatter formatter) Formats month name of the posting date according to given formatter.static String
getTitleFromDatePath
(String datePath) BEFORE USING THIS - consider ifBlogPostReference
better suits your needs.getType()
An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.boolean
static Calendar
toCalendar
(Date date) static String
toDatePath
(Date date) Methods inherited from class com.atlassian.confluence.pages.AbstractPage
convertToHistoricalVersion, generateTitleSlug, generateTitleSlug, getAttachmentsUrlPath, getAttachmentUrlPath, getConfluenceRevision, getEditUrlPath, getIdBasedPageUrl, getLatestVersion, getOriginalVersionPage, getPageLevelComments, getPreviousVersion, getSearchableDependants, getTopLevelComments, getUrlPath, getUrlPath, isValidPageTitle, isValidSpaceKey, isValidTitleLength, remove, setContentPropertiesFromDraft, setOriginalVersionPage, setTitle
Methods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject
getNameForComparison, getSpace, getSpaceKey, hashCode, isIndexable, isInSpace, setSpace
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, applyChildVersioningPolicy, clone, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentManager, getAttachmentNamed, getAttachments, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getCollaborativeEditingUuid, getComments, getContainerContent, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getCustomContent, getDefaultBodyType, getDisplayTitle, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getRenderedVersionComment, getSelector, getShareId, getSynchronyRevision, getSynchronyRevisionSource, getTitle, getTrashDate, getTypeEnum, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isDraft, isUnpublished, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setCollaborativeEditingUuid, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setShareId, setSynchronyRevision, setSynchronyRevisionSource, setVersionComment, sharedAccessAllowed, sharedAccessAllowed, toPageContext, toString, trash, trash, trashDependents, wasCreatedBy
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellings
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getVersion, getVersionChildPolicy, isLatestVersion, isNew, setVersion
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
Methods inherited from class com.atlassian.core.bean.EntityObject
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.core.Addressable
getId
Methods inherited from interface com.atlassian.confluence.pages.ContentConvertible
getSelector
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistent
Methods inherited from interface com.atlassian.bonnie.Searchable
getId
-
Field Details
-
CONTENT_TYPE
- See Also:
-
POSTING_DAY_FORMAT
- See Also:
-
POSTING_DATE
Name of the form field used to store the posting date of the blog post- See Also:
-
-
Constructor Details
-
BlogPost
public BlogPost()
-
-
Method Details
-
getType
Description copied from class:ContentEntityObject
An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.This is a bit of a hack, but it saves heaps of code elsewhere, especially since we tend to get back these objects wrapped in all sorts of Hibernate CGLIB stuff.
- Specified by:
getType
in interfaceContentTypeAware
- Specified by:
getType
in classContentEntityObject
- Returns:
- the content type
-
toCalendar
-
getCalendarFromDatePath
BEFORE USING THIS - consider ifBlogPostReference
better suits your needs.- Parameters:
datePath
- - should resemble /2005/11/12/aBlogTitle- Returns:
- Calendar representing the date of the blog, useful for a call to pageManager.getBlogPost(spaceKey, title, calendarDay)
-
getTitleFromDatePath
BEFORE USING THIS - consider ifBlogPostReference
better suits your needs.- Parameters:
datePath
- - should resemble /2010/11/12/aBlogTitle- Returns:
- the title of the blog, if supplied with correct input, otherwise a null
-
getLinkPart
-
getDatePath
-
toDatePath
-
getLinkWikiMarkup
- Specified by:
getLinkWikiMarkup
in interfaceHasLinkWikiMarkup
- Returns:
- the wiki markup used to link to this content
-
getPostingYear
- Returns:
- A string representing the year of posting date. E.g.: 2017. Note: The string is formatted according to the system locale and timezone.
-
getPostingMonth
- Returns:
- The standalone form of a full month name. E.g.: January. Note: The string is formatted according to the system locale and timezone.
-
getPostingMonth
Formats month name of the posting date according to given formatter.- Parameters:
formatter
- The date formatter to use when formatting month name. Ifnull
, then default formatter will be used.- Returns:
- Formatted name of the month of the posting date.
-
getPostingMonthNumeric
- Returns:
- A string representing the number of the month of posting date. E.g.: January will be formatted as '01'. Note: The string is formatted according to the system locale and timezone.
-
getPostingDayOfMonth
- Returns:
- A string representing the day of the month of posting date. E.g.: 8th of January will be formatted as '08'. Note: The string is formatted according to the system locale and timezone.
-
getPostingDate
Alias forEntityObject.getCreationDate()
- Returns:
- the posting date
-
getPostingCalendarDate
-
getContentTypeObject
- Specified by:
getContentTypeObject
in interfaceContentConvertible
- Returns:
- the api ContentType that this ContentConvertible converts to
-
getContentId
Returns theContentId
for this Blog post.- Specified by:
getContentId
in interfaceContentConvertible
- Overrides:
getContentId
in classContentEntityObject
- Returns:
- the ContentId representation of this Blog post's id
-
shouldConvertToContent
public boolean shouldConvertToContent()- Specified by:
shouldConvertToContent
in interfaceContentConvertible
- Returns:
- true if the implementer wants to be part of the core API (default value), false otherwise
-