Package org.opencms.ade.publish.client
Class CmsPublishItemStatus
java.lang.Object
org.opencms.ade.publish.client.CmsPublishItemStatus
This class encapsulates the possible states of a publish item.
An item can be enabled or disabled (because of an error). If it is enabled, it can change between the states "normal", "publish", and "remove", but if it is disabled, it can only change between "normal" and "remove".
The state will be changed depending on various signals which are passed as parameters to the handleSignal() method.
If the item is enabled, the only possible state transitions are as follows: publish to normal publish to remove normal to publish normal to remove remove to normal
- Since:
- 8.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The enum for the publish item state. -
Constructor Summary
ConstructorDescriptionCmsPublishItemStatus
(org.opencms.util.CmsUUID id, CmsPublishItemStatus.State state, boolean disabled, I_CmsPublishItemStatusUpdateHandler handler) Creates a new publish item status bean. -
Method Summary
Modifier and TypeMethodDescriptiongetState()
Gets the current state of the publish item.void
handleSignal
(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal) Handles a signal which may change the current state.boolean
Checks whether this publish item is disabled.protected void
Executes a publish signal.protected void
Executes a remove signal.protected void
Executes an unpublish signal.protected void
Executes an unremove signal.
-
Constructor Details
-
CmsPublishItemStatus
public CmsPublishItemStatus(org.opencms.util.CmsUUID id, CmsPublishItemStatus.State state, boolean disabled, I_CmsPublishItemStatusUpdateHandler handler) Creates a new publish item status bean.- Parameters:
id
- the publish item idstate
- the publish item statedisabled
- true if this item is disabledhandler
- the handler which should be notified of state changes
-
-
Method Details
-
getState
Gets the current state of the publish item.- Returns:
- the current state
-
handleSignal
Handles a signal which may change the current state.- Parameters:
signal
- the signal
-
isDisabled
Checks whether this publish item is disabled.- Returns:
- true if the publish item is disabled
-
signalPublish
Executes a publish signal. -
signalRemove
Executes a remove signal. -
signalUnpublish
Executes an unpublish signal. -
signalUnremove
Executes an unremove signal.
-