01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.capabilities;
06:
07: import com.tc.util.factory.AbstractFactory;
08:
09: public abstract class AbstractCapabilitiesFactory extends
10: AbstractFactory {
11: private static Capabilities capabilitiesManager;
12: private static String FACTORY_SERVICE_ID = "com.tc.capabilities.CapabilitiesFactory";
13: private static Class STANDARD_CAPABILITIES_FACTORY_CLASS = StandardCapabilitiesFactory.class;
14:
15: public static AbstractCapabilitiesFactory getFactory() {
16: return (AbstractCapabilitiesFactory) getFactory(
17: FACTORY_SERVICE_ID, STANDARD_CAPABILITIES_FACTORY_CLASS);
18: }
19:
20: public abstract Capabilities createCapabilitiesManager();
21:
22: public static Capabilities getCapabilitiesManager() {
23: if (capabilitiesManager == null) {
24: capabilitiesManager = getFactory()
25: .createCapabilitiesManager();
26: }
27: return capabilitiesManager;
28: }
29: }
|