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 TypeMethodDescriptionboolean
Equals for ConfluenceEvents is defined such that specific sub-events are only equal to events of the same type.@Nullable Page
@Nullable Page
@Nullable Integer
Returns the position in the sibling page list the source page was in previously.@NonNull Space
@Nullable com.atlassian.user.User
Return the user that generated the event if known.@Nullable com.atlassian.user.User
getUser()
int
hashCode()
Subclasses must override this to hash their own fields.boolean
boolean
boolean
toString()
Methods inherited from class com.atlassian.confluence.event.events.content.page.PageEvent
getContent, getPage
Methods inherited from class com.atlassian.confluence.event.events.content.ContentEvent
isSuppressNotifications, setSuppressNotifications
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.api.model.event.notification.NotificationEnabledEvent
isSuppressNotifications
Methods 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 movedoldSpace
- 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 pagemovedPageList
- list of moved pages, used to check referrer/referring pages of source page are moved or not- 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:UserDriven
Return the user that generated the event if known.- Specified by:
getOriginatingUser
in 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: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.
-
hashCode
public int hashCode()Description copied from class:ConfluenceEvent
Subclasses must override this to hash their own fields.
-