Class CmsXmlSitemapUrlBean


  • public class CmsXmlSitemapUrlBean
    extends java.lang.Object
    A bean which represents an entry in an XML sitemap for SEO purposes.

    • Constructor Summary

      Constructors 
      Constructor Description
      CmsXmlSitemapUrlBean​(java.lang.String url, long lastModified, java.lang.String changeFrequency, double priority)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getChangeFrequency()
      Gets the change frequency string.
      java.util.Date getDateLastModified()
      Gets the last modification date.
      CmsResource getDetailPageResource()
      Gets the detail page resource in case the link is the link to a detail page, else returns null.
      java.lang.String getFormattedDate()
      Gets the last modification date formatted as W3C datetime.
      java.util.Locale getLocale()
      Returns the locale.
      CmsResource getOriginalResource()
      Gets the original resource belonging to the link.
      double getPriority()
      Gets the priority for the page.
      java.lang.String getSubsite()
      Returns the subsite.
      java.lang.String getUrl()
      Gets the page URL.
      void setDetailPageResource​(CmsResource detailPageResource)
      Sets the detail page resource.
      void setLocale​(java.util.Locale locale)
      Sets the locale.
      void setOriginalResource​(CmsResource resource)
      Sets the original resource.
      void setSubsite​(java.lang.String subsite)
      Sets the subsite.
      java.lang.String toString()  
      void writeChangefreq​(java.lang.StringBuffer buffer)
      Writes the changefreq node to the buffer.
      void writeElement​(java.lang.StringBuffer buffer, java.lang.String tag, java.lang.String content)
      Writes a single XML element with text content to a string buffer.
      void writeLastmod​(java.lang.StringBuffer buffer)
      Writes the lastmod node to the buffer.
      void writePriority​(java.lang.StringBuffer buffer)
      Writes the priority node to the buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CmsXmlSitemapUrlBean

        public CmsXmlSitemapUrlBean​(java.lang.String url,
                                    long lastModified,
                                    java.lang.String changeFrequency,
                                    double priority)
        Creates a new instance.

        Parameters:
        url - the URL
        lastModified - the last modification date
        changeFrequency - the change frequency string
        priority - the priority
    • Method Detail

      • getChangeFrequency

        public java.lang.String getChangeFrequency()
        Gets the change frequency string.

        Returns:
        the change frequency string
      • getDateLastModified

        public java.util.Date getDateLastModified()
        Gets the last modification date.

        Returns:
        the last modification date
      • getDetailPageResource

        public CmsResource getDetailPageResource()
        Gets the detail page resource in case the link is the link to a detail page, else returns null.

        Returns:
        the container page used as the detail page
      • getFormattedDate

        public java.lang.String getFormattedDate()
        Gets the last modification date formatted as W3C datetime.

        Returns:
        the formatted last modification date
      • getLocale

        public java.util.Locale getLocale()
        Returns the locale.

        Returns:
        the locale
      • getOriginalResource

        public CmsResource getOriginalResource()
        Gets the original resource belonging to the link.

        In case this is a link to a detail page, the resource will be the resource displayed on the detail page

        Returns:
        the original resource
      • getPriority

        public double getPriority()
        Gets the priority for the page.

        Returns:
        the priority
      • getSubsite

        public java.lang.String getSubsite()
        Returns the subsite.

        Returns:
        the subsite
      • getUrl

        public java.lang.String getUrl()
        Gets the page URL.

        Returns:
        the page URL
      • setDetailPageResource

        public void setDetailPageResource​(CmsResource detailPageResource)
        Sets the detail page resource.

        Parameters:
        detailPageResource - the detail page resource
      • setLocale

        public void setLocale​(java.util.Locale locale)
        Sets the locale.

        Parameters:
        locale - the locale to set
      • setOriginalResource

        public void setOriginalResource​(CmsResource resource)
        Sets the original resource.

        Parameters:
        resource - the original resource
      • setSubsite

        public void setSubsite​(java.lang.String subsite)
        Sets the subsite.

        Parameters:
        subsite - the subsite to set
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • writeChangefreq

        public void writeChangefreq​(java.lang.StringBuffer buffer)
        Writes the changefreq node to the buffer.

        Parameters:
        buffer - the buffer to write to
      • writeElement

        public void writeElement​(java.lang.StringBuffer buffer,
                                 java.lang.String tag,
                                 java.lang.String content)
        Writes a single XML element with text content to a string buffer.

        Parameters:
        buffer - the string buffer to write to
        tag - the XML tag name
        content - the content of the XML element
      • writeLastmod

        public void writeLastmod​(java.lang.StringBuffer buffer)
        Writes the lastmod node to the buffer.

        Parameters:
        buffer - the buffer to write to
      • writePriority

        public void writePriority​(java.lang.StringBuffer buffer)
        Writes the priority node to the buffer.

        Parameters:
        buffer - the buffer to write to