com.atlassian.confluence.core
Class DefaultSaveContext

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

public class DefaultSaveContext
extends Object
implements SaveContext


Field Summary
static SaveContext DEFAULT
           
static SaveContext MINOR_EDIT
           
static SaveContext REFACTORING
           
 
Constructor Summary
DefaultSaveContext()
          Deprecated. Use the explicit constructor, or one of the final, pre-constructed contexts.
DefaultSaveContext(boolean minorEdit, boolean updateLastModifier, boolean suppressEvents)
           
 
Method Summary
 boolean doUpdateLastModifier()
          UpdateLastModifier indicates whether to update the LastModifier field when saving a page.
 boolean equals(Object o)
           
 int hashCode()
           
 boolean isEventSuppressed()
          Control whether the save should result in an event being published.
 boolean isMinorEdit()
          Minor edits indicate that notifications should not be sent out informing users of changes made to the page.
 void setMinorEdit(boolean minorEdit)
          Minor edits indicate that notifications should not be sent out informing users of changes made to the page.
 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

REFACTORING

public static final SaveContext REFACTORING

DEFAULT

public static final SaveContext DEFAULT
Constructor Detail

DefaultSaveContext

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

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

isMinorEdit

public boolean isMinorEdit()
Description copied from interface: SaveContext
Minor edits indicate that notifications should not be sent out informing users of changes made to the page.

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

setMinorEdit

public void setMinorEdit(boolean minorEdit)
Description copied from interface: SaveContext
Minor edits indicate that notifications should not be sent out informing users of changes made to the page.

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(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2012 Atlassian. All Rights Reserved.