org.opencms.db
Class CmsResourceState

java.lang.Object
  extended by org.opencms.db.CmsResourceState
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CmsPublishedResource.CmsPublishedResourceState

public class CmsResourceState
extends Object
implements Serializable

Enumeration class for the different resource states.

Since:
6.5.3
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()
          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
 boolean equals(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 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.
 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, finalize, getClass, 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

@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 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

equals

public boolean equals(Object obj)
Overrides:
equals in class 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 class Object
See Also:
Object.hashCode()

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 String toString()
Overrides:
toString in class Object
See Also:
Object.toString()