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
FieldsModifier and TypeFieldDescriptionstatic final CmsResourceStateIndicates if a resource has been changed in the offline version when compared to the online version.static final CmsResourceStateIndicates if a resource has been deleted in the offline version when compared to the online version.static final CmsResourceStateSpecial state value that indicates the current state must be kept on a resource, this value must never be written to the database.static final CmsResourceStateIndicates if a resource is new in the offline version when compared to the online version.static final CmsResourceStateIndicates if a resource is unchanged in the offline version when compared to the online version. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.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
Modifier and TypeMethodDescriptionbooleancharReturns resource state abbreviation.intgetState()Returns the resource state integer for this resource state object.inthashCode()booleanReturns if this isCmsResource.STATE_CHANGED.booleanReturns if this isCmsResource.STATE_DELETED.booleanisKeep()Returns if this isCmsResource.STATE_KEEP.booleanisNew()Returns if this isCmsResource.STATE_NEW.booleanReturns if this isCmsResource.STATE_UNCHANGED.toString()static CmsResourceStatevalueOf(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
-