Class DarkFeatures


  • public class DarkFeatures
    extends Object
    Represents the current state of the dark features for a particular user.
    • Constructor Detail

      • DarkFeatures

        public DarkFeatures​(Set<String> systemEnabledFeatures,
                            Set<String> siteEnabledFeatures,
                            Set<String> userEnabledFeatures)
    • Method Detail

      • getSystemEnabledFeatures

        public Set<String> getSystemEnabledFeatures()
      • getSiteEnabledFeatures

        public Set<String> getSiteEnabledFeatures()
      • getUserEnabledFeatures

        public Set<String> getUserEnabledFeatures()
      • getGlobalEnabledFeatures

        public Set<String> getGlobalEnabledFeatures()
        Returns Dark Features enabled for all users, whether by system.property or site configuration.
      • getAllEnabledFeatures

        public Set<String> getAllEnabledFeatures()
      • getAllEnabledFeaturesAsString

        public String getAllEnabledFeaturesAsString()
        Return all the enabled features, joined with commas.
      • isFeatureEnabled

        public boolean isFeatureEnabled​(String featureKey)
      • isDarkFeatureEnabled

        public static boolean isDarkFeatureEnabled​(String featureKey)
        Returns true if the dark feature is enabled for the current user, either because of a user preference or because it is enabled site-wide via a site or system setting.
      • isDarkFeatureEnabled

        public static boolean isDarkFeatureEnabled​(ConfluenceUser user,
                                                   String featureKey)
        Returns true if the dark feature is enabled for the given user, either because of a user preference or because it is enabled site-wide via a site or system setting.
        Since:
        5.2