Package com.atlassian.confluence.core
Class DefaultSaveContext
- java.lang.Object
-
- com.atlassian.confluence.core.AbstractOperationContext<PageUpdateTrigger>
-
- com.atlassian.confluence.core.DefaultSaveContext
-
- All Implemented Interfaces:
OperationContext<PageUpdateTrigger>
,SaveContext
,Serializable
@ParametersAreNonnullByDefault public class DefaultSaveContext extends AbstractOperationContext<PageUpdateTrigger> implements SaveContext
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultSaveContext.Builder
-
Nested classes/interfaces inherited from class com.atlassian.confluence.core.AbstractOperationContext
AbstractOperationContext.BaseBuilder<T extends AbstractOperationContext.BaseBuilder,TRIGGER extends OperationTrigger>
-
-
Field Summary
Fields Modifier and Type Field Description static SaveContext
BULK_OPERATION
static SaveContext
DEFAULT
static SaveContext
DRAFT
static SaveContext
DRAFT_REFACTORING
static SaveContext
MINOR_EDIT
static SaveContext
RAW_DRAFT
static SaveContext
REFACTORING
static SaveContext
REVERT
static SaveContext
SUPPRESS_NOTIFICATIONS
-
Fields inherited from class com.atlassian.confluence.core.AbstractOperationContext
suppressNotifications
-
-
Constructor Summary
Constructors Constructor Description DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents)
Deprecated.since 6.0.DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents, PageUpdateTrigger updateTrigger)
Deprecated.since 6.0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DefaultSaveContext.Builder
builder()
boolean
doUpdateLastModifier()
UpdateLastModifier indicates whether to update the LastModifier field when saving a page.boolean
equals(Object o)
int
hashCode()
boolean
isSuppressAutowatch()
Control whether the save should result in the page being watched by the creator if they have their autowatch setting on.void
setSuppressNotifications(boolean suppressNotifications)
Deprecated.since 6.0.void
setUpdateLastModifier(boolean updateLastModifier)
Deprecated.since 6.0.-
Methods inherited from class com.atlassian.confluence.core.AbstractOperationContext
getUpdateTrigger, isEventSuppressed, isSuppressNotifications
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.core.OperationContext
getUpdateTrigger, isEventSuppressed, isSuppressNotifications
-
-
-
-
Field Detail
-
MINOR_EDIT
public static final SaveContext MINOR_EDIT
-
SUPPRESS_NOTIFICATIONS
public static final SaveContext SUPPRESS_NOTIFICATIONS
-
REFACTORING
public static final SaveContext REFACTORING
-
BULK_OPERATION
public static final SaveContext BULK_OPERATION
- Since:
- 6.0
-
DEFAULT
public static final SaveContext DEFAULT
-
DRAFT
public static final SaveContext DRAFT
-
RAW_DRAFT
public static final SaveContext RAW_DRAFT
-
DRAFT_REFACTORING
public static final SaveContext DRAFT_REFACTORING
-
REVERT
public static final SaveContext REVERT
-
-
Constructor Detail
-
DefaultSaveContext
@Deprecated public DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents)
Deprecated.since 6.0. Use thebuilder()
or one of the final, pre-constructed contexts.
-
DefaultSaveContext
@Deprecated public DefaultSaveContext(boolean suppressNotifications, boolean updateLastModifier, boolean suppressEvents, PageUpdateTrigger updateTrigger)
Deprecated.since 6.0. Use thebuilder()
or one of the final, pre-constructed contexts.
-
-
Method Detail
-
isSuppressAutowatch
public boolean isSuppressAutowatch()
Description copied from interface:SaveContext
Control whether the save should result in the page being watched by the creator if they have their autowatch setting on. This has no effect if the event is suppressed as it is implemented as a property on the event.- Specified by:
isSuppressAutowatch
in interfaceSaveContext
- Returns:
- if true if automatic watches is to be suppressed.
-
setSuppressNotifications
@Deprecated public void setSuppressNotifications(boolean suppressNotifications)
Deprecated.since 6.0. Use thebuilder()
instead.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 interfaceSaveContext
-
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 interfaceSaveContext
- Returns:
- true if the LastModifier should be updated
-
setUpdateLastModifier
@Deprecated public void setUpdateLastModifier(boolean updateLastModifier)
Deprecated.since 6.0. Use thebuilder()
instead.- Specified by:
setUpdateLastModifier
in interfaceSaveContext
-
builder
public static DefaultSaveContext.Builder builder()
- Returns:
- A builder object with all boolean fields initialised to false and updateTrigger initialised to UNKNOWN.
- Since:
- 6.0
-
-