public class PropertyBasedFeatureEnabledChecker extends Object implements FeatureEnabledChecker
Modifier | Constructor and Description |
---|---|
protected |
PropertyBasedFeatureEnabledChecker(String propertyName,
boolean enabled) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAccessible()
Returns whether the feature is accessible under current licensing terms.
|
boolean |
isEnabled()
Returns true if the feature is enabled and accessible under current licensing terms or false otherwise
|
void |
throwIfFeatureDisabledOrInaccessible()
Throws
FeatureInaccessibleException if the feature is not accessible. |
protected PropertyBasedFeatureEnabledChecker(String propertyName, boolean enabled)
propertyName
- name of the system property enabling/disabling the feature, only for logging purposesenabled
- whether the feature is enabledpublic boolean isEnabled()
FeatureEnabledChecker
isEnabled
in interface FeatureEnabledChecker
public boolean isAccessible()
FeatureEnabledChecker
isAccessible
in interface FeatureEnabledChecker
public void throwIfFeatureDisabledOrInaccessible()
FeatureEnabledChecker
FeatureInaccessibleException
if the feature is not accessible.
Throws FeatureDisabledException
if the feature is disabled.throwIfFeatureDisabledOrInaccessible
in interface FeatureEnabledChecker
Copyright © 2020 Atlassian. All rights reserved.