juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svi...@apache.org
Subject cvs commit: ws-juddi/src/java/org/apache/juddi/registry RegistryEngine.java
Date Sun, 04 Apr 2004 15:22:44 GMT
sviens      2004/04/04 08:22:44

  Modified:    src/java/org/apache/juddi/function
                        FindPublisherFunction.java AbstractFunction.java
                        GetPublisherAssertionsFunction.java
                        SaveTModelFunction.java SaveBusinessFunction.java
                        DiscardAuthTokenFunction.java
                        GetTModelDetailFunction.java
                        GetServiceDetailFunction.java
                        DeleteTModelFunction.java
                        DeleteServiceFunction.java
                        GetAssertionStatusReportFunction.java
                        FindServiceFunction.java
                        GetRegisteredInfoFunction.java
                        GetAuthTokenFunction.java SaveServiceFunction.java
                        FindTModelFunction.java
                        DeletePublisherFunction.java FunctionMaker.java
                        GetBusinessDetailFunction.java
                        SetPublisherAssertionsFunction.java
                        FindRelatedBusinessesFunction.java
                        GetBindingDetailFunction.java
                        GetPublisherDetailFunction.java
                        AddPublisherAssertionsFunction.java
                        GetBusinessDetailExtFunction.java
                        FindBusinessFunction.java
                        DeletePublisherAssertionsFunction.java
                        SaveBindingFunction.java FindBindingFunction.java
                        ValidateValuesFunction.java
                        DeleteBusinessFunction.java
                        DeleteBindingFunction.java
                        SavePublisherFunction.java
               src/java/org/apache/juddi/registry RegistryEngine.java
  Log:
  Removed the unnecessary use of the Singleton pattern from FunctionMaker.
  
  Revision  Changes    Path
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/FindPublisherFunction.java
  
  Index: FindPublisherFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FindPublisherFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FindPublisherFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FindPublisherFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.juddi.error.NameTooLongException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UnsupportedException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -55,9 +56,9 @@
     /**
      *
      */
  -  public FindPublisherFunction()
  +  public FindPublisherFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +28 -0     ws-juddi/src/java/org/apache/juddi/function/AbstractFunction.java
  
  Index: AbstractFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/AbstractFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractFunction.java	11 Mar 2004 18:06:14 -0000	1.2
  +++ AbstractFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -21,12 +21,40 @@
   import org.apache.juddi.error.AuthTokenExpiredException;
   import org.apache.juddi.error.AuthTokenRequiredException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   
   /**
    * @author Steve Viens (sviens@apache.org)
    */
   public abstract class AbstractFunction implements IFunction
   {
  +  // protected reference to parent Registry instance
  +  protected RegistryEngine registry = null;
  +
  +  /**
  +   * @param registry
  +   */
  +  protected AbstractFunction(RegistryEngine registry)
  +  {
  +  	this.registry = registry;
  +  }
  +  
  +  /**
  +   * @return
  +   */
  +  public RegistryEngine getRegistry()
  +  {
  +  	return this.registry;
  +  }
  +  
  +  /**
  +   * @param registry
  +   */
  +  public void setRegistry(RegistryEngine registry)
  +  {
  +    this.registry = registry;
  +  }
  +
     /**
      * Verify the authentication parameters.
      */
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetPublisherAssertionsFunction.java
  
  Index: GetPublisherAssertionsFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetPublisherAssertionsFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetPublisherAssertionsFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetPublisherAssertionsFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -27,6 +27,7 @@
   import org.apache.juddi.datatype.request.GetPublisherAssertions;
   import org.apache.juddi.datatype.response.PublisherAssertions;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -40,9 +41,9 @@
     /**
      *
      */
  -  public GetPublisherAssertionsFunction()
  +  public GetPublisherAssertionsFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +4 -3      ws-juddi/src/java/org/apache/juddi/function/SaveTModelFunction.java
  
  Index: SaveTModelFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/SaveTModelFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SaveTModelFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ SaveTModelFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -31,6 +31,7 @@
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UnsupportedException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   import org.apache.juddi.uuidgen.UUIDGen;
   import org.apache.juddi.uuidgen.UUIDGenFactory;
  @@ -46,9 +47,9 @@
     /**
      *
      */
  -  public SaveTModelFunction()
  +  public SaveTModelFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -115,7 +116,7 @@
           // Everything checks out so let's save it. First store
           // 'authorizedName' and 'operator' values in each TModel.
           tModel.setAuthorizedName(authorizedName);
  -        tModel.setOperator(org.apache.juddi.util.Config.getOperator());
  +        tModel.setOperator(Config.getOperator());
           dataStore.saveTModel(tModel,publisherID);
         }
   
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/SaveBusinessFunction.java
  
  Index: SaveBusinessFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/SaveBusinessFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SaveBusinessFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ SaveBusinessFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -41,6 +41,7 @@
   import org.apache.juddi.error.UnsupportedException;
   import org.apache.juddi.error.UserMismatchException;
   import org.apache.juddi.handler.BusinessEntityHandler;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   import org.apache.juddi.uuidgen.UUIDGen;
   import org.apache.juddi.uuidgen.UUIDGenFactory;
  @@ -56,9 +57,9 @@
     /**
      *
      */
  -  public SaveBusinessFunction()
  +  public SaveBusinessFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +6 -5      ws-juddi/src/java/org/apache/juddi/function/DiscardAuthTokenFunction.java
  
  Index: DiscardAuthTokenFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DiscardAuthTokenFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DiscardAuthTokenFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ DiscardAuthTokenFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -29,6 +29,7 @@
   import org.apache.juddi.datatype.response.Result;
   import org.apache.juddi.error.AuthTokenRequiredException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -42,9 +43,9 @@
     /**
      *
      */
  -  public DiscardAuthTokenFunction()
  +  public DiscardAuthTokenFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -126,19 +127,19 @@
         GetAuthToken getRequest = new GetAuthToken("sviens","password");
   
         // invoke the server
  -      AuthToken getResponse = (AuthToken)(new GetAuthTokenFunction().execute(getRequest));
  +      AuthToken getResponse = (AuthToken)(new GetAuthTokenFunction(reg).execute(getRequest));
   
         // create a request
         DiscardAuthToken discardRequest1 = new DiscardAuthToken(getResponse.getAuthInfo());
         // invoke the server with a valid AuthToken value
  -      DispositionReport discardResponse = (DispositionReport)(new DiscardAuthTokenFunction().execute(discardRequest1));
  +      DispositionReport discardResponse = (DispositionReport)(new DiscardAuthTokenFunction(reg).execute(discardRequest1));
         System.out.println("errno: "+discardResponse.toString());
   
         // create a request
         DiscardAuthToken discardRequest2 = new DiscardAuthToken();
         discardRequest2.setAuthInfo(new AuthInfo("**-BadAuthToken-**"));
         // invoke the server with an invalid AuthToken value
  -      DispositionReport discardResponse2 = (DispositionReport)(new DiscardAuthTokenFunction().execute(discardRequest2));
  +      DispositionReport discardResponse2 = (DispositionReport)(new DiscardAuthTokenFunction(reg).execute(discardRequest2));
         System.out.println("errno: "+discardResponse2.toString());
       }
       catch (Exception ex)
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetTModelDetailFunction.java
  
  Index: GetTModelDetailFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetTModelDetailFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetTModelDetailFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetTModelDetailFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -26,6 +26,7 @@
   import org.apache.juddi.datatype.response.TModelDetail;
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -39,9 +40,9 @@
     /**
      *
      */
  -  public GetTModelDetailFunction()
  +  public GetTModelDetailFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +4 -2      ws-juddi/src/java/org/apache/juddi/function/GetServiceDetailFunction.java
  
  Index: GetServiceDetailFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetServiceDetailFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetServiceDetailFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetServiceDetailFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -26,7 +26,9 @@
   import org.apache.juddi.datatype.response.ServiceDetail;
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
  +;
   
   /**
    * @author Steve Viens (sviens@apache.org)
  @@ -39,9 +41,9 @@
     /**
      *
      */
  -  public GetServiceDetailFunction()
  +  public GetServiceDetailFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +4 -3      ws-juddi/src/java/org/apache/juddi/function/DeleteTModelFunction.java
  
  Index: DeleteTModelFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteTModelFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeleteTModelFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ DeleteTModelFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -43,9 +44,9 @@
     /**
      *
      */
  -  public DeleteTModelFunction()
  +  public DeleteTModelFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -151,7 +152,7 @@
         DeleteTModel request = new DeleteTModel();
   
         // invoke the server
  -      DispositionReport response = (DispositionReport)(new DeleteTModelFunction().execute(request));
  +      DispositionReport response = (DispositionReport)(new DeleteTModelFunction(reg).execute(request));
         System.out.println("errno: "+response.toString());
       }
       catch (Exception ex)
  
  
  
  1.3       +4 -3      ws-juddi/src/java/org/apache/juddi/function/DeleteServiceFunction.java
  
  Index: DeleteServiceFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteServiceFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeleteServiceFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ DeleteServiceFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -43,9 +44,9 @@
     /**
      *
      */
  -  public DeleteServiceFunction()
  +  public DeleteServiceFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -149,7 +150,7 @@
         DeleteService request = new DeleteService();
   
         // invoke the server
  -      DispositionReport response = (DispositionReport)(new DeleteServiceFunction().execute(request));
  +      DispositionReport response = (DispositionReport)(new DeleteServiceFunction(reg).execute(request));
         System.out.println("errno: "+response.toString());
       }
       catch (Exception ex)
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetAssertionStatusReportFunction.java
  
  Index: GetAssertionStatusReportFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetAssertionStatusReportFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetAssertionStatusReportFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetAssertionStatusReportFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -25,6 +25,7 @@
   import org.apache.juddi.datatype.request.GetAssertionStatusReport;
   import org.apache.juddi.datatype.response.AssertionStatusReport;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -38,9 +39,9 @@
     /**
      *
      */
  -  public GetAssertionStatusReportFunction()
  +  public GetAssertionStatusReportFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +6 -5      ws-juddi/src/java/org/apache/juddi/function/FindServiceFunction.java
  
  Index: FindServiceFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FindServiceFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FindServiceFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FindServiceFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -34,6 +34,7 @@
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.TooManyOptionsException;
   import org.apache.juddi.error.UnsupportedException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -47,9 +48,9 @@
     /**
      *
      */
  -  public FindServiceFunction()
  +  public FindServiceFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -96,14 +97,14 @@
         {
           // only allowed to specify a maximum of 5 names (implementation
           // dependent).  This value is configurable in jUDDI.
  -        int maxNames = org.apache.juddi.util.Config.getMaxNameElementsAllowed();
  +        int maxNames = Config.getMaxNameElementsAllowed();
           if ((nameVector != null) && (nameVector.size() > maxNames))
             throw new TooManyOptionsException("max = "+maxNames);
   
           // names can not exceed the maximum character length specified by the
           // UDDI specification (v2.0 specifies a max character length of 255). This
           // value is configurable in jUDDI.
  -        int maxNameLength = org.apache.juddi.util.Config.getMaxNameLength();
  +        int maxNameLength = Config.getMaxNameLength();
           for (int i=0; i<nameVector.size(); i++)
           {
             String name = ((Name)nameVector.elementAt(i)).getValue();
  @@ -223,7 +224,7 @@
         request.setTModelBag(bag);
   
         // invoke the server
  -      ServiceList response = (ServiceList) (new FindServiceFunction().execute(request));
  +      ServiceList response = (ServiceList) (new FindServiceFunction(reg).execute(request));
   
         System.out.println(response);
       }
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetRegisteredInfoFunction.java
  
  Index: GetRegisteredInfoFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetRegisteredInfoFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetRegisteredInfoFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetRegisteredInfoFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -29,6 +29,7 @@
   import org.apache.juddi.datatype.response.RegisteredInfo;
   import org.apache.juddi.datatype.response.TModelInfos;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -42,9 +43,9 @@
     /**
      *
      */
  -  public GetRegisteredInfoFunction()
  +  public GetRegisteredInfoFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +5 -5      ws-juddi/src/java/org/apache/juddi/function/GetAuthTokenFunction.java
  
  Index: GetAuthTokenFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetAuthTokenFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetAuthTokenFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetAuthTokenFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -42,9 +42,9 @@
     /**
      *
      */
  -  public GetAuthTokenFunction()
  +  public GetAuthTokenFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -132,20 +132,20 @@
       {
         // valid request
         GetAuthToken request = new GetAuthToken("sviens","password");
  -      AuthToken response = (AuthToken)(new GetAuthTokenFunction().execute(request));
  +      AuthToken response = (AuthToken)(new GetAuthTokenFunction(reg).execute(request));
         System.out.println("Function: getAuthToken(sviens/password)");
         System.out.println(" AuthInfo: "+response.getAuthInfo());
   
         // invalid (unknown user) request
         request = new GetAuthToken("jdoe","password");
         System.out.println("Function: getAuthToken(jdoe/password)");
  -      response = (AuthToken)(new GetAuthTokenFunction().execute(request));
  +      response = (AuthToken)(new GetAuthTokenFunction(reg).execute(request));
         System.out.println(" AuthInfo: "+response.getAuthInfo());
   
         // invalid (invalid credential) request
         request = new GetAuthToken("guest","password");
         System.out.println("Function: getAuthToken(guest/password)");
  -      response = (AuthToken)(new GetAuthTokenFunction().execute(request));
  +      response = (AuthToken)(new GetAuthTokenFunction(reg).execute(request));
         System.out.println(" AuthInfo: "+response.getAuthInfo());
       }
       catch (Exception ex)
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/SaveServiceFunction.java
  
  Index: SaveServiceFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/SaveServiceFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SaveServiceFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ SaveServiceFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -38,6 +38,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   import org.apache.juddi.uuidgen.UUIDGen;
   import org.apache.juddi.uuidgen.UUIDGenFactory;
  @@ -53,9 +54,9 @@
     /**
      *
      */
  -  public SaveServiceFunction()
  +  public SaveServiceFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +4 -3      ws-juddi/src/java/org/apache/juddi/function/FindTModelFunction.java
  
  Index: FindTModelFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FindTModelFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FindTModelFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FindTModelFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -32,6 +32,7 @@
   import org.apache.juddi.error.NameTooLongException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UnsupportedException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -45,9 +46,9 @@
     /**
      *
      */
  -  public FindTModelFunction()
  +  public FindTModelFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -94,7 +95,7 @@
           // names can not exceed the maximum character length specified by the
           // UDDI specification (v2.0 specifies a max character length of 255). This
           // value is configurable in jUDDI.
  -        int maxNameLength = org.apache.juddi.util.Config.getMaxNameLength();
  +        int maxNameLength = Config.getMaxNameLength();
           if (name.length() > maxNameLength)
             throw new NameTooLongException("Name: '"+name+"' (max="+maxNameLength+")");
         }
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/DeletePublisherFunction.java
  
  Index: DeletePublisherFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeletePublisherFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeletePublisherFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ DeletePublisherFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -28,6 +28,7 @@
   import org.apache.juddi.datatype.response.DispositionReport;
   import org.apache.juddi.datatype.response.Result;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -41,9 +42,9 @@
     /**
      *
      */
  -  public DeletePublisherFunction()
  +  public DeletePublisherFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +129 -58   ws-juddi/src/java/org/apache/juddi/function/FunctionMaker.java
  
  Index: FunctionMaker.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FunctionMaker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FunctionMaker.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FunctionMaker.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -50,6 +50,7 @@
   import org.apache.juddi.datatype.request.SaveTModel;
   import org.apache.juddi.datatype.request.SetPublisherAssertions;
   import org.apache.juddi.datatype.request.ValidateValues;
  +import org.apache.juddi.registry.RegistryEngine;
   
   /**
    * Holds a static HashMap linking the string representation of operations to
  @@ -62,137 +63,207 @@
    */
   public class FunctionMaker
   {
  -  // private reference to the jUDDI logger
  +  // private reference to the logger
     private static Log log = LogFactory.getLog(FunctionMaker.class);
   
  -  // shared FunctionMaker
  -  private static FunctionMaker maker = null;
  -
     // table of shared Function instances
     private HashMap functions = null;
   
     /**
      *
      */
  -  private FunctionMaker()
  +  public FunctionMaker(RegistryEngine registry)
     {
       functions = new HashMap();
       IFunction function = null;
   
  -    function = new AddPublisherAssertionsFunction();
  +//    function = new AddPublisherAssertionsFunction();
  +//    functions.put(AddPublisherAssertions.class.getName(),function);
  +//
  +//    function = new DeleteBindingFunction();
  +//    functions.put(DeleteBinding.class.getName(),function);
  +//
  +//    function = new DeleteBusinessFunction();
  +//    functions.put(DeleteBusiness.class.getName(),function);
  +//
  +//    function = new DeletePublisherAssertionsFunction();
  +//    functions.put(DeletePublisherAssertions.class.getName(),function);
  +//
  +//    function = new DeletePublisherFunction();
  +//    functions.put(DeletePublisher.class.getName(),function);
  +//
  +//    function = new DeleteServiceFunction();
  +//    functions.put(DeleteService.class.getName(),function);
  +//
  +//    function = new DeleteTModelFunction();
  +//    functions.put(DeleteTModel.class.getName(),function);
  +//
  +//    function = new DiscardAuthTokenFunction();
  +//    functions.put(DiscardAuthToken.class.getName(),function);
  +//
  +//    function = new FindBindingFunction();
  +//    functions.put(FindBinding.class.getName(),function);
  +//
  +//    function = new FindBusinessFunction();
  +//    functions.put(FindBusiness.class.getName(),function);
  +//
  +//    function = new FindPublisherFunction();
  +//    functions.put(FindPublisher.class.getName(),function);
  +//
  +//    function = new FindRelatedBusinessesFunction();
  +//    functions.put(FindRelatedBusinesses.class.getName(),function);
  +//
  +//    function = new FindServiceFunction();
  +//    functions.put(FindService.class.getName(),function);
  +//
  +//    function = new FindTModelFunction();
  +//    functions.put(FindTModel.class.getName(),function);
  +//
  +//    function = new GetAssertionStatusReportFunction();
  +//    functions.put(GetAssertionStatusReport.class.getName(),function);
  +//
  +//    function = new GetAuthTokenFunction();
  +//    functions.put(GetAuthToken.class.getName(),function);
  +//
  +//    function = new GetBindingDetailFunction();
  +//    functions.put(GetBindingDetail.class.getName(),function);
  +//
  +//    function = new GetBusinessDetailFunction();
  +//    functions.put(GetBusinessDetail.class.getName(),function);
  +//
  +//    function = new GetBusinessDetailExtFunction();
  +//    functions.put(GetBusinessDetailExt.class.getName(),function);
  +//
  +//    function = new GetPublisherAssertionsFunction();
  +//    functions.put(GetPublisherAssertions.class.getName(),function);
  +//
  +//    function = new GetPublisherDetailFunction();
  +//    functions.put(GetPublisherDetail.class.getName(),function);
  +//
  +//    function = new GetRegisteredInfoFunction();
  +//    functions.put(GetRegisteredInfo.class.getName(),function);
  +//
  +//    function = new GetServiceDetailFunction();
  +//    functions.put(GetServiceDetail.class.getName(),function);
  +//
  +//    function = new GetTModelDetailFunction();
  +//    functions.put(GetTModelDetail.class.getName(),function);
  +//
  +//    function = new SaveBindingFunction();
  +//    functions.put(SaveBinding.class.getName(),function);
  +//
  +//    function = new SaveBusinessFunction();
  +//    functions.put(SaveBusiness.class.getName(),function);
  +//
  +//    function = new SavePublisherFunction();
  +//    functions.put(SavePublisher.class.getName(),function);
  +//
  +//    function = new SaveServiceFunction();
  +//    functions.put(SaveService.class.getName(),function);
  +//
  +//    function = new SaveTModelFunction();
  +//    functions.put(SaveTModel.class.getName(),function);
  +//
  +//    function = new SetPublisherAssertionsFunction();
  +//    functions.put(SetPublisherAssertions.class.getName(),function);
  +//
  +//    function = new ValidateValuesFunction();
  +//    functions.put(ValidateValues.class.getName(),function);
  +//
  +//    /** **/
  +    
  +    function = new AddPublisherAssertionsFunction(registry);
       functions.put(AddPublisherAssertions.class.getName(),function);
   
  -    function = new DeleteBindingFunction();
  +    function = new DeleteBindingFunction(registry);
       functions.put(DeleteBinding.class.getName(),function);
   
  -    function = new DeleteBusinessFunction();
  +    function = new DeleteBusinessFunction(registry);
       functions.put(DeleteBusiness.class.getName(),function);
   
  -    function = new DeletePublisherAssertionsFunction();
  +    function = new DeletePublisherAssertionsFunction(registry);
       functions.put(DeletePublisherAssertions.class.getName(),function);
   
  -    function = new DeletePublisherFunction();
  +    function = new DeletePublisherFunction(registry);
       functions.put(DeletePublisher.class.getName(),function);
   
  -    function = new DeleteServiceFunction();
  +    function = new DeleteServiceFunction(registry);
       functions.put(DeleteService.class.getName(),function);
   
  -    function = new DeleteTModelFunction();
  +    function = new DeleteTModelFunction(registry);
       functions.put(DeleteTModel.class.getName(),function);
   
  -    function = new DiscardAuthTokenFunction();
  +    function = new DiscardAuthTokenFunction(registry);
       functions.put(DiscardAuthToken.class.getName(),function);
   
  -    function = new FindBindingFunction();
  +    function = new FindBindingFunction(registry);
       functions.put(FindBinding.class.getName(),function);
   
  -    function = new FindBusinessFunction();
  +    function = new FindBusinessFunction(registry);
       functions.put(FindBusiness.class.getName(),function);
   
  -    function = new FindPublisherFunction();
  +    function = new FindPublisherFunction(registry);
       functions.put(FindPublisher.class.getName(),function);
   
  -    function = new FindRelatedBusinessesFunction();
  +    function = new FindRelatedBusinessesFunction(registry);
       functions.put(FindRelatedBusinesses.class.getName(),function);
   
  -    function = new FindServiceFunction();
  +    function = new FindServiceFunction(registry);
       functions.put(FindService.class.getName(),function);
   
  -    function = new FindTModelFunction();
  +    function = new FindTModelFunction(registry);
       functions.put(FindTModel.class.getName(),function);
   
  -    function = new GetAssertionStatusReportFunction();
  +    function = new GetAssertionStatusReportFunction(registry);
       functions.put(GetAssertionStatusReport.class.getName(),function);
   
  -    function = new GetAuthTokenFunction();
  +    function = new GetAuthTokenFunction(registry);
       functions.put(GetAuthToken.class.getName(),function);
   
  -    function = new GetBindingDetailFunction();
  +    function = new GetBindingDetailFunction(registry);
       functions.put(GetBindingDetail.class.getName(),function);
   
  -    function = new GetBusinessDetailFunction();
  +    function = new GetBusinessDetailFunction(registry);
       functions.put(GetBusinessDetail.class.getName(),function);
   
  -    function = new GetBusinessDetailExtFunction();
  +    function = new GetBusinessDetailExtFunction(registry);
       functions.put(GetBusinessDetailExt.class.getName(),function);
   
  -    function = new GetPublisherAssertionsFunction();
  +    function = new GetPublisherAssertionsFunction(registry);
       functions.put(GetPublisherAssertions.class.getName(),function);
   
  -    function = new GetPublisherDetailFunction();
  +    function = new GetPublisherDetailFunction(registry);
       functions.put(GetPublisherDetail.class.getName(),function);
   
  -    function = new GetRegisteredInfoFunction();
  +    function = new GetRegisteredInfoFunction(registry);
       functions.put(GetRegisteredInfo.class.getName(),function);
   
  -    function = new GetServiceDetailFunction();
  +    function = new GetServiceDetailFunction(registry);
       functions.put(GetServiceDetail.class.getName(),function);
   
  -    function = new GetTModelDetailFunction();
  +    function = new GetTModelDetailFunction(registry);
       functions.put(GetTModelDetail.class.getName(),function);
   
  -    function = new SaveBindingFunction();
  +    function = new SaveBindingFunction(registry);
       functions.put(SaveBinding.class.getName(),function);
   
  -    function = new SaveBusinessFunction();
  +    function = new SaveBusinessFunction(registry);
       functions.put(SaveBusiness.class.getName(),function);
   
  -    function = new SavePublisherFunction();
  +    function = new SavePublisherFunction(registry);
       functions.put(SavePublisher.class.getName(),function);
   
  -    function = new SaveServiceFunction();
  +    function = new SaveServiceFunction(registry);
       functions.put(SaveService.class.getName(),function);
   
  -    function = new SaveTModelFunction();
  +    function = new SaveTModelFunction(registry);
       functions.put(SaveTModel.class.getName(),function);
   
  -    function = new SetPublisherAssertionsFunction();
  +    function = new SetPublisherAssertionsFunction(registry);
       functions.put(SetPublisherAssertions.class.getName(),function);
   
  -    function = new ValidateValuesFunction();
  +    function = new ValidateValuesFunction(registry);
       functions.put(ValidateValues.class.getName(),function);
  -  }
  -
  -  /**
  -   *
  -   */
  -  public static FunctionMaker getInstance()
  -  {
  -    if (maker == null)
  -      maker = createInstance();
  -
  -    return maker;
  -  }
  -
  -  /**
  -   *
  -   */
  -  private static synchronized FunctionMaker createInstance()
  -  {
  -    if (maker == null)
  -      maker = new FunctionMaker();
  -
  -    return maker;
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetBusinessDetailFunction.java
  
  Index: GetBusinessDetailFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetBusinessDetailFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetBusinessDetailFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetBusinessDetailFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -26,6 +26,7 @@
   import org.apache.juddi.datatype.response.BusinessDetail;
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -39,9 +40,9 @@
     /**
      *
      */
  -  public GetBusinessDetailFunction()
  +  public GetBusinessDetailFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/SetPublisherAssertionsFunction.java
  
  Index: SetPublisherAssertionsFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/SetPublisherAssertionsFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetPublisherAssertionsFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ SetPublisherAssertionsFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -27,6 +27,7 @@
   import org.apache.juddi.datatype.request.SetPublisherAssertions;
   import org.apache.juddi.datatype.response.PublisherAssertions;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -40,9 +41,9 @@
     /**
      *
      */
  -  public SetPublisherAssertionsFunction()
  +  public SetPublisherAssertionsFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -3      ws-juddi/src/java/org/apache/juddi/function/FindRelatedBusinessesFunction.java
  
  Index: FindRelatedBusinessesFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FindRelatedBusinessesFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FindRelatedBusinessesFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FindRelatedBusinessesFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -28,9 +28,9 @@
   import org.apache.juddi.datatype.response.RelatedBusinessInfos;
   import org.apache.juddi.datatype.response.RelatedBusinessesList;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
  -
   /**
    * @author Steve Viens (sviens@apache.org)
    */
  @@ -42,9 +42,9 @@
     /**
      *
      */
  -  public FindRelatedBusinessesFunction()
  +  public FindRelatedBusinessesFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetBindingDetailFunction.java
  
  Index: GetBindingDetailFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetBindingDetailFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetBindingDetailFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetBindingDetailFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -26,6 +26,7 @@
   import org.apache.juddi.datatype.response.BindingDetail;
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -39,9 +40,9 @@
     /**
      *
      */
  -  public GetBindingDetailFunction()
  +  public GetBindingDetailFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetPublisherDetailFunction.java
  
  Index: GetPublisherDetailFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetPublisherDetailFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetPublisherDetailFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetPublisherDetailFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -26,6 +26,7 @@
   import org.apache.juddi.datatype.response.PublisherDetail;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UnknownUserException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -39,9 +40,9 @@
     /**
      *
      */
  -  public GetPublisherDetailFunction()
  +  public GetPublisherDetailFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +4 -3      ws-juddi/src/java/org/apache/juddi/function/AddPublisherAssertionsFunction.java
  
  Index: AddPublisherAssertionsFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/AddPublisherAssertionsFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AddPublisherAssertionsFunction.java	11 Mar 2004 18:06:14 -0000	1.2
  +++ AddPublisherAssertionsFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -39,6 +39,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -48,13 +49,13 @@
   {
     // private reference to jUDDI Logger
     private static Log log = LogFactory.getLog(AddPublisherAssertionsFunction.class);
  -
  +  
     /**
      *
      */
  -  public AddPublisherAssertionsFunction()
  +  public AddPublisherAssertionsFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/GetBusinessDetailExtFunction.java
  
  Index: GetBusinessDetailExtFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/GetBusinessDetailExtFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetBusinessDetailExtFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ GetBusinessDetailExtFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -28,6 +28,7 @@
   import org.apache.juddi.datatype.response.BusinessDetailExt;
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -41,9 +42,9 @@
     /**
      *
      */
  -  public GetBusinessDetailExtFunction()
  +  public GetBusinessDetailExtFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +5 -4      ws-juddi/src/java/org/apache/juddi/function/FindBusinessFunction.java
  
  Index: FindBusinessFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FindBusinessFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FindBusinessFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FindBusinessFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -38,6 +38,7 @@
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.TooManyOptionsException;
   import org.apache.juddi.error.UnsupportedException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -69,9 +70,9 @@
     /**
      *
      */
  -  public FindBusinessFunction()
  +  public FindBusinessFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -128,7 +129,7 @@
           // names can not exceed the maximum character length specified by the
           // UDDI specification (v2.0 specifies a max character length of 255). This
           // value is configurable in jUDDI.
  -        int maxNameLength = org.apache.juddi.util.Config.getMaxNameLength();
  +        int maxNameLength = Config.getMaxNameLength();
           for (int i = 0; i < nameVector.size(); i++)
           {
             String name = ((Name) nameVector.elementAt(i)).getValue();
  @@ -316,7 +317,7 @@
   
         // invoke the server
         BusinessList response =
  -        (BusinessList) (new FindBusinessFunction().execute(request));
  +        (BusinessList) (new FindBusinessFunction(reg).execute(request));
         System.out.println(response);
       }
       catch (Exception ex)
  
  
  
  1.3       +8 -7      ws-juddi/src/java/org/apache/juddi/function/DeletePublisherAssertionsFunction.java
  
  Index: DeletePublisherAssertionsFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeletePublisherAssertionsFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeletePublisherAssertionsFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ DeletePublisherAssertionsFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -38,6 +38,7 @@
   import org.apache.juddi.datatype.response.Result;
   import org.apache.juddi.datatype.tmodel.TModel;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -51,9 +52,9 @@
     /**
      *
      */
  -  public DeletePublisherAssertionsFunction()
  +  public DeletePublisherAssertionsFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  @@ -135,7 +136,7 @@
       {
         // generate an AuthToken
         GetAuthToken authTokenRequest = new GetAuthToken("sviens","password");
  -      GetAuthTokenFunction authTokenService = new GetAuthTokenFunction();
  +      GetAuthTokenFunction authTokenService = new GetAuthTokenFunction(reg);
         AuthToken authToken = (AuthToken)authTokenService.execute(authTokenRequest);
         String authInfo = authToken.getAuthInfo().getValue();
   
  @@ -154,7 +155,7 @@
         SaveBusiness sbReq = new SaveBusiness();
         sbReq.setAuthInfo(new AuthInfo(authInfo));
         sbReq.setBusinessEntityVector(businessVector);
  -      BusinessDetail detail = (BusinessDetail)(new SaveBusinessFunction().execute(sbReq));
  +      BusinessDetail detail = (BusinessDetail)(new SaveBusinessFunction(reg).execute(sbReq));
         Vector detailVector = detail.getBusinessEntityVector();
         BusinessEntity b1 = (BusinessEntity)detailVector.elementAt(0);
         BusinessEntity b2 = (BusinessEntity)detailVector.elementAt(1);
  @@ -174,16 +175,16 @@
         AddPublisherAssertions apaReq = new AddPublisherAssertions();
         apaReq.setAuthInfo(new AuthInfo(authInfo));
         apaReq.setPublisherAssertionVector(assertionVector);
  -      DispositionReport dspRpt1 = (DispositionReport)(new AddPublisherAssertionsFunction().execute(apaReq));
  +      DispositionReport dspRpt1 = (DispositionReport)(new AddPublisherAssertionsFunction(reg).execute(apaReq));
         System.out.println("errno: "+dspRpt1.toString());
  -      DispositionReport dspRpt2 = (DispositionReport)(new AddPublisherAssertionsFunction().execute(apaReq));
  +      DispositionReport dspRpt2 = (DispositionReport)(new AddPublisherAssertionsFunction(reg).execute(apaReq));
         System.out.println("errno: "+dspRpt2.toString());
   
         // create an DeletePublisherAssertions request & invoke the server
         DeletePublisherAssertions dpaReq = new DeletePublisherAssertions();
         dpaReq.setAuthInfo(new AuthInfo(authInfo));
         dpaReq.setPublisherAssertionVector(assertionVector);
  -      DispositionReport response = (DispositionReport)(new DeletePublisherAssertionsFunction().execute(dpaReq));
  +      DispositionReport response = (DispositionReport)(new DeletePublisherAssertionsFunction(reg).execute(dpaReq));
         System.out.println("errno: "+response.toString());
       }
       catch (Exception ex)
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/SaveBindingFunction.java
  
  Index: SaveBindingFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/SaveBindingFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SaveBindingFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ SaveBindingFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   import org.apache.juddi.uuidgen.UUIDGen;
   import org.apache.juddi.uuidgen.UUIDGenFactory;
  @@ -45,9 +46,9 @@
     /**
      *
      */
  -  public SaveBindingFunction()
  +  public SaveBindingFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/FindBindingFunction.java
  
  Index: FindBindingFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/FindBindingFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FindBindingFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ FindBindingFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UnsupportedException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -43,9 +44,9 @@
     /**
      *
      */
  -  public FindBindingFunction()
  +  public FindBindingFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/ValidateValuesFunction.java
  
  Index: ValidateValuesFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/ValidateValuesFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ValidateValuesFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ ValidateValuesFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -22,6 +22,7 @@
   import org.apache.juddi.datatype.RegistryObject;
   import org.apache.juddi.datatype.request.ValidateValues;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   
   /**
    * @author Steve Viens (sviens@apache.org)
  @@ -34,9 +35,9 @@
     /**
      *
      */
  -  public ValidateValuesFunction()
  +  public ValidateValuesFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/DeleteBusinessFunction.java
  
  Index: DeleteBusinessFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteBusinessFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeleteBusinessFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ DeleteBusinessFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -43,9 +44,9 @@
     /**
      *
      */
  -  public DeleteBusinessFunction()
  +  public DeleteBusinessFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/DeleteBindingFunction.java
  
  Index: DeleteBindingFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteBindingFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeleteBindingFunction.java	11 Mar 2004 18:06:14 -0000	1.2
  +++ DeleteBindingFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -32,6 +32,7 @@
   import org.apache.juddi.error.InvalidKeyPassedException;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UserMismatchException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -45,9 +46,9 @@
     /**
      *
      */
  -  public DeleteBindingFunction()
  +  public DeleteBindingFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.3       +3 -2      ws-juddi/src/java/org/apache/juddi/function/SavePublisherFunction.java
  
  Index: SavePublisherFunction.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/SavePublisherFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SavePublisherFunction.java	11 Mar 2004 18:06:15 -0000	1.2
  +++ SavePublisherFunction.java	4 Apr 2004 15:22:43 -0000	1.3
  @@ -27,6 +27,7 @@
   import org.apache.juddi.datatype.request.SavePublisher;
   import org.apache.juddi.datatype.response.PublisherDetail;
   import org.apache.juddi.error.RegistryException;
  +import org.apache.juddi.registry.RegistryEngine;
   import org.apache.juddi.util.Config;
   
   /**
  @@ -40,9 +41,9 @@
     /**
      *
      */
  -  public SavePublisherFunction()
  +  public SavePublisherFunction(RegistryEngine registry)
     {
  -    super();
  +    super(registry);
     }
   
     /**
  
  
  
  1.5       +59 -23    ws-juddi/src/java/org/apache/juddi/registry/RegistryEngine.java
  
  Index: RegistryEngine.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/registry/RegistryEngine.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RegistryEngine.java	4 Apr 2004 04:00:48 -0000	1.4
  +++ RegistryEngine.java	4 Apr 2004 15:22:44 -0000	1.5
  @@ -23,6 +23,8 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.juddi.datastore.DataStoreFactory;
   import org.apache.juddi.datatype.RegistryObject;
  +import org.apache.juddi.datatype.request.AuthInfo;
  +import org.apache.juddi.datatype.response.AuthToken;
   import org.apache.juddi.error.RegistryException;
   import org.apache.juddi.error.UnsupportedException;
   import org.apache.juddi.function.FunctionMaker;
  @@ -35,12 +37,36 @@
    */
   public class RegistryEngine extends AbstractRegistry
   {
  -  // private reference to the jUDDI logger
  -  private static Log log = LogFactory.getLog(RegistryEngine.class);
  -
     // jUDDI Registry Property File Name
     private static final String PROPFILE_NAME = "juddi.properties";
     
  +  // jUDDI Registry Property Names
  +  public static final String PROPNAME_OPERATOR = "juddi.operatorName";
  +  public static final String PROPNAME_MAX_NAME_ELEMENTS = "juddi.maxNameElementsAllowed";
  +  public static final String PROPNAME_MAX_NAME_LENGTH = "juddi.maxNameLength";    
  +  public static final String PROPNAME_OPERATOR_SITE_URL = "juddi.operatorSiteURL";
  +  public static final String PROPNAME_ADMIN_EMAIL_ADDRESS = "juddi.adminEmailAddress";
  +  public static final String PROPNAME_MAX_MESSAGE_SIZE = "juddi.maxMessageSize";
  +  public static final String PROPNAME_AUTH_CLASS_NAME = "juddi.auth";
  +  public static final String PROPNAME_DATASTORE_FACTORY_CLASS_NAME = "juddi.datastore";
  +  public static final String PROPNAME_CRYPTOR_CLASS_NAME = "juddi.cryptor";
  +  public static final String PROPNAME_UUIDGEN_CLASS_NAME = "juddi.uuidgen";
  +
  +  // jUDDI Registry Default Property Values
  +  public static final String DEFAULT_OPERATOR = "jUDDI.org";
  +  public static final int    DEFAULT_MAX_NAME_ELEMENTS = 5;
  +  public static final int    DEFAULT_MAX_NAME_LENGTH = 255;    
  +  public static final String DEFAULT_OPERATOR_SITE_URL = "http://localhost/juddi";
  +  public static final String DEFAULT_ADMIN_EMAIL_ADDRESS = "admin@juddi.org";
  +  public static final int    DEFAULT_MAX_MESSAGE_SIZE = 2097152;
  +  public static final String DEFAULT_AUTH_CLASS_NAME = "org.apache.juddi.auth.DefaultAuthenticator";
  +  public static final String DEFAULT_DATASTORE_FACTORY_CLASS_NAME = "org.apache.juddi.datastore.JDBCDataStoreFactory";
  +  public static final String DEFAULT_CRYPTOR_CLASS_NAME = "org.apache.juddi.cryptor.DefaultCryptor";
  +  public static final String DEFAULT_UUIDGEN_CLASS_NAME = "org.apache.juddi.uuidgen.DefaultUUIDGen";
  +
  +  // private reference to the jUDDI logger
  +  private static Log log = LogFactory.getLog(RegistryEngine.class);
  +
     // jUDDI Function maker
     private FunctionMaker maker = null;
   
  @@ -118,19 +144,18 @@
      */
     public void init()
     {
  -    // turn off registry access
  -
  +    // Turn off registry access
       isAvailable = false;
   
  -    // create, initialize and register
  +    // Create, initialize and register
       // the core jUDDI components.
  -
       DataStoreFactory.initFactory();
       
  -    this.maker = FunctionMaker.getInstance();
  -
  -    // turn on registry access
  +    // Grab a reference to the function
  +    // registry (hmm bad name choice).
  +    this.maker = new FunctionMaker(this);
   
  +    // Turn on registry access
       isAvailable = true;
     }
   
  @@ -140,12 +165,10 @@
      */
     public void dispose()
     {
  -    // turn off registry access
  -
  +    // Turn off registry access
       isAvailable = false;
   
  -    // call each sub-component's dispose methods
  -
  +    // Call each sub-component's dispose methods
       DataStoreFactory.destroyFactory();
     }
   
  @@ -184,19 +207,32 @@
     public static void main(String[] args)
       throws Exception
     {
  -    // okay, let's build the registry
  -    RegistryEngine registry = RegistryEngine.getInstance();
  +    // Option #1 (grabs properties from juddi.properties file)
  +    //RegistryEngine registry = new RegistryEngine();
  +    
  +    // Option #2 (provides properties in Properties instance)
  +    Properties props = new Properties();
  +    props.setProperty(RegistryEngine.PROPNAME_OPERATOR,"jUDDI.org");
  +    props.setProperty(RegistryEngine.PROPNAME_MAX_NAME_ELEMENTS,"5");
  +    props.setProperty(RegistryEngine.PROPNAME_MAX_NAME_LENGTH,"255");
  +    props.setProperty(RegistryEngine.PROPNAME_OPERATOR_SITE_URL,"http://localhost/juddi");
  +    props.setProperty(RegistryEngine.PROPNAME_ADMIN_EMAIL_ADDRESS,"admin@juddi.org");    
  +    props.setProperty(RegistryEngine.PROPNAME_MAX_MESSAGE_SIZE,"2097152");
  +    props.setProperty(RegistryEngine.PROPNAME_AUTH_CLASS_NAME,"org.apache.juddi.auth.DefaultAuthenticator");
  +    props.setProperty(RegistryEngine.PROPNAME_CRYPTOR_CLASS_NAME,"org.apache.juddi.cryptor.DefaultCryptor");
  +    props.setProperty(RegistryEngine.PROPNAME_UUIDGEN_CLASS_NAME,"org.apache.juddi.uuidgen.DefaultUUIDGen");
  +    RegistryEngine registry = new RegistryEngine(props);    
  +
  +    // initialize the registry
       registry.init();
   
  -    // dump all registry properties to the console
  +    // write all properties to the console
       System.out.println(Config.getProperties());
   
  -    // test the logger
  -    log.debug("log.debug");
  -    log.info("log.info");
  -    log.warn("log.warn");
  -    log.error("log.error");
  -    log.fatal("log.fatal");
  +    AuthToken authToken = registry.getAuthToken("sviens","password");
  +    AuthInfo authInfo = authToken.getAuthInfo();
  +
  +    System.out.println("AuthToken: "+authInfo.getValue());    
   
       // tear down the registry
       registry.dispose();
  
  
  

Mime
View raw message