Allowing job classes to specify the pronoun used to refer to it. This allows us to say "delete module", not "delete project", and so on in the UI.

See #502.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3191 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-04-21 15:07:57 +00:00
1 parent 9c45a0efa3
commit ecda49309b
6 files changed
+29 -2

No files matched your search

@@ -160,6 +160,11 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
return displayName;
}
@Override
public String getPronoun() {
return "Module";
}
public MavenModuleSet getParent() {
return (MavenModuleSet)super.getParent();
}
@@ -151,6 +151,15 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return Hudson.getInstance().getSlave(assignedNode);
}
/**
* Get the term used in the UI to represent this kind of {@link AbstractProject}.
* Must start with a capital letter.
*/
@Override
public String getPronoun() {
return "Project";
}
/**
* Gets the directory where the module is checked out.
*/
@@ -73,6 +73,11 @@ public class ExternalJob extends ViewJob<ExternalJob,ExternalRun> implements Top
public static final TopLevelItemDescriptor DESCRIPTOR = new DescriptorImpl();
@Override
public String getPronoun() {
return "Job";
}
public static final class DescriptorImpl extends TopLevelItemDescriptor {
private DescriptorImpl() {
super(ExternalJob.class);
+8
View File
@@ -130,6 +130,14 @@ public abstract class Job<JobT extends Job<JobT,RunT>, RunT extends Run<JobT,Run
return null;
}
/**
* Get the term used in the UI to represent this kind of {@link AbstractProject}.
* Must start with a capital letter.
*/
public String getPronoun() {
return "Project";
}
/**
* If true, it will keep all the build logs of dependency components.
*/