@Internal public class DefaultCollaborativeEditingHelper extends Object implements CollaborativeEditingHelper
COLLABORATIVE_MODE, LEGACY_MODE, LIMITED_MODE, SHARED_DRAFTS_DARK_FEATURE, SITE_WIDE_SHARED_DRAFTS_DARK_FEATURE, SITE_WIDE_SYNCHRONY_DARK_FEATURE, SYNCHRONY_DARK_FEATURE, USER_LIMIT_DARK_FEATURE_DISABLE
Constructor and Description |
---|
DefaultCollaborativeEditingHelper(com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManagerSupplier,
UpgradeManager upgradeManager) |
Modifier and Type | Method and Description |
---|---|
String |
getEditMode(String spaceKey)
Returns the current editing mode.
|
static String |
getSpaceDarkFeature(String spaceKey) |
static String |
getSynchronySpaceDarkFeature(String spaceKey) |
int |
getUserLimit()
Returns the number of users allowed in editor.
|
boolean |
isLimitedModeEnabled(String spaceKey) |
boolean |
isOverLimit(int numberOfConcurrentUsers) |
boolean |
isSharedDraftsFeatureEnabled(String spaceKey)
Checks if the Shared Drafts dark feature is enabled for the space or globally when no space is passed.
|
boolean |
isUpgraded()
Maybe better alternative is do synchrony event propagation via this class so upgrade check is isolated in one place.
|
public DefaultCollaborativeEditingHelper(com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManagerSupplier, UpgradeManager upgradeManager)
public boolean isSharedDraftsFeatureEnabled(String spaceKey)
CollaborativeEditingHelper
isSharedDraftsFeatureEnabled
in interface CollaborativeEditingHelper
spaceKey
- space keypublic boolean isUpgraded()
CollaborativeEditingHelper
isUpgraded
in interface CollaborativeEditingHelper
public boolean isLimitedModeEnabled(String spaceKey)
isLimitedModeEnabled
in interface CollaborativeEditingHelper
spaceKey
- space keypublic String getEditMode(String spaceKey)
CollaborativeEditingHelper
getEditMode
in interface CollaborativeEditingHelper
spaceKey
- space keyCollaborativeEditingHelper.LEGACY_MODE
, CollaborativeEditingHelper.COLLABORATIVE_MODE
,
CollaborativeEditingHelper.LIMITED_MODE
public boolean isOverLimit(int numberOfConcurrentUsers)
isOverLimit
in interface CollaborativeEditingHelper
numberOfConcurrentUsers
- Number of users currently in the editor including the current user.public int getUserLimit()
CollaborativeEditingHelper
getUserLimit
in interface CollaborativeEditingHelper
Copyright © 2003–2020 Atlassian. All rights reserved.