@Extension @Symbol(value="timezone") public static class TimeZoneProperty.DescriptorImpl extends UserPropertyDescriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
clazz
Constructor and Description |
---|
DescriptorImpl() |
Modifier and Type | Method and Description |
---|---|
FormValidation |
doCheckTimeZoneName(String timeZoneName) |
ListBoxModel |
doFillTimeZoneNameItems(User user) |
String |
getDisplayName()
Human readable name of this kind of configurable object.
|
boolean |
isEnabled()
Whether or not the described property is enabled in the current context.
|
void |
load()
Loads the data from the disk into this object.
|
UserProperty |
newInstance(User user)
Creates a default instance of
UserProperty to be associated
with User object that wasn't created from a persisted XML data. |
void |
save()
Saves the configuration info to the disk.
|
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, self, toArray, toList, toMap
@NonNull public String getDisplayName()
Descriptor
Class.getSimpleName()
on Descriptor.clazz
, so for example MyThing
from some.pkg.MyThing.DescriptorImpl
.
Historically some implementations returned null as a way of hiding the descriptor from the UI,
but this is generally managed by an explicit method such as isEnabled
or isApplicable
.getDisplayName
in class Descriptor<UserProperty>
public UserProperty newInstance(User user)
UserPropertyDescriptor
UserProperty
to be associated
with User
object that wasn't created from a persisted XML data.
See User
class javadoc for more details about the life cycle
of User
and when this method is invoked.
newInstance
in class UserPropertyDescriptor
public void load()
Descriptor
The constructor of the derived class must call this method. (If we do that in the base class, the derived class won't get a chance to set default values.)
load
in class Descriptor<UserProperty>
public void save()
Descriptor
save
in interface Saveable
save
in class Descriptor<UserProperty>
public boolean isEnabled()
UserPropertyDescriptor
Returning false from this method essentially has the same effect of
making Hudson behaves as if this UserPropertyDescriptor
is
not a part of UserProperty.all()
.
This mechanism is useful if the availability of the property is contingent of some other settings.
isEnabled
in class UserPropertyDescriptor
public ListBoxModel doFillTimeZoneNameItems(@AncestorInPath User user)
public FormValidation doCheckTimeZoneName(@QueryParameter String timeZoneName)
Copyright © 2004–2022. All rights reserved.