Class UserProperty
- All Implemented Interfaces:
- ExtensionPoint,- Describable<UserProperty>,- ReconfigurableDescribable<UserProperty>
- Direct Known Subclasses:
- ApiTokenProperty,- ConsoleUrlProviderUserProperty,- FederatedLoginServiceUserProperty,- HudsonPrivateSecurityRealm.Details,- LastGrantedAuthoritiesProperty,- MyViewsProperty,- PaneStatusProperties,- TimeZoneProperty,- UserExperimentalFlagsProperty,- UserSearchProperty,- UserSeedProperty,- ViewsTabBarUserProperty
User.
 
 Plugins can extend this to define custom properties
 for Users. UserPropertys show up in the user
 configuration screen, and they are persisted with the user object.
 
 Configuration screen should be defined in config.jelly.
 Within this page, the UserProperty instance is available
 as instance variable (while it refers to User.
 See UserSearchProperty's config.jelly for an example.
 
A property may also define a summary.jelly view to show in the main user screen.
- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionall()Returns all the registeredUserPropertyDescriptors.static List<UserPropertyDescriptor> allByCategoryClass(Class<? extends UserPropertyCategory> categoryClass) Returns all the registeredUserPropertyCategorydescriptors for a given category.Gets the descriptor for this instance.reconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) When a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) Deprecated.protected voidThis method is used to inform the property about its owner.
- 
Field Details- 
userThe user object that owns this property. This value will be set by the Hudson code. Derived classes can expect this value to be always set.
 
- 
- 
Constructor Details- 
UserPropertypublic UserProperty()
 
- 
- 
Method Details- 
setUserThis method is used to inform the property about its owner. It could be called multiple times, even without change, thus it should be idempotent.
- 
getDescriptorDescription copied from interface:DescribableGets the descriptor for this instance.Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)By default looks for a nested class (conventionally named DescriptorImpl) implementingDescriptorand marked withExtension.- Specified by:
- getDescriptorin interface- Describable<UserProperty>
 
- 
allReturns all the registeredUserPropertyDescriptors.
- 
allByCategoryClasspublic static List<UserPropertyDescriptor> allByCategoryClass(@NonNull Class<? extends UserPropertyCategory> categoryClass) Returns all the registeredUserPropertyCategorydescriptors for a given category.- Since:
- 2.468
 
- 
reconfigurepublic UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) throws Descriptor.FormException Description copied from interface:ReconfigurableDescribableWhen a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.The default implementation of this should be the following: return form==null ? null : getDescriptor().newInstance(req, form); - Specified by:
- reconfigurein interface- ReconfigurableDescribable<UserProperty>
- Parameters:
- req- The current HTTP request being processed.
- form- JSON fragment that corresponds to this describable object. If the newly submitted form doesn't include a fragment for this describable (meaning the user has de-selected your descriptor), then this argument is null.
- Returns:
- The new instance. To not to create an instance of a describable, return null.
- Throws:
- Descriptor.FormException
 
- 
reconfigure@Deprecated public UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException Deprecated.- Specified by:
- reconfigurein interface- ReconfigurableDescribable<UserProperty>
- Throws:
- Descriptor.FormException
 
 
-