Class PageMoveEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- com.atlassian.event.Event
-
- 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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable Object obj)Equals for ConfluenceEvents is defined such that specific sub-events are only equal to events of the same type.@Nullable List<Page>getMovedPageList()@Nullable PagegetNewParentPage()@Nullable PagegetOldParentPage()@Nullable IntegergetOldPosition()Returns the position in the sibling page list the source page was in previously.@NonNull SpacegetOldSpace()@Nullable com.atlassian.user.UsergetOriginatingUser()Return the user that generated the event if known.@Nullable com.atlassian.user.UsergetUser()inthashCode()Subclasses must override this to hash their own fields.booleanhasMovedChildren()booleanisMovedBecauseOfParent()booleanisMovedSpace()StringtoString()-
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 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 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 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 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: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.
-
equals
public boolean equals(@Nullable Object obj)
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.
-
-