exposing the e-mail address to the API (#1108)

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6359 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-12-21 17:22:46 +00:00
1 parent d56c6db027
commit f09983ec8f
2 files changed
+9

No files matched your search

@@ -139,6 +139,11 @@ public class User extends AbstractModelObject {
properties = ps;
save();
}
@Exported(name="properties")
public List<UserProperty> getAllProperties() {
return Collections.unmodifiableList(properties);
}
/**
* Gets the specific property, or null.
@@ -43,6 +43,8 @@ import org.apache.tools.ant.types.selectors.SelectorUtils;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.ExportedBean;
import org.kohsuke.stapler.export.Exported;
/**
* {@link Publisher} that sends the build result in e-mail.
@@ -346,6 +348,7 @@ public class Mailer extends Publisher {
/**
* Per user property that is e-mail address.
*/
@ExportedBean(defaultVisibility=2)
public static class UserProperty extends hudson.model.UserProperty {
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();
@@ -359,6 +362,7 @@ public class Mailer extends Publisher {
this.emailAddress = emailAddress;
}
@Exported
public String getAddress() {
if(emailAddress!=null)
return emailAddress;