Class PageMoveEvent

    • Constructor Detail

      • PageMoveEvent

        public PageMoveEvent​(Object src,
                             Page movedPage,
                             List<Page> movedPageList,
                             @Nullable Space oldSpace,
                             @Nullable Page oldParentPage,
                             @Nullable Integer oldPosition,
                             @Nullable com.atlassian.user.User theMover,
                             boolean movedBecauseOfParent)
        Parameters:
        src - the object that performed the move
        movedPage - the page that has been moved
        oldSpace - the space the page was in - may be null if oldParentPage exists
        oldParentPage - the page's old parent - may be null if the page was top level in a space
        oldPosition - the page's old position if in an ordered list of siblings, else null
        theMover - the user that moved the page
        movedPageList - list of moved pages, used to check referrer/referring pages of source page are moved or not
        Since:
        5.5.1
    • Method Detail

      • getOldSpace

        public @NonNull Space getOldSpace()
        Returns:
        the space the page was in - should never return null
      • getOldParentPage

        public @Nullable Page getOldParentPage()
        Returns:
        the page's old parent - may be null if the page was top level in a space
      • getOldPosition

        public @Nullable Integer getOldPosition()
        Returns the position in the sibling page list the source page was in previously. Will be null if the page was not in a manually-ordered list.
      • getUser

        public @Nullable com.atlassian.user.User getUser()
        Returns:
        the user that moved the page
      • getNewParentPage

        public @Nullable Page getNewParentPage()
        Since:
        5.8
      • hasMovedChildren

        public boolean hasMovedChildren()
      • isMovedBecauseOfParent

        public boolean isMovedBecauseOfParent()
        Returns:
        true if this page was moved as a result of its parent page being moved
      • isMovedSpace

        public boolean isMovedSpace()
        Returns:
        true if the page has moved space.
      • getOriginatingUser

        public @Nullable com.atlassian.user.User getOriginatingUser()
        Description copied from interface: UserDriven
        Return the user that generated the event if known.
        Specified by:
        getOriginatingUser in interface UserDriven
        Returns:
        User that drove an event. Null indicates either that the event was driven by the anonymous user or the system itself.
      • getMovedPageList

        public @Nullable List<Page> getMovedPageList()
      • equals

        public boolean equals​(@Nullable Object obj)
        Description copied from class: ConfluenceEvent
        Equals for ConfluenceEvents is defined such that specific sub-events are only equal to events of the same type. It is incorrect to try to make an instance of a subclass equal to an instance of any of its superclasses.

        Subclasses must override this to compare their own fields.

        Overrides:
        equals in class PageEvent
        Parameters:
        obj - the object to compare.
        Returns:
        true, if the given object has the same runtime class as this object's runtime class, and the event sources are equal.
        See Also:
        Event.equals(Object)
      • hashCode

        public int hashCode()
        Description copied from class: ConfluenceEvent
        Subclasses must override this to hash their own fields.
        Overrides:
        hashCode in class PageEvent
        Returns:
        the hashcode
        See Also:
        Event.hashCode()