View Javadoc
1 /* 2 * ManagerFactory.java 3 * 4 * Created on February 18, 2003, 8:23 PM 5 */ 6 7 package com.mlw.fps.model.manager; 8 9 import com.mlw.util.factory.Factory; 10 11 /*** 12 * 13 * @author Matthew Wilson 14 */ 15 public class ManagerFactory 16 { 17 private static Factory factory = new Factory(); 18 19 /*** Creates a new instance of ManagerFactory 20 */ 21 public ManagerFactory() 22 { 23 } 24 25 public static Object getNewInstance(String name) 26 { 27 try 28 { 29 Object object = factory.getObject(name); 30 if( object==null ) return null; 31 return object.getClass().newInstance(); 32 } 33 catch(Exception e) 34 { 35 e.printStackTrace(); 36 return null; 37 } 38 } 39 40 /*** Setter for property config. 41 * @param config New value of property config. 42 */ 43 public static void setConfig(String config) 44 { 45 factory.setConfig(config); 46 } 47 48 public static void init() throws Exception 49 { 50 factory.init(); 51 } 52 53 /*** Getter for property initialized. 54 * @return Value of property initialized. 55 */ 56 public static boolean isInitialized() 57 { 58 return factory.isInitialized(); 59 } 60 61 }

This page was automatically generated by Maven