Class PageMoveEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.atlassian.confluence.event.events.ConfluenceEvent
com.atlassian.confluence.event.events.content.ContentEvent
com.atlassian.confluence.event.events.content.page.PageEvent
com.atlassian.confluence.event.events.content.page.PageMoveEvent
- All Implemented Interfaces:
NotificationEnabledEvent,Contented,Timestamped,Updated,UserDriven,Serializable
public class PageMoveEvent
extends PageEvent
implements Updated, UserDriven, NotificationEnabledEvent
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquals for ConfluenceEvents is defined such that specific sub-events are only equal to events of the same type.@Nullable Page@Nullable Page@Nullable IntegerReturns the position in the sibling page list the source page was in previously.@NonNull Space@Nullable com.atlassian.user.UserReturn the user that generated the event if known.@Nullable com.atlassian.user.UsergetUser()inthashCode()Subclasses must override this to hash their own fields.booleanbooleanbooleantoString()Methods inherited from class com.atlassian.confluence.event.events.content.page.PageEvent
getContent, getPageMethods inherited from class com.atlassian.confluence.event.events.content.ContentEvent
isSuppressNotifications, setSuppressNotificationsMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSourceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.confluence.api.model.event.notification.NotificationEnabledEvent
isSuppressNotificationsMethods inherited from interface com.atlassian.confluence.event.events.Timestamped
getTimestamp
-
Constructor Details
-
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 movemovedPage- the page that has been movedmovedPageList- list of moved pages, used to check referrer/referring pages of source page are moved or notoldSpace- the space the page was in - may be null if oldParentPage existsoldParentPage- the page's old parent - may be null if the page was top level in a spaceoldPosition- the page's old position if in an ordered list of siblings, else nulltheMover- the user that moved the page- Since:
- 5.5.1
-
-
Method Details
-
getOldSpace
- Returns:
- the space the page was in - should never return null
-
getOldParentPage
- Returns:
- the page's old parent - may be null if the page was top level in a space
-
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
- 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:UserDrivenReturn the user that generated the event if known.- Specified by:
getOriginatingUserin interfaceUserDriven- Returns:
- User that drove an event. Null indicates either that the event was driven by the anonymous user or the system itself.
-
getMovedPageList
-
toString
-
equals
Description copied from class:ConfluenceEventEquals 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.
-
hashCode
public int hashCode()Description copied from class:ConfluenceEventSubclasses must override this to hash their own fields.
-