Package com.atlassian.crowd.features
Class PropertyBasedFeatureEnabledChecker
java.lang.Object
com.atlassian.crowd.features.PropertyBasedFeatureEnabledChecker
- All Implemented Interfaces:
FeatureFlag
,FeatureEnabledChecker
- Direct Known Subclasses:
PropertyBasedApplicationLicensingEnabledChecker
,PropertyBasedAzureFilteringEnabledChecker
-
Constructor Summary
ModifierConstructorDescriptionprotected
PropertyBasedFeatureEnabledChecker
(String propertyName, boolean enabled) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the feature is accessible under current licensing terms.boolean
Returns true if the feature is enabled and accessible under current licensing terms or false otherwisevoid
ThrowsFeatureInaccessibleException
if the feature is not accessible.
-
Constructor Details
-
PropertyBasedFeatureEnabledChecker
- Parameters:
propertyName
- name of the system property enabling/disabling the feature, only for logging purposesenabled
- whether the feature is enabled
-
-
Method Details
-
isEnabled
public boolean isEnabled()Description copied from interface:FeatureFlag
Returns true if the feature is enabled and accessible under current licensing terms or false otherwise- Specified by:
isEnabled
in interfaceFeatureFlag
-
isAccessible
public boolean isAccessible()Description copied from interface:FeatureEnabledChecker
Returns whether the feature is accessible under current licensing terms.- Specified by:
isAccessible
in interfaceFeatureEnabledChecker
-
throwIfFeatureDisabledOrInaccessible
public void throwIfFeatureDisabledOrInaccessible()Description copied from interface:FeatureEnabledChecker
ThrowsFeatureInaccessibleException
if the feature is not accessible. ThrowsFeatureDisabledException
if the feature is disabled.- Specified by:
throwIfFeatureDisabledOrInaccessible
in interfaceFeatureEnabledChecker
-