Class CmsPublishItemStatus

java.lang.Object
org.opencms.ade.publish.client.CmsPublishItemStatus

public class CmsPublishItemStatus extends 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
  • Constructor Details

  • Method Details

    • 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.