1 5 package com.tc.capabilities; 6 7 import com.tc.util.factory.AbstractFactory; 8 9 public abstract class AbstractCapabilitiesFactory extends AbstractFactory { 10 private static Capabilities capabilitiesManager; 11 private static String FACTORY_SERVICE_ID = "com.tc.capabilities.CapabilitiesFactory"; 12 private static Class STANDARD_CAPABILITIES_FACTORY_CLASS = StandardCapabilitiesFactory.class; 13 14 public static AbstractCapabilitiesFactory getFactory() { 15 return (AbstractCapabilitiesFactory)getFactory(FACTORY_SERVICE_ID, STANDARD_CAPABILITIES_FACTORY_CLASS); 16 } 17 18 public abstract Capabilities createCapabilitiesManager(); 19 20 public static Capabilities getCapabilitiesManager() { 21 if(capabilitiesManager == null) { 22 capabilitiesManager = getFactory().createCapabilitiesManager(); 23 } 24 return capabilitiesManager; 25 } 26 } 27 | Popular Tags |