Package jenkins.model.experimentalflags
Class UserExperimentalFlag<T>
java.lang.Object
jenkins.model.experimentalflags.UserExperimentalFlag<T>
- All Implemented Interfaces:
- ExtensionPoint
- Direct Known Subclasses:
- BooleanUserExperimentalFlag
User specific experimental flag to enable or disable specific behavior.
 As it's user specific, usually this kind of feature flag is only used for UI.
- Since:
- 2.395
- 
Nested Class SummaryNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ExtensionList<UserExperimentalFlag> all()protected abstract TdeserializeValue(Object serializedValue) Convert the serialized value into the usable instance.abstract Tabstract StringThe name that will be used in the configuration page for that flag It must be user readableThe ID used by the machine to link the flag with its value within the user propertiesgetFlagValue(User user) static <T> TgetFlagValueForCurrentUser(String flagClassCanonicalName) From the flag class, return the value of the flag for the current user If the returned value isnull, it means that either the class was not found or the current user is anonymousabstract StringDescribe what the flag is changing depending on its value.abstract ObjectserializeValue(T rawValue) Convert the usable value into a serializable form that can be stored in the user property.
- 
Constructor Details- 
UserExperimentalFlag
 
- 
- 
Method Details- 
getDefaultValue
- 
serializeValueConvert the usable value into a serializable form that can be stored in the user property. If no changes are necessary, simply returning therawValueis fine.
- 
deserializeValueConvert the serialized value into the usable instance. If the instance is invalid (like after migration), returningnullwill force to return thegetDefaultValue()
- 
getDisplayNameThe name that will be used in the configuration page for that flag It must be user readable
- 
getShortDescriptionDescribe what the flag is changing depending on its value. This method is called in description.jelly, which could be overloaded by children. It could return HTML content.
- 
getFlagKeyThe ID used by the machine to link the flag with its value within the user properties
- 
getFlagValue
- 
getFlagValue
- 
getFlagDescriptionPage
- 
getFlagConfigPage
- 
all
- 
getFlagValueForCurrentUserFrom the flag class, return the value of the flag for the current user If the returned value isnull, it means that either the class was not found or the current user is anonymous
 
-