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 CmsResourceStateSTATE_CHANGEDIndicates if a resource has been changed in the offline version when compared to the online version.static CmsResourceStateSTATE_DELETEDIndicates if a resource has been deleted in the offline version when compared to the online version.static CmsResourceStateSTATE_KEEPSpecial state value that indicates the current state must be kept on a resource, this value must never be written to the database.static CmsResourceStateSTATE_NEWIndicates if a resource is new in the offline version when compared to the online version.static CmsResourceStateSTATE_UNCHANGEDIndicates if a resource is unchanged in the offline version when compared to the online version.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCmsResourceState()Deprecated.Don't use this constructor! It is only used to transfer the resource state via RPC call.protectedCmsResourceState(int state, char abbrev)protected constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)chargetAbbreviation()Returns resource state abbreviation.intgetState()Returns the resource state integer for this resource state object.inthashCode()booleanisChanged()Returns if this isCmsResource.STATE_CHANGED.booleanisDeleted()Returns if this isCmsResource.STATE_DELETED.booleanisKeep()Returns if this isCmsResource.STATE_KEEP.booleanisNew()Returns if this isCmsResource.STATE_NEW.booleanisUnchanged()Returns if this isCmsResource.STATE_UNCHANGED.java.lang.StringtoString()static CmsResourceStatevalueOf(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:
equalsin 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:
hashCodein 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:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-