Package google.registry.model.common
Class FeatureFlag
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.common.FeatureFlag
-
Nested Class Summary
Nested ClassesModifier 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
The names of the feature flags that can be individually set.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
Constructors -
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 whether the flag is active at the given time, or else the flag's default value if it doesn't exist.static boolean
isActiveNow
(FeatureFlag.FeatureName featureName) Returns whether the flag is active now, or else the flag's default value if it doesn't 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
-
isActiveNow
Returns whether the flag is active now, or else the flag's default value if it doesn't exist. -
isActiveAt
public static boolean isActiveAt(FeatureFlag.FeatureName featureName, org.joda.time.DateTime dateTime) Returns whether the flag is active at the given time, or else the flag's default value if it doesn't exist. -
asBuilder
-