1 package hudson.model; 2 3 import org.kohsuke.stapler.StaplerRequest; 4 5 import java.util.List ; 6 import java.util.ArrayList ; 7 8 13 public abstract class TopLevelItemDescriptor extends Descriptor<TopLevelItem> { 14 protected TopLevelItemDescriptor(Class <? extends TopLevelItem> clazz) { 15 super(clazz); 16 } 17 18 27 public abstract String getDisplayName(); 28 29 public final String getNewJobDetailPage() { 30 return '/'+clazz.getName().replace('.','/').replace('$','/')+"/newJobDetail.jelly"; 31 } 32 33 37 @Deprecated 38 public TopLevelItem newInstance(StaplerRequest req) throws FormException { 39 throw new UnsupportedOperationException (); 40 } 41 42 45 public abstract TopLevelItem newInstance(String name); 46 } 47 | Popular Tags |