Class BlogPost

    • 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)
      • getPostingYear

        public String 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

        public String 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

        public String getPostingMonth​(DateFormatter formatter)
        Formats month name of the posting date according to given formatter.
        Parameters:
        formatter - The date formatter to use when formatting month name. If null, then default formatter will be used.
        Returns:
        Formatted name of the month of the posting date.
      • getPostingMonthNumeric

        public String 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

        public String 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

        public Date getPostingDate()
        Alias for EntityObject.getCreationDate()
        Returns:
        the posting date
      • getPostingCalendarDate

        public Calendar getPostingCalendarDate()
      • shouldConvertToContent

        public boolean shouldConvertToContent()
        Specified by:
        shouldConvertToContent in interface ContentConvertible
        Returns:
        true if the implementer wants to be part of the core API (default value), false otherwise