1 4 package org.oddjob.designer.elements.schedule; 5 6 import org.apache.log4j.Logger; 7 import org.oddjob.arooa.ArooaException; 8 import org.oddjob.arooa.ObjectFactory; 9 import org.oddjob.designer.factory.DesignFactoryBean; 10 import org.oddjob.designer.factory.SimpleHierarchy; 11 import org.oddjob.designer.model.DesignComponent; 12 import org.oddjob.designer.model.DesignElementType; 13 14 17 public class ScheduleFactory { 18 public static Logger logger = Logger.getLogger(ScheduleFactory.class); 19 20 private static DesignFactoryBean instance; 21 22 private static DesignFactoryBean getInstance() { 23 if (instance == null) { 24 instance = new DesignFactoryBean( 25 ScheduleFactory.class.getResourceAsStream("schedules.xml")); 26 } 27 return instance; 28 } 29 30 39 public static SimpleHierarchy childActions(final Object subject, final String element) { 40 return getInstance().childActions(subject, element); 41 } 42 43 51 public static DesignComponent createComponent(String name) throws ArooaException { 52 return getInstance().createComponent(name); 53 } 54 55 60 public static ObjectFactory componentFactory() { 61 return getInstance().componentFactory(); 62 } 63 64 70 public static String [] supportedTypes(Class type) { 71 return getInstance().supportedTypes(type); 72 } 73 74 public static String [] allTypes() { 75 return getInstance().allTypes(); 76 77 } 78 79 80 88 public static DesignElementType createType(String name) throws ArooaException { 89 return getInstance().createType(name); 90 } 91 92 public static ObjectFactory valueFactory() { 93 return getInstance().valueFactory(); 94 } 95 96 } 97 | Popular Tags |