com.atlassian.confluence.event.events.content.page
Class PageMoveEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.springframework.context.ApplicationEvent
          extended by com.atlassian.event.Event
              extended by com.atlassian.confluence.event.events.ConfluenceEvent
                  extended by com.atlassian.confluence.event.events.content.ContentEvent
                      extended by com.atlassian.confluence.event.events.content.page.PageEvent
                          extended by com.atlassian.confluence.event.events.content.page.PageMoveEvent
All Implemented Interfaces:
Contented, Timestamped, Updated, UserDriven, Serializable

public class PageMoveEvent
extends PageEvent
implements Updated, UserDriven

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PageMoveEvent(Object src, Page movedPage, List<Page> movedPageList, Space oldSpace, Page oldParentPage, Integer oldPosition, com.atlassian.user.User theMover, boolean movedBecauseOfParent)
           
PageMoveEvent(Object src, Page movedPage, Space oldSpace, Page oldParentPage, Integer oldPosition, com.atlassian.user.User theMover)
           
PageMoveEvent(Object src, Page movedPage, Space oldSpace, Page oldParentPage, Integer oldPosition, com.atlassian.user.User theMover, boolean movedBecauseOfParent)
           
 
Method Summary
 List<Page> getMovedPageList()
           
 Page getNewParentpage()
           
 Page getOldParentPage()
           
 Integer getOldPosition()
          Returns the position in the sibling page list the source page was in previously.
 Space getOldSpace()
           
 com.atlassian.user.User getOriginatingUser()
          Return the user that generated the event if known.
 com.atlassian.user.User getUser()
           
 boolean hasMovedChildren()
           
 boolean isMovedBecauseOfParent()
           
 boolean isMovedSpace()
           
 String 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
equals, isSuppressNotifications, setSuppressNotifications
 
Methods inherited from class com.atlassian.event.Event
hashCode
 
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.event.events.Timestamped
getTimestamp
 

Constructor Detail

PageMoveEvent

public PageMoveEvent(Object src,
                     Page movedPage,
                     Space oldSpace,
                     Page oldParentPage,
                     Integer oldPosition,
                     com.atlassian.user.User theMover)
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

PageMoveEvent

public PageMoveEvent(Object src,
                     Page movedPage,
                     List<Page> movedPageList,
                     Space oldSpace,
                     Page oldParentPage,
                     Integer oldPosition,
                     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

PageMoveEvent

public PageMoveEvent(Object src,
                     Page movedPage,
                     Space oldSpace,
                     Page oldParentPage,
                     Integer oldPosition,
                     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
movedBecauseOfParent - true if this page was moved as a result of its parent page being moved
Method Detail

getOldSpace

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

getOldParentPage

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

getOldPosition

public 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 com.atlassian.user.User getUser()
Returns:
the user that moved the page

getNewParentpage

public Page getNewParentpage()

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.

toString

public String toString()
Overrides:
toString in class PageEvent

getOriginatingUser

public 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 List<Page> getMovedPageList()


Copyright © 2003–2015 Atlassian. All rights reserved.