Package org.opencms.ade.publish.client
Class CmsPublishItemStatus
- java.lang.Object
-
- org.opencms.ade.publish.client.CmsPublishItemStatus
-
public class CmsPublishItemStatus extends java.lang.Object
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
Nested Classes Modifier and Type Class Description static class
CmsPublishItemStatus.State
The enum for the publish item state.
-
Constructor Summary
Constructors Constructor Description CmsPublishItemStatus(org.opencms.util.CmsUUID id, CmsPublishItemStatus.State state, boolean disabled, I_CmsPublishItemStatusUpdateHandler handler)
Creates a new publish item status bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsPublishItemStatus.State
getState()
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
isDisabled()
Checks whether this publish item is disabled.protected void
signalPublish()
Executes a publish signal.protected void
signalRemove()
Executes a remove signal.protected void
signalUnpublish()
Executes an unpublish signal.protected void
signalUnremove()
Executes an unremove signal.
-
-
-
Constructor Detail
-
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 Detail
-
getState
public CmsPublishItemStatus.State getState()
Gets the current state of the publish item.- Returns:
- the current state
-
handleSignal
public void handleSignal(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal)
Handles a signal which may change the current state.- Parameters:
signal
- the signal
-
isDisabled
public boolean isDisabled()
Checks whether this publish item is disabled.- Returns:
- true if the publish item is disabled
-
signalPublish
protected void signalPublish()
Executes a publish signal.
-
signalRemove
protected void signalRemove()
Executes a remove signal.
-
signalUnpublish
protected void signalUnpublish()
Executes an unpublish signal.
-
signalUnremove
protected void signalUnremove()
Executes an unremove signal.
-
-