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>
public class BlogPost extends AbstractPage implements ContentConvertible
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_TYPE
static String
POSTING_DATE
Name of the form field used to store the posting date of the blog poststatic String
POSTING_DAY_FORMAT
-
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, 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
Constructors Constructor Description BlogPost()
-
Method Summary
-
Methods inherited from class com.atlassian.confluence.pages.AbstractPage
convertToHistoricalVersion, getAttachmentsUrlPath, getAttachmentUrlPath, getConfluenceRevision, getEditUrlPath, getLatestVersion, getOriginalVersionPage, getPageLevelComments, getPreviousVersion, getSearchableDependants, getTopLevelComments, getUrlPath, isValidPageTitle, 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, 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 Detail
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
POSTING_DAY_FORMAT
public static final String POSTING_DAY_FORMAT
- See Also:
- Constant Field Values
-
POSTING_DATE
public static final String POSTING_DATE
Name of the form field used to store the posting date of the blog post- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public String 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
-
getCalendarFromDatePath
public static Calendar getCalendarFromDatePath(String datePath)
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
public static String getTitleFromDatePath(String datePath)
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
public String getLinkPart()
-
getDatePath
public String getDatePath()
-
getLinkWikiMarkup
public String getLinkWikiMarkup()
- Specified by:
getLinkWikiMarkup
in interfaceHasLinkWikiMarkup
- Returns:
- the wiki markup used to link to this content
-
getPostingYear
public String getPostingYear()
-
getPostingMonth
public String getPostingMonth()
-
getPostingMonth
public String getPostingMonth(DateFormatter formatter)
-
getPostingMonthNumeric
public String getPostingMonthNumeric()
-
getPostingDayOfMonth
public String getPostingDayOfMonth()
-
getPostingDate
public Date getPostingDate()
Alias forEntityObject.getCreationDate()
- Returns:
- the posting date
-
getPostingCalendarDate
public Calendar getPostingCalendarDate()
-
getContentTypeObject
public ContentType getContentTypeObject()
- Specified by:
getContentTypeObject
in interfaceContentConvertible
- Returns:
- the api ContentType that this ContentConvertible converts to
-
getContentId
public ContentId 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
-
-