Package google.registry.model.common
Class FeatureFlag
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.common.FeatureFlag
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder for constructingFeatureFlag
objects, since they are immutable.static class
Exception to throw when no FeatureFlag entity is found for given FeatureName string(s).static enum
static enum
The current status of the feature the flag represents.Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,
B extends Buildable.GenericBuilder<?, ?>>, Buildable.Overlayable<T> -
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VKey
<FeatureFlag> createVKey
(FeatureFlag.FeatureName featureName) static FeatureFlag
get
(FeatureFlag.FeatureName featureName) static com.google.common.collect.ImmutableSet
<FeatureFlag> getAll
(Set<FeatureFlag.FeatureName> featureNames) static com.google.common.collect.ImmutableList
<FeatureFlag> getStatus
(org.joda.time.DateTime time) static Optional
<FeatureFlag> getUncached
(FeatureFlag.FeatureName featureName) static boolean
isActiveAt
(FeatureFlag.FeatureName featureName, org.joda.time.DateTime dateTime) Returns if the FeatureFlag with the given FeatureName is active at a given time.static boolean
isActiveNow
(FeatureFlag.FeatureName featureName) Returns if the FeatureFlag with the given FeatureName is active now.static boolean
isActiveNowOrElse
(FeatureFlag.FeatureName featureName, boolean defaultValue) Returns if the flag is active, or the default value if the flag does not exist.Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
FeatureFlag
public FeatureFlag()
-
-
Method Details
-
getUncached
-
getAllUncached
-
get
-
getAll
public static com.google.common.collect.ImmutableSet<FeatureFlag> getAll(Set<FeatureFlag.FeatureName> featureNames) -
createVKey
-
createVKey
- Overrides:
createVKey
in classImmutableObject
-
getFeatureName
-
getStatusMap
-
getStatus
-
isActiveNowOrElse
Returns if the flag is active, or the default value if the flag does not exist. -
isActiveNow
Returns if the FeatureFlag with the given FeatureName is active now. -
isActiveAt
public static boolean isActiveAt(FeatureFlag.FeatureName featureName, org.joda.time.DateTime dateTime) Returns if the FeatureFlag with the given FeatureName is active at a given time. -
asBuilder
-