org.opencms.db
Class CmsResourceState

java.lang.Object
  extended by 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
Version:
$Revision: 1.7 $
Author:
Michael Moossen
See Also:
Serialized Form

Field Summary
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
protected CmsResourceState(int state, char abbrev)
          protected constructor.
 
Method Summary
 char getAbbreviation()
          Returns resource state abbreviation.
 int getState()
          Returns the resource state integer for this resource state object.
 boolean isChanged()
          Returns if this is CmsResource.STATE_CHANGED.
 boolean isDeleted()
          Returns if this is CmsResource.STATE_DELETED.
 boolean isKeep()
          Returns if this is CmsResource.STATE_KEEP.
 boolean isNew()
          Returns if this is CmsResource.STATE_NEW.
 boolean isUnchanged()
          Returns if this is CmsResource.STATE_UNCHANGED.
 java.lang.String toString()
           
static CmsResourceState valueOf(int state)
          Returns the resource state object from the resource state integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

protected CmsResourceState(int state,
                           char abbrev)
protected constructor.

Parameters:
state - an integer representing the state
abbrev - 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

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

isChanged

public boolean isChanged()
Returns if this is CmsResource.STATE_CHANGED.

Returns:
if this is CmsResource.STATE_CHANGED

isDeleted

public boolean isDeleted()
Returns if this is CmsResource.STATE_DELETED.

Returns:
if this is CmsResource.STATE_DELETED

isKeep

public boolean isKeep()
Returns if this is CmsResource.STATE_KEEP.

Returns:
if this is CmsResource.STATE_KEEP

isNew

public boolean isNew()
Returns if this is CmsResource.STATE_NEW.

Returns:
if this is CmsResource.STATE_NEW

isUnchanged

public boolean isUnchanged()
Returns if this is CmsResource.STATE_UNCHANGED.

Returns:
if this is CmsResource.STATE_UNCHANGED

toString

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