jyang 2004/03/15 18:00:50
Modified: cornerstone/src/java/org/apache/cornerstone/framework/implementation
BaseImplementationManager.java
Log:
use mini implementation manager of Cornerstone
PR:
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.2 +22 -4
jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/implementation/BaseImplementationManager.java
Index: BaseImplementationManager.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/implementation/BaseImplementationManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseImplementationManager.java 2 Dec 2003 17:45:13 -0000 1.1
+++ BaseImplementationManager.java 16 Mar 2004 02:00:50 -0000 1.2
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.cornerstone.framework.implementation;
import java.util.*;
@@ -7,6 +23,7 @@
import org.apache.cornerstone.framework.api.implementation.ImplementationException;
import org.apache.cornerstone.framework.api.registry.IRegistry;
import org.apache.cornerstone.framework.api.registry.IRegistryEntry;
+import org.apache.cornerstone.framework.api.singleton.ISingletonManager;
import org.apache.cornerstone.framework.constant.Constant;
import org.apache.cornerstone.framework.core.BaseObject;
import org.apache.cornerstone.framework.init.Cornerstone;
@@ -39,7 +56,7 @@
{
super.init();
_implementationMap = new HashMap();
- _registry = Cornerstone.getRegistry();
+ _registry = (IRegistry) Cornerstone.getImplementation(IRegistry.class);
}
/* (non-Javadoc)
@@ -143,7 +160,8 @@
// "_.factory.className" is specified, create a new instance using
factory
try
{
- IFactory factory = (IFactory)
Cornerstone.getSingletonManager().getSingleton(factoryClassName);
+ ISingletonManager singletonManager = (ISingletonManager)
Cornerstone.getImplementation(ISingletonManager.class);
+ IFactory factory = (IFactory)
singletonManager.getSingleton(factoryClassName);
Object implementation = factory.createInstance();
overwriteConfig(implementation, instanceConfig);
return implementation;
@@ -201,5 +219,5 @@
private static Logger _Logger =
Logger.getLogger(BaseImplementationManager.class);
private static BaseImplementationManager _Singleton = new
BaseImplementationManager();
protected Map _implementationMap;
- protected IRegistry _registry = Cornerstone.getRegistry();
+ protected IRegistry _registry = (IRegistry)
Cornerstone.getImplementation(IRegistry.class);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]