Package org.opencms.db
Class CmsResourceState
java.lang.Object
org.opencms.db.CmsResourceState
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CmsPublishedResource.CmsPublishedResourceState
Enumeration class for the different resource states.
- Since:
- 6.5.3
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CmsResourceState
Indicates if a resource has been changed in the offline version when compared to the online version.static final CmsResourceState
Indicates if a resource has been deleted in the offline version when compared to the online version.static final CmsResourceState
Special state value that indicates the current state must be kept on a resource, this value must never be written to the database.static final CmsResourceState
Indicates if a resource is new in the offline version when compared to the online version.static final CmsResourceState
Indicates if a resource is unchanged in the offline version when compared to the online version. -
Constructor Summary
ModifierConstructorDescriptionprotected
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
Modifier and TypeMethodDescriptionboolean
char
Returns resource state abbreviation.int
getState()
Returns the resource state integer for this resource state object.int
hashCode()
boolean
Returns if this isCmsResource.STATE_CHANGED
.boolean
Returns if this isCmsResource.STATE_DELETED
.boolean
isKeep()
Returns if this isCmsResource.STATE_KEEP
.boolean
isNew()
Returns if this isCmsResource.STATE_NEW
.boolean
Returns if this isCmsResource.STATE_UNCHANGED
.toString()
static CmsResourceState
valueOf
(int state) Returns the resource state object from the resource state integer.
-
Field Details
-
STATE_CHANGED
Indicates if a resource has been changed in the offline version when compared to the online version. -
STATE_DELETED
Indicates if a resource has been deleted in the offline version when compared to the online version. -
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
Indicates if a resource is new in the offline version when compared to the online version. -
STATE_UNCHANGED
Indicates if a resource is unchanged in the offline version when compared to the online version.
-
-
Constructor Details
-
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 constructor.- Parameters:
state
- an integer representing the stateabbrev
- an abbreviation character
-
-
Method Details
-
valueOf
Returns the resource state object from the resource state integer.- Parameters:
state
- the resource state integer- Returns:
- the resource state object
-
equals
-
getAbbreviation
Returns resource state abbreviation.- Returns:
- resource state abbreviation
-
getState
Returns the resource state integer for this resource state object.- Returns:
- the resource state integer for this resource state object
-
hashCode
-
isChanged
Returns if this isCmsResource.STATE_CHANGED
.- Returns:
- if this is
CmsResource.STATE_CHANGED
-
isDeleted
Returns if this isCmsResource.STATE_DELETED
.- Returns:
- if this is
CmsResource.STATE_DELETED
-
isKeep
Returns if this isCmsResource.STATE_KEEP
.- Returns:
- if this is
CmsResource.STATE_KEEP
-
isNew
Returns if this isCmsResource.STATE_NEW
.- Returns:
- if this is
CmsResource.STATE_NEW
-
isUnchanged
Returns if this isCmsResource.STATE_UNCHANGED
.- Returns:
- if this is
CmsResource.STATE_UNCHANGED
-
toString
-