Class DefaultSaveContext

All Implemented Interfaces:
OperationContext<PageUpdateTrigger>, SaveContext, Serializable

@ParametersAreNonnullByDefault public class DefaultSaveContext extends AbstractOperationContext<PageUpdateTrigger> implements SaveContext
See Also:
  • Field Details

    • MINOR_EDIT

      public static final SaveContext MINOR_EDIT
    • SUPPRESS_NOTIFICATIONS

      public static final SaveContext SUPPRESS_NOTIFICATIONS
    • REFACTORING

      public static final SaveContext REFACTORING
    • BULK_OPERATION

      public static final SaveContext BULK_OPERATION
      Since:
      6.0
    • DEFAULT

      public static final SaveContext DEFAULT
    • DRAFT

      public static final SaveContext DRAFT
    • RAW_DRAFT

      public static final SaveContext RAW_DRAFT
    • DRAFT_REFACTORING

      public static final SaveContext DRAFT_REFACTORING
    • REVERT

      public static final SaveContext REVERT
  • Constructor Details

    • DefaultSaveContext

      @Deprecated public DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents)
      Deprecated.
      since 6.0. Use the builder() or one of the final, pre-constructed contexts.
    • DefaultSaveContext

      @Deprecated public DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents, PageUpdateTrigger updateTrigger)
      Deprecated.
      since 6.0. Use the builder() or one of the final, pre-constructed contexts.
  • Method Details

    • isSuppressAutowatch

      public boolean isSuppressAutowatch()
      Description copied from interface: SaveContext
      Control whether the save should result in the page being watched by the creator if they have their autowatch setting on. This has no effect if the event is suppressed as it is implemented as a property on the event.
      Specified by:
      isSuppressAutowatch in interface SaveContext
      Returns:
      if true if automatic watches is to be suppressed.
    • setSuppressNotifications

      @Deprecated public void setSuppressNotifications(boolean suppressNotifications)
      Deprecated.
      since 6.0. Use the builder() instead.
      Description copied from interface: SaveContext
      Indicates that notifications should not be sent out informing users of the changes to this content.
      Specified by:
      setSuppressNotifications in interface SaveContext
    • doUpdateLastModifier

      public boolean doUpdateLastModifier()
      Description copied from interface: SaveContext
      UpdateLastModifier indicates whether to update the LastModifier field when saving a page.
      Specified by:
      doUpdateLastModifier in interface SaveContext
      Returns:
      true if the LastModifier should be updated
    • setUpdateLastModifier

      @Deprecated public void setUpdateLastModifier(boolean updateLastModifier)
      Deprecated.
      since 6.0. Use the builder() instead.
      Specified by:
      setUpdateLastModifier in interface SaveContext
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • builder

      public static DefaultSaveContext.Builder builder()
      Returns:
      A builder object with all boolean fields initialised to false and updateTrigger initialised to UNKNOWN.
      Since:
      6.0