Class CmsHistoryListUtil


  • public final class CmsHistoryListUtil
    extends java.lang.Object
    Utility methods for the history list.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getDisplayVersion​(java.lang.String version, java.util.Locale locale)
      Returns the version number from a version parameter.
      static java.lang.String getHistoryLink​(CmsObject cms, CmsUUID structureId, java.lang.String version)
      Returns the link to an historical file.
      static int getVersion​(java.lang.String version)
      Returns the version number from a version parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDisplayVersion

        public static java.lang.String getDisplayVersion​(java.lang.String version,
                                                         java.util.Locale locale)
        Returns the version number from a version parameter.

        Parameters:
        version - might be negative for the online version
        locale - if the result is for display purposes, the locale has to be != null
        Returns:
        the display name
      • getHistoryLink

        public static java.lang.String getHistoryLink​(CmsObject cms,
                                                      CmsUUID structureId,
                                                      java.lang.String version)
        Returns the link to an historical file.

        Parameters:
        cms - the cms context
        structureId - the structure id of the file
        version - the version number of the file
        Returns:
        the link to an historical file
      • getVersion

        public static int getVersion​(java.lang.String version)
        Returns the version number from a version parameter.

        Parameters:
        version - might be negative for the online version
        Returns:
        the positive value