com.atlassian.confluence.pages
Class BlogPost

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.confluence.core.ConfluenceEntityObject
          extended by com.atlassian.confluence.core.AbstractVersionedEntityObject
              extended by com.atlassian.confluence.core.ContentEntityObject
                  extended by com.atlassian.confluence.core.SpaceContentEntityObject
                      extended by com.atlassian.confluence.pages.AbstractPage
                          extended by com.atlassian.confluence.pages.BlogPost
All Implemented Interfaces:
com.atlassian.bonnie.Searchable, Addressable, ContentTypeAware, HasLinkWikiMarkup, Versioned, Labelable, Spaced, Serializable, Cloneable, Comparable

public class BlogPost
extends AbstractPage

See Also:
Serialized Form

Field Summary
static String CONTENT_TYPE
           
static String POSTING_DAY_FORMAT
           
 
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
CREATED, CURRENT, DELETED, MODIFIED
 
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
 
Constructor Summary
BlogPost()
           
 
Method Summary
 String getAttachmentsUrlPath()
           
static Calendar getCalendarFromDatePath(String datePath)
          BEFORE USING THIS - consider if BlogPostReference better suits your needs.
 String getDatePath()
           
 String getLinkPart()
           
 String getLinkWikiMarkup()
           
 Calendar getPostingCalendarDate()
           
 Date getPostingDate()
          Alias for EntityObject.getCreationDate()
 String getPostingDayOfMonth()
           
 String getPostingMonth()
           
 String getPostingMonth(DateFormatter formatter)
           
 String getPostingMonthNumeric()
           
 String getPostingYear()
           
static String getTitleFromDatePath(String datePath)
          BEFORE USING THIS - consider if BlogPostReference better suits your needs.
 String 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.
static Calendar toCalendar(Date date)
           
static String toDatePath(Date date)
           
 
Methods inherited from class com.atlassian.confluence.pages.AbstractPage
convertToHistoricalVersion, getContentEntityObject, getLatestVersion, getOriginalVersionPage, getPreviousVersion, getSearchableDependants, getTopLevelComments, getUrlPath, hasInvalidTitleCharacters, isValidPageTitle, isValidPageTitleCharacter, isValidTitleLength, remove, setOriginalVersionPage, setTitle
 
Methods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject
addTrackbackLink, getNameForComparison, getSpace, getSpaceKey, hashCode, isIndexable, isInSpace, setSpace
 
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addComment, addLabelling, addOutgoingLink, addPermission, addReferralLink, clone, compareTo, equals, getAttachmentNamed, getAttachments, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, getContentPermission, getContentPermissionSet, getContentStatus, getDefaultBodyType, getDisplayTitle, getExcerpt, getGlobalLabels, getIdAsString, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getPersonalLabels, getReferralLinks, getRenderedVersionComment, getTeamLabels, getTitle, getTrackbackLinks, getTypeEnum, getUserAccessor, getVersionComment, getVisibleLabels, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isFavourite, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeLabelling, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, toString, trash
 
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, setVersion
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreatorName, getLastModifierName, getRealClass, isPersistent, setCreatorName, 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.bonnie.Searchable
getId
 
Methods inherited from interface com.atlassian.confluence.core.Addressable
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
Constructor Detail

BlogPost

public BlogPost()
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 interface ContentTypeAware
Specified by:
getType in class ContentEntityObject
Returns:
the content type

toCalendar

public static Calendar toCalendar(Date date)

getCalendarFromDatePath

public static Calendar getCalendarFromDatePath(String datePath)
BEFORE USING THIS - consider if BlogPostReference 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 if BlogPostReference 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()

toDatePath

public static String toDatePath(Date date)

getAttachmentsUrlPath

public String getAttachmentsUrlPath()
Overrides:
getAttachmentsUrlPath in class AbstractPage

getLinkWikiMarkup

public String getLinkWikiMarkup()
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 for EntityObject.getCreationDate()

Returns:
the posting date

getPostingCalendarDate

public Calendar getPostingCalendarDate()


Copyright © 2003-2011 Atlassian. All Rights Reserved.