portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jy...@apache.org
Subject cvs commit: jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/controller SwitchServiceController.java SequenceServiceController.java
Date Tue, 16 Mar 2004 02:03:49 GMT
jyang       2004/03/15 18:03:49

  Modified:    cornerstone/src/java/org/apache/cornerstone/framework/service
                        BaseServiceManager.java
               cornerstone/src/java/org/apache/cornerstone/framework/service/controller
                        SwitchServiceController.java
                        SequenceServiceController.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.3       +5 -3      jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/BaseServiceManager.java
  
  Index: BaseServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/BaseServiceManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseServiceManager.java	8 Mar 2004 01:01:30 -0000	1.2
  +++ BaseServiceManager.java	16 Mar 2004 02:03:49 -0000	1.3
  @@ -20,6 +20,7 @@
   import java.util.Iterator;
   import java.util.Map;
   import java.util.Set;
  +import org.apache.cornerstone.framework.api.implementation.IImplementationManager;
   import org.apache.cornerstone.framework.api.implementation.ImplementationException;
   import org.apache.cornerstone.framework.api.registry.IRegistry;
   import org.apache.cornerstone.framework.api.service.IService;
  @@ -71,7 +72,7 @@
   	public void init()
   	{
   		super.init();
  -		_registry = Cornerstone.getRegistry();
  +		_registry = (IRegistry) Cornerstone.getImplementation(IRegistry.class);
   		_serviceDomainName = getConfigProperty(CONFIG_SERVICE_REGISTRY_DOMAIN_NAME);
   		_serviceInterfaceName = getConfigProperty(CONFIG_SERVICE_REGISTRY_INTERFACE_NAME);
   		initServices();    
  @@ -97,7 +98,8 @@
   
   		try
   		{
  -			IService service = (IService) Cornerstone.getImplementationManager().createImplementation(IService.class,
logicalName);
  +			IImplementationManager implementationManager = (IImplementationManager) Cornerstone.getImplementation(IImplementationManager.class);
  +			IService service = (IService) implementationManager.createImplementation(IService.class,
logicalName);
               service.setName(logicalName);   // overwrite class name with logical name
       		return service;
   		}
  
  
  
  1.4       +4 -2      jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/controller/SwitchServiceController.java
  
  Index: SwitchServiceController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/controller/SwitchServiceController.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SwitchServiceController.java	8 Mar 2004 01:00:50 -0000	1.3
  +++ SwitchServiceController.java	16 Mar 2004 02:03:49 -0000	1.4
  @@ -18,6 +18,7 @@
   
   import org.apache.cornerstone.framework.api.context.IContext;
   import org.apache.cornerstone.framework.api.service.IService;
  +import org.apache.cornerstone.framework.api.service.IServiceManager;
   import org.apache.cornerstone.framework.api.service.ServiceException;
   import org.apache.cornerstone.framework.constant.Constant;
   import org.apache.cornerstone.framework.init.Cornerstone;
  @@ -66,7 +67,8 @@
               switchCase = SWITCH + Constant.DOT + CASE + Constant.DOT + switchConditionValue
+ Constant.DOT + Constant.PARENT_NAME;
           }
           String serviceName = getConfigProperty(switchCase);
  -        IService service = Cornerstone.getServiceManager().createServiceByName(serviceName);
  +        IServiceManager serviceManager = (IServiceManager) Cornerstone.getImplementation(IServiceManager.class);
  +        IService service = serviceManager.createServiceByName(serviceName);
           if (service != null)
               return service.invoke(context);
           else
  
  
  
  1.3       +4 -3      jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/controller/SequenceServiceController.java
  
  Index: SequenceServiceController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/service/controller/SequenceServiceController.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SequenceServiceController.java	8 Mar 2004 01:00:50 -0000	1.2
  +++ SequenceServiceController.java	16 Mar 2004 02:03:49 -0000	1.3
  @@ -18,10 +18,10 @@
   
   import java.util.ArrayList;
   import java.util.List;
  -
   import org.apache.cornerstone.framework.api.context.IContext;
   import org.apache.cornerstone.framework.api.service.IService;
   import org.apache.cornerstone.framework.api.service.IServiceDescriptor;
  +import org.apache.cornerstone.framework.api.service.IServiceManager;
   import org.apache.cornerstone.framework.api.service.ServiceException;
   import org.apache.cornerstone.framework.constant.Constant;
   import org.apache.cornerstone.framework.init.Cornerstone;
  @@ -83,7 +83,8 @@
               {
                   String sequenceElemetnName = (String) serviceNameList.get(i);
                   String serviceLogicalName = getConfigProperty(CONFIG_SEQUENCE, sequenceElemetnName,
Constant.PARENT_NAME);
  -                _serviceList.add(Cornerstone.getServiceManager().createServiceByName(serviceLogicalName));
  +                IServiceManager serviceManager = (IServiceManager) Cornerstone.getImplementation(IServiceManager.class);
  +                _serviceList.add(serviceManager.createServiceByName(serviceLogicalName));
               }
           }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message