com.atlassian.confluence.core
Class DefaultSaveContext

java.lang.Object
  extended by com.atlassian.confluence.core.DefaultSaveContext
All Implemented Interfaces:
SaveContext

public class DefaultSaveContext
extends java.lang.Object
implements SaveContext


Field Summary
static SaveContext DEFAULT
           
static SaveContext MINOR_EDIT
           
static SaveContext REFACTORING
           
static SaveContext SUPPRESS_NOTIFICATIONS
           
 
Constructor Summary
DefaultSaveContext()
          Deprecated. Use the explicit constructor, or one of the final, pre-constructed contexts.
DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents)
           
DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents, PageUpdateTrigger updateTrigger)
           
 
Method Summary
 boolean doUpdateLastModifier()
          UpdateLastModifier indicates whether to update the LastModifier field when saving a page.
 boolean equals(java.lang.Object o)
           
 PageUpdateTrigger getUpdateTrigger()
           
 int hashCode()
           
 boolean isEventSuppressed()
          Control whether the save should result in an event being published.
 boolean isMinorEdit()
          Deprecated. 
 boolean isSuppressNotifications()
          Indicates that notifications should not be sent out informing users of the changes to this content.
 void setMinorEdit(boolean minorEdit)
          Deprecated. 
 void setSuppressNotifications(boolean suppressNotifications)
          Indicates that notifications should not be sent out informing users of the changes to this content.
 void setUpdateLastModifier(boolean updateLastModifier)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINOR_EDIT

public static final SaveContext MINOR_EDIT

SUPPRESS_NOTIFICATIONS

public static final SaveContext SUPPRESS_NOTIFICATIONS

REFACTORING

public static final SaveContext REFACTORING

DEFAULT

public static final SaveContext DEFAULT
Constructor Detail

DefaultSaveContext

public DefaultSaveContext(boolean suppressNotifications,
                          boolean updateLastModifier,
                          boolean suppressEvents)

DefaultSaveContext

public DefaultSaveContext(boolean suppressNotifications,
                          boolean updateLastModifier,
                          boolean suppressEvents,
                          PageUpdateTrigger updateTrigger)

DefaultSaveContext

public DefaultSaveContext()
Deprecated. Use the explicit constructor, or one of the final, pre-constructed contexts.

Create a new SaveContext with all fields false. Note that this doesn't update the last modified date and is thus almost certainly NOT what you want to do.

Method Detail

isSuppressNotifications

public boolean isSuppressNotifications()
Description copied from interface: SaveContext
Indicates that notifications should not be sent out informing users of the changes to this content.

Specified by:
isSuppressNotifications in interface SaveContext
Returns:
true if notifications should not be sent to users.

setSuppressNotifications

public void setSuppressNotifications(boolean suppressNotifications)
Description copied from interface: SaveContext
Indicates that notifications should not be sent out informing users of the changes to this content.

Specified by:
setSuppressNotifications in interface SaveContext

getUpdateTrigger

public PageUpdateTrigger getUpdateTrigger()
Specified by:
getUpdateTrigger in interface SaveContext
Returns:
an indication of how the content update was triggered

isMinorEdit

@Deprecated
public boolean isMinorEdit()
Deprecated. 

Specified by:
isMinorEdit in interface SaveContext
Returns:
true if a 'minor edit' has been made.

setMinorEdit

@Deprecated
public void setMinorEdit(boolean minorEdit)
Deprecated. 

Specified by:
setMinorEdit in interface SaveContext

doUpdateLastModifier

public boolean doUpdateLastModifier()
Description copied from interface: SaveContext
UpdateLastModifier indicates whether to update the LastModifier field when saving a page.

Specified by:
doUpdateLastModifier in interface SaveContext
Returns:
true if the LastModifier should be updated

setUpdateLastModifier

public void setUpdateLastModifier(boolean updateLastModifier)
Specified by:
setUpdateLastModifier in interface SaveContext

isEventSuppressed

public boolean isEventSuppressed()
Description copied from interface: SaveContext
Control whether the save should result in an event being published. If this is false then there will be no event published. It should be noted that even if this is false, whether an event is actually published is a decision of the involved publishing component. So by setting this true you can ensure there is not an event. Setting false does not guarantee you will get an event.

Specified by:
isEventSuppressed in interface SaveContext
Returns:
if true if event publishing is to be suppressed.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.