hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/impl RegistryBuilder.java ModuleImpl.java
Date Wed, 09 Jun 2004 14:54:06 GMT
hlship      2004/06/09 07:54:06

  Modified:    framework/src/java/org/apache/hivemind/impl
                        RegistryBuilder.java ModuleImpl.java
  Log:
  Refactor some common utilities related to ids into a new class.
  
  Revision  Changes    Path
  1.11      +3 -19     jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryBuilder.java
  
  Index: RegistryBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryBuilder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RegistryBuilder.java	5 Jun 2004 19:09:12 -0000	1.10
  +++ RegistryBuilder.java	9 Jun 2004 14:54:06 -0000	1.11
  @@ -43,6 +43,7 @@
   import org.apache.hivemind.parse.InterceptorDescriptor;
   import org.apache.hivemind.parse.ModuleDescriptor;
   import org.apache.hivemind.parse.ServicePointDescriptor;
  +import org.apache.hivemind.util.IdUtils;
   import org.apache.hivemind.util.StringUtils;
   import org.apache.hivemind.util.URLResource;
   
  @@ -638,30 +639,13 @@
           sic.setFactoryServiceId(qualify(sourceModuleId, id.getFactoryServiceId()));
           sic.setLocation(id.getLocation());
   
  -        sic.setFollowingInterceptorIds(qualifyList(sourceModuleId, id.getBefore()));
  -        sic.setPrecedingInterceptorIds(qualifyList(sourceModuleId, id.getAfter()));
  +        sic.setFollowingInterceptorIds(IdUtils.qualifyList(sourceModuleId, id.getBefore()));
  +        sic.setPrecedingInterceptorIds(IdUtils.qualifyList(sourceModuleId, id.getAfter()));
   
           sic.setContributingModule(sourceModule);
           sic.setParameters(id.getParameters());
   
           sep.addInterceptorContribution(sic);
  -    }
  -
  -    /**
  -     * Qualifies a list of interceptor service ids provided for an interceptor
  -     * contribution.  The special value "*" is not qualified.
  -     */
  -    private String qualifyList(String sourceModuleId, String list)
  -    {
  -        if (HiveMind.isBlank(list) || list.equals("*"))
  -            return list;
  -
  -        String[] items = StringUtils.split(list);
  -
  -        for (int i = 0; i < items.length; i++)
  -            items[i] = qualify(sourceModuleId, items[i]);
  -
  -        return StringUtils.join(items, ',');
       }
   
       /**
  
  
  
  1.5       +5 -4      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/ModuleImpl.java
  
  Index: ModuleImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/ModuleImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ModuleImpl.java	18 May 2004 15:34:00 -0000	1.4
  +++ ModuleImpl.java	9 Jun 2004 14:54:06 -0000	1.5
  @@ -26,6 +26,7 @@
   import org.apache.hivemind.internal.ServiceModelFactory;
   import org.apache.hivemind.internal.ServicePoint;
   import org.apache.hivemind.schema.Translator;
  +import org.apache.hivemind.util.IdUtils;
   import org.apache.hivemind.util.ToStringBuilder;
   
   /**
  @@ -43,7 +44,7 @@
   
       public List getConfiguration(String extensionPointId)
       {
  -        String qualifiedId = HiveMind.qualify(_moduleId, extensionPointId);
  +        String qualifiedId = IdUtils.qualify(_moduleId, extensionPointId);
   
           return _registry.getConfiguration(qualifiedId);
       }
  @@ -55,7 +56,7 @@
   
       public Object getService(String serviceId, Class serviceInterface)
       {
  -        String qualifiedId = HiveMind.qualify(_moduleId, serviceId);
  +        String qualifiedId = IdUtils.qualify(_moduleId, serviceId);
   
           return _registry.getService(qualifiedId, serviceInterface);
       }
  @@ -105,7 +106,7 @@
   
       public ServicePoint getServicePoint(String serviceId)
       {
  -        String qualifiedId = HiveMind.qualify(_moduleId, serviceId);
  +        String qualifiedId = IdUtils.qualify(_moduleId, serviceId);
   
           return _registry.getServicePoint(qualifiedId);
       }
  
  
  

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


Mime
View raw message