Class AbstractRepositoryModificationEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
RepositoryModificationRequestedEvent, RepositoryModifiedEvent

public class AbstractRepositoryModificationEvent extends RepositoryEvent
Base class for constructing events which relate to repository modifications.

RepositoryEvent.getRepository() always returns the current persisted state for the repository. Whether that matches the old values or the new values depends on the specific event, and will be documented on the derived event class.

See Also:
  • Field Details

  • Constructor Details

    • AbstractRepositoryModificationEvent

      public AbstractRepositoryModificationEvent(@Nonnull Object source, @Nonnull Repository repository, @Nonnull Repository oldValue, @Nonnull Repository newValue)
  • Method Details

    • getNewValue

      @Nonnull public Repository getNewValue()
      Retrieves the updated repository values.
      Returns:
      the updated repository
    • getOldValue

      @Nonnull public Repository getOldValue()
      Retrieves the original repository values.
      Returns:
      the original repository
    • isNameChanged

      public boolean isNameChanged()
    • isOriginChanged

      public boolean isOriginChanged()
    • isMoved

      public boolean isMoved()
      Returns:
      true if repository was moved
      Since:
      5.4
    • isSlugChanged

      public boolean isSlugChanged()
    • isStateChanged

      public boolean isStateChanged()