KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hudson > model > UserProperty


1 package hudson.model;
2
3 import hudson.ExtensionPoint;
4 import hudson.Plugin;
5 import hudson.tasks.Mailer;
6
7 /**
8  * Extensible property of {@link User}.
9  *
10  * <p>
11  * {@link Plugin}s can extend this to define custom properties
12  * for {@link User}s. {@link UserProperty}s show up in the user
13  * configuration screen, and they are persisted with the user object.
14  *
15  * <p>
16  * Configuration screen should be defined in <tt>config.jelly</tt>.
17  * Within this page, the {@link UserProperty} instance is available
18  * as <tt>instance</tt> variable (while <tt>it</tt> refers to {@link User}.
19  * See {@link Mailer.UserProperty}'s <tt>config.jelly</tt> for an example.
20  *
21  *
22  * @author Kohsuke Kawaguchi
23  * @see UserProperties#LIST
24  */

25 public abstract class UserProperty implements Describable<UserProperty>, ExtensionPoint {
26     /**
27      * The user object that owns this property.
28      * This value will be set by the Hudson code.
29      * Derived classes can expect this value to be always set.
30      */

31     protected transient User user;
32
33     /*package*/ final void setUser(User u) {
34         this.user = u;
35     }
36 }
37
Popular Tags