@Internal public class DefaultDraftsTransitionHelper extends Object implements DraftsTransitionHelper
ContentEntityObject.DRAFT
,
Draft
Constructor and Description |
---|
DefaultDraftsTransitionHelper(PageManagerInternal pageManager,
DraftManager draftManager,
ContentEntityManager contentEntityManager,
AttachmentManager attachmentManager,
ContentPermissionManager contentPermissionManager,
ContentPropertyManager contentPropertyManager,
LabelManager labelManager,
CollaborativeEditingHelper collaborativeEditingHelper) |
Modifier and Type | Method and Description |
---|---|
ContentEntityObject |
createDraft(String contentType,
String spaceKey)
This method should attempt to create a draft based on whether or not the Shared Drafts Dark Feature is enabled
or disabled.
|
ContentEntityObject |
createDraft(String contentType,
String spaceKey,
long parentPageId)
This method should attempt to create a draft based on whether or not the Shared Drafts Dark Feature is enabled
or disabled.
|
ContentEntityObject |
getDraft(long draftId)
This method should attempt to retrieve a draft, and based on whether or not the Shared Draft dark feature is
enabled (determined by the isSharedDraftsFeatureEnabled method) or disabled should return a Shared Draft or
Legacy Draft respectively.
|
ContentEntityObject |
getDraftForPage(AbstractPage abstractPage)
This method should retrieve a draft from a given AbstractPage respecting the Shared Drafts feature state.
|
String |
getEditMode(String spaceKey)
This method is used to determine what's the current edit mode regarding collaborative editing (legacy, limited or collaborative),
the method is provided a spaceKey and returns the current edit mode for that space.
|
boolean |
isFallbackModeEnabled(String spaceKey)
Deprecated.
|
boolean |
isLimitedModeEnabled(String spaceKey)
This method is used to determine whether or not the instance is in limited mode.
|
boolean |
isSharedDraftsFeatureEnabled(String spaceKey)
This method is used to determine whether or not the Shared Drafts Dark Feature is enabled or disabled on
a per space basis, the method is provided a spaceKey and returns whether or not the feature is enabled.
|
void |
transitionContentObjects(ContentEntityObject from,
ContentEntityObject to)
Transitions content objects such as attachments, content properties,
labels and permissions from one content object to another.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContentId, getContentType, getSpaceKey, isLegacyDraft
public DefaultDraftsTransitionHelper(PageManagerInternal pageManager, DraftManager draftManager, ContentEntityManager contentEntityManager, AttachmentManager attachmentManager, ContentPermissionManager contentPermissionManager, ContentPropertyManager contentPropertyManager, LabelManager labelManager, CollaborativeEditingHelper collaborativeEditingHelper)
public ContentEntityObject getDraftForPage(AbstractPage abstractPage)
DraftsTransitionHelper
getDraftForPage
in interface DraftsTransitionHelper
abstractPage
- the page we want the draft for (for legacy drafts, we get the current users per-page draft).public ContentEntityObject createDraft(String contentType, String spaceKey)
DraftsTransitionHelper
createDraft
in interface DraftsTransitionHelper
contentType
- specifies the type of Draft, either "blogpost" or "page" as of 5.9.1.spaceKey
- is used to specify the key of the Space the draft will belong to.public ContentEntityObject createDraft(String contentType, String spaceKey, long parentPageId)
DraftsTransitionHelper
createDraft
in interface DraftsTransitionHelper
contentType
- specifies the type of Draft, either "blogpost" or "page" as of 5.9.1.spaceKey
- is used to specify the key of the Space the draft will belong to.parentPageId
- is the parent ID of the draft.public ContentEntityObject getDraft(long draftId)
DraftsTransitionHelper
There is no need to provide a spaceKey because the spaceKey of the draft (if found) will be used in the Shared Draft dark feature check
getDraft
in interface DraftsTransitionHelper
draftId
- specifies the ID of the draft to be retrieved.public void transitionContentObjects(ContentEntityObject from, ContentEntityObject to)
DraftsTransitionHelper
transitionContentObjects
in interface DraftsTransitionHelper
public String getEditMode(String spaceKey)
DraftsTransitionHelper
getEditMode
in interface DraftsTransitionHelper
spaceKey
- is used to specify the key of the Space we want to check.public boolean isSharedDraftsFeatureEnabled(String spaceKey)
DraftsTransitionHelper
isSharedDraftsFeatureEnabled
in interface DraftsTransitionHelper
spaceKey
- is used to specify the key of the Space we want to check.public boolean isLimitedModeEnabled(String spaceKey)
DraftsTransitionHelper
isLimitedModeEnabled
in interface DraftsTransitionHelper
@Deprecated public boolean isFallbackModeEnabled(String spaceKey)
isFallbackModeEnabled
in interface DraftsTransitionHelper
Copyright © 2003–2017 Atlassian. All rights reserved.