Class DefaultCollaborativeEditingHelper
- java.lang.Object
-
- com.atlassian.confluence.setup.settings.DefaultCollaborativeEditingHelper
-
- All Implemented Interfaces:
CollaborativeEditingHelper
@Internal public class DefaultCollaborativeEditingHelper extends Object implements CollaborativeEditingHelper
- Since:
- 6.3.0
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.setup.settings.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 Summary
Constructors Constructor Description DefaultCollaborativeEditingHelper(DarkFeaturesManager darkFeaturesManager, UpgradedFlag upgradedFlag)DefaultCollaborativeEditingHelper(DarkFeaturesManager darkFeaturesManager, UpgradeManager upgradeManager)Deprecated.since 7.20
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetEditMode(String spaceKey)Returns the current editing mode.static StringgetSpaceDarkFeature(String spaceKey)static StringgetSynchronySpaceDarkFeature(String spaceKey)Deprecated.since 7.5.0.intgetUserLimit()Returns the number of users allowed in editor.booleanisLimitedModeEnabled(String spaceKey)Deprecated.booleanisOverLimit(int numberOfConcurrentUsers)booleanisSharedDraftsFeatureEnabled(String spaceKey)Checks if the Shared Drafts dark feature is enabled for the space or globally when no space is passed.booleanisUpgraded()Maybe better alternative is do synchrony event propagation via this class so upgrade check is isolated in one place.
-
-
-
Constructor Detail
-
DefaultCollaborativeEditingHelper
public DefaultCollaborativeEditingHelper(DarkFeaturesManager darkFeaturesManager, UpgradedFlag upgradedFlag)
- Since:
- 7.20
-
DefaultCollaborativeEditingHelper
public DefaultCollaborativeEditingHelper(DarkFeaturesManager darkFeaturesManager, UpgradeManager upgradeManager)
Deprecated.since 7.20- Since:
- 7.5
-
-
Method Detail
-
isSharedDraftsFeatureEnabled
public boolean isSharedDraftsFeatureEnabled(String spaceKey)
Description copied from interface:CollaborativeEditingHelperChecks if the Shared Drafts dark feature is enabled for the space or globally when no space is passed.- Specified by:
isSharedDraftsFeatureEnabledin interfaceCollaborativeEditingHelper- Parameters:
spaceKey- space key- Returns:
- true if Share Drafts dark feature is enabled.
-
isUpgraded
public boolean isUpgraded()
Description copied from interface:CollaborativeEditingHelperMaybe better alternative is do synchrony event propagation via this class so upgrade check is isolated in one place.- Specified by:
isUpgradedin interfaceCollaborativeEditingHelper- Returns:
- false if upgrade is in progress so synchrony events could be suppressed.
-
isLimitedModeEnabled
@Deprecated public boolean isLimitedModeEnabled(String spaceKey)
Deprecated.- Specified by:
isLimitedModeEnabledin interfaceCollaborativeEditingHelper- Parameters:
spaceKey- space key- Returns:
- true if limited mode is enabled (since 7.5.0 this method always returns
false)
-
getEditMode
public String getEditMode(String spaceKey)
Description copied from interface:CollaborativeEditingHelperReturns the current editing mode.- Specified by:
getEditModein interfaceCollaborativeEditingHelper- Parameters:
spaceKey- space key- Returns:
- the current editing mode, one of
CollaborativeEditingHelper.LEGACY_MODE,CollaborativeEditingHelper.COLLABORATIVE_MODE,
-
getSynchronySpaceDarkFeature
@Deprecated public static String getSynchronySpaceDarkFeature(String spaceKey)
Deprecated.since 7.5.0. Limited mode is no longer supported since 7.5.0
-
isOverLimit
public boolean isOverLimit(int numberOfConcurrentUsers)
- Specified by:
isOverLimitin interfaceCollaborativeEditingHelper- Parameters:
numberOfConcurrentUsers- Number of users currently in the editor including the current user.- Returns:
- true if the number of users in the editor is greater than the limit
-
getUserLimit
public int getUserLimit()
Description copied from interface:CollaborativeEditingHelperReturns the number of users allowed in editor.- Specified by:
getUserLimitin interfaceCollaborativeEditingHelper- Returns:
- the number of users allowed in editor
-
-