Package org.opencms.gwt.shared
Class CmsHistoryVersion
- java.lang.Object
-
- org.opencms.gwt.shared.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsHistoryVersion.OfflineOnline
Enum for distinguishing between offline and online project.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsHistoryVersion()
Default constructor for serialization.CmsHistoryVersion(java.lang.Integer versionNumber, CmsHistoryVersion.OfflineOnline offlineOnline)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsHistoryVersion
fromString(java.lang.String s)
Converts a string to a CmsHistoryVersion.java.lang.Integer
getVersionNumber()
Gets the version number, or null if no version number was set.boolean
isOffline()
Returns true if this is the offline version.boolean
isOnline()
Returns true if this is the online version.java.lang.String
toString()
-
-
-
Constructor Detail
-
CmsHistoryVersion
public CmsHistoryVersion(java.lang.Integer versionNumber, CmsHistoryVersion.OfflineOnline offlineOnline)
Creates a new instance.- Parameters:
versionNumber
- the version numberofflineOnline
- 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 classjava.lang.Object
- See Also:
Object.toString()
-
-