Package org.opencms.db
Class CmsResourceState
- java.lang.Object
-
- org.opencms.db.CmsResourceState
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CmsPublishedResource.CmsPublishedResourceState
public class CmsResourceState extends java.lang.Object implements java.io.Serializable
Enumeration class for the different resource states.- Since:
- 6.5.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CmsResourceState
STATE_CHANGED
Indicates if a resource has been changed in the offline version when compared to the online version.static CmsResourceState
STATE_DELETED
Indicates if a resource has been deleted in the offline version when compared to the online version.static CmsResourceState
STATE_KEEP
Special state value that indicates the current state must be kept on a resource, this value must never be written to the database.static CmsResourceState
STATE_NEW
Indicates if a resource is new in the offline version when compared to the online version.static CmsResourceState
STATE_UNCHANGED
Indicates if a resource is unchanged in the offline version when compared to the online version.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsResourceState()
Deprecated.Don't use this constructor! It is only used to transfer the resource state via RPC call.protected
CmsResourceState(int state, char abbrev)
protected constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
char
getAbbreviation()
Returns resource state abbreviation.int
getState()
Returns the resource state integer for this resource state object.int
hashCode()
boolean
isChanged()
Returns if this isCmsResource.STATE_CHANGED
.boolean
isDeleted()
Returns if this isCmsResource.STATE_DELETED
.boolean
isKeep()
Returns if this isCmsResource.STATE_KEEP
.boolean
isNew()
Returns if this isCmsResource.STATE_NEW
.boolean
isUnchanged()
Returns if this isCmsResource.STATE_UNCHANGED
.java.lang.String
toString()
static CmsResourceState
valueOf(int state)
Returns the resource state object from the resource state integer.
-
-
-
Field Detail
-
STATE_CHANGED
public static final CmsResourceState STATE_CHANGED
Indicates if a resource has been changed in the offline version when compared to the online version.
-
STATE_DELETED
public static final CmsResourceState STATE_DELETED
Indicates if a resource has been deleted in the offline version when compared to the online version.
-
STATE_KEEP
public static final CmsResourceState STATE_KEEP
Special state value that indicates the current state must be kept on a resource, this value must never be written to the database.
-
STATE_NEW
public static final CmsResourceState STATE_NEW
Indicates if a resource is new in the offline version when compared to the online version.
-
STATE_UNCHANGED
public static final CmsResourceState STATE_UNCHANGED
Indicates if a resource is unchanged in the offline version when compared to the online version.
-
-
Constructor Detail
-
CmsResourceState
@Deprecated protected CmsResourceState()
Deprecated.Don't use this constructor! It is only used to transfer the resource state via RPC call.Default constructor for serialization.
-
CmsResourceState
protected CmsResourceState(int state, char abbrev)
protected constructor.- Parameters:
state
- an integer representing the stateabbrev
- an abbreviation character
-
-
Method Detail
-
valueOf
public static CmsResourceState valueOf(int state)
Returns the resource state object from the resource state integer.- Parameters:
state
- the resource state integer- Returns:
- the resource state object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getAbbreviation
public char getAbbreviation()
Returns resource state abbreviation.- Returns:
- resource state abbreviation
-
getState
public int getState()
Returns the resource state integer for this resource state object.- Returns:
- the resource state integer for this resource state object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
isChanged
public boolean isChanged()
Returns if this isCmsResource.STATE_CHANGED
.- Returns:
- if this is
CmsResource.STATE_CHANGED
-
isDeleted
public boolean isDeleted()
Returns if this isCmsResource.STATE_DELETED
.- Returns:
- if this is
CmsResource.STATE_DELETED
-
isKeep
public boolean isKeep()
Returns if this isCmsResource.STATE_KEEP
.- Returns:
- if this is
CmsResource.STATE_KEEP
-
isNew
public boolean isNew()
Returns if this isCmsResource.STATE_NEW
.- Returns:
- if this is
CmsResource.STATE_NEW
-
isUnchanged
public boolean isUnchanged()
Returns if this isCmsResource.STATE_UNCHANGED
.- Returns:
- if this is
CmsResource.STATE_UNCHANGED
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-