Class CmsHistoryVersion

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.IsSerializable

    public class CmsHistoryVersion
    extends java.lang.Object
    implements com.google.gwt.user.client.rpc.IsSerializable
    Bean representing a file version for the history dialog.

    Since the history dialog can also display offline resources, or resources read from the Online project without a historical version id, this class is needed rather than a single integer to represent a version.

    • Constructor Detail

      • CmsHistoryVersion

        public CmsHistoryVersion​(java.lang.Integer versionNumber,
                                 CmsHistoryVersion.OfflineOnline offlineOnline)
        Creates a new instance.

        Parameters:
        versionNumber - the version number
        offlineOnline - the offline/online state
      • CmsHistoryVersion

        protected CmsHistoryVersion()
        Default constructor for serialization.

    • Method Detail

      • fromString

        public static CmsHistoryVersion fromString​(java.lang.String s)
        Converts a string to a CmsHistoryVersion.

        This is the inverse of toString().

        Parameters:
        s - the string from which to read the history version
        Returns:
        the history version
      • getVersionNumber

        public java.lang.Integer getVersionNumber()
        Gets the version number, or null if no version number was set.

        Returns:
        the version number
      • isOffline

        public boolean isOffline()
        Returns true if this is the offline version.

        Returns:
        true if this is the offline version
      • isOnline

        public boolean isOnline()
        Returns true if this is the online version.

        Returns:
        true if this is the online version
      • toString

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