1 4 package org.oddjob.designer.factory; 5 6 import java.util.ArrayList ; 7 import java.util.List ; 8 9 import org.oddjob.arooa.SimpleObjectFactory; 10 11 14 public class TypeDefinition { 15 16 private String tag; 17 private Class typeClass; 18 private List supports = new ArrayList (); 19 20 23 public String getTag() { 24 return tag; 25 } 26 29 public void setTag(String tag) { 30 this.tag = tag; 31 } 32 35 public String getClassname() { 36 return typeClass.getName(); 37 } 38 41 public void setClassname(String className) { 42 typeClass = SimpleObjectFactory.loadClass(className); 43 SimpleObjectFactory.checkTaskClass(typeClass); 44 } 45 46 public Class getTypeClass() { 47 return typeClass; 48 } 49 50 public void addConfiguredSupports(Supports supports) { 51 this.supports.add(supports.type); 52 } 53 54 public String [] getSupports() { 55 return (String []) supports.toArray(new String [0]); 56 } 57 58 public static class Supports { 59 String type; 60 61 public void setType(String type) { 62 this.type = type; 63 } 64 } 65 } 66 | Popular Tags |