|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.UserProperty
@ExportedBean public abstract class UserProperty
Extensible property of User
.
Plugin
s can extend this to define custom properties
for User
s. UserProperty
s 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.UserProperty
's config.jelly for an example.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary | |
---|---|
protected User |
user
The user object that owns this property. |
Constructor Summary | |
---|---|
UserProperty()
|
Method Summary | |
---|---|
static DescriptorExtensionList<UserProperty,UserPropertyDescriptor> |
all()
Returns all the registered UserPropertyDescriptor s. |
UserPropertyDescriptor |
getDescriptor()
Gets the descriptor for this instance. |
UserProperty |
reconfigure(org.kohsuke.stapler.StaplerRequest 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient User user
Constructor Detail |
---|
public UserProperty()
Method Detail |
---|
public UserPropertyDescriptor getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass()==b.getClass() then
a.getDescriptor()==b.getDescriptor() must hold.
getDescriptor
in interface Describable<UserProperty>
public static DescriptorExtensionList<UserProperty,UserPropertyDescriptor> all()
UserPropertyDescriptor
s.
public UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException
ReconfigurableDescribable
The default implementation of this should be the following:
return form==null ? null : getDescriptor().newInstance(req, form);
reconfigure
in interface ReconfigurableDescribable<UserProperty>
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.
Descriptor.FormException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |