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 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
Modifier and TypeClassDescriptionstatic enum
Enum for distinguishing between offline and online project. -
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor for serialization.CmsHistoryVersion
(Integer versionNumber, CmsHistoryVersion.OfflineOnline offlineOnline) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsHistoryVersion
fromString
(String s) Converts a string to a CmsHistoryVersion.Gets the version number, or null if no version number was set.boolean
Returns true if this is the offline version.boolean
isOnline()
Returns true if this is the online version.toString()
-
Constructor Details
-
CmsHistoryVersion
protected CmsHistoryVersion()Default constructor for serialization.
-
Method Details
-
fromString
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
Gets the version number, or null if no version number was set.- Returns:
- the version number
-
isOffline
Returns true if this is the offline version.- Returns:
- true if this is the offline version
-
isOnline
Returns true if this is the online version.- Returns:
- true if this is the online version
-
toString
-