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 String
getEditMode(String spaceKey)
Returns the current editing mode.static String
getSpaceDarkFeature(String spaceKey)
static String
getSynchronySpaceDarkFeature(String spaceKey)
Deprecated.since 7.5.0.int
getUserLimit()
Returns the number of users allowed in editor.boolean
isLimitedModeEnabled(String spaceKey)
Deprecated.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.
-
-
-
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:CollaborativeEditingHelper
Checks if the Shared Drafts dark feature is enabled for the space or globally when no space is passed.- Specified by:
isSharedDraftsFeatureEnabled
in interfaceCollaborativeEditingHelper
- Parameters:
spaceKey
- space key- Returns:
- true if Share Drafts dark feature is enabled.
-
isUpgraded
public boolean isUpgraded()
Description copied from interface:CollaborativeEditingHelper
Maybe better alternative is do synchrony event propagation via this class so upgrade check is isolated in one place.- Specified by:
isUpgraded
in interfaceCollaborativeEditingHelper
- Returns:
- false if upgrade is in progress so synchrony events could be suppressed.
-
isLimitedModeEnabled
@Deprecated public boolean isLimitedModeEnabled(String spaceKey)
Deprecated.- Specified by:
isLimitedModeEnabled
in 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:CollaborativeEditingHelper
Returns the current editing mode.- Specified by:
getEditMode
in 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:
isOverLimit
in 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:CollaborativeEditingHelper
Returns the number of users allowed in editor.- Specified by:
getUserLimit
in interfaceCollaborativeEditingHelper
- Returns:
- the number of users allowed in editor
-
-