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
ConstructorsModifierConstructorDescriptionprotectedPropertyBasedFeatureEnabledChecker(String propertyName, boolean enabled) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the feature is accessible under current licensing terms.booleanReturns true if the feature is enabled and accessible under current licensing terms or false otherwisevoidThrowsFeatureInaccessibleExceptionif 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:FeatureFlagReturns true if the feature is enabled and accessible under current licensing terms or false otherwise- Specified by:
isEnabledin interfaceFeatureFlag
-
isAccessible
public boolean isAccessible()Description copied from interface:FeatureEnabledCheckerReturns whether the feature is accessible under current licensing terms.- Specified by:
isAccessiblein interfaceFeatureEnabledChecker
-
throwIfFeatureDisabledOrInaccessible
public void throwIfFeatureDisabledOrInaccessible()Description copied from interface:FeatureEnabledCheckerThrowsFeatureInaccessibleExceptionif the feature is not accessible. ThrowsFeatureDisabledExceptionif the feature is disabled.- Specified by:
throwIfFeatureDisabledOrInaccessiblein interfaceFeatureEnabledChecker
-