Author: kstam
Date: Mon Jan  6 21:13:16 2014
New Revision: 1556033

URL: http://svn.apache.org/r1556033
Log:
JUDDI-637 Adding javadoc to client classes

Modified:
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIService.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/XRegistration.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/EmbeddedRegistry.java
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/JUDDIRegistry.java

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIService.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIService.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIService.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIService.java
 Mon Jan  6 21:13:16 2014
@@ -37,6 +37,11 @@ import org.uddi.v3_service.UDDIValueSetV
 
 
 /**
+ * The UDDIService is defined by the UDDI v3 specification as the Service from 
which
+ * all UDDI Ports can be obtained. All known ports: UDDICustodyPort, 
UDDIInquiryPort
+ * UDDIReplicationPort, UDDISecurityPort, UDDISubscriptionPort, 
UDDIValueSetCachingPort 
+ * and the UDDIValueSetValidationPort.
+ * 
  * This class was generated by the JAX-WS RI.
  * JAX-WS RI 2.1.5-b03-
  * Generated source version: 2.1

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
 Mon Jan  6 21:13:16 2014
@@ -89,7 +89,40 @@ import org.uddi.api_v3.TModelList;
 import org.uddi.sub_v3.DeleteSubscription;
 import org.uddi.sub_v3.Subscription;
 import org.uddi.v3_service.DispositionReportFaultMessage;
-
+/**
+ * The UDDIClerk provides an easy way to access a UDDI service. The clerk
+ * can be configured programmatically, but it is recommended to specify the
+ * server endpoint and access credentials in a uddi.xml file.
+ * 
+ * Recommended use:
+ * <pre>
+ * {@code
+ * UDDIClient uddiClient = new UDDIClient();
+ * UDDIClerk clerk = uddiClient.getClerk(clerkName);
+ * }
+ * </pre>
+ * where the clerkName "MyClerk" is defined as attribute on the clerk element
+ * <pre>
+ * {@code
+ *  <clerks registerOnStartup="true">
+ *    <clerk name="MyClerk" node="default" publisher="root" password="root" 
isPasswordEncrypted="false" cryptoProvider="">
+ *      <class>org.apache.juddi.example.HelloWorldImpl</class>
+ *    </clerk>
+ *  </clerks>
+ * }
+ * </pre>
+ * Credentials:
+ * In the clerk section you need to specify the publisher to be used, as well 
the password.
+ * The password can be encrypted and a cryptoProvider class can be set.
+ * 
+ * UDDI Annotations:
+ * If you want to register classes containing UDDIAnnotations, then you need 
to set registerOnStartup="true"
+ * and you can list the classes with the annotations as subelements. See the 
HelloWorldImpl class
+ * above, as well as the uddi-annotations example.
+ * 
+ * @author kstam
+ *
+ */
 public class UDDIClerk implements Serializable {
 
     private static final long serialVersionUID = -8597375975981358134L;
@@ -154,6 +187,20 @@ public class UDDIClerk implements Serial
        registerWsdls(null);
     }
 
+    /**
+     * Registers the WSDL files referenced in the clerk onto the UDDI node 
referenced by the clerk.
+     * <pre>
+     * {@code
+     * <clerks registerOnStartup="false">
+     *     <clerk name="joe" node="default" publisher="joepublisher" 
password="joepublisher" isPasswordEncrypted="false" cryptoProvider="">
+     *        <wsdl businessName="WSDL-Business">wsdl/helloworld.wsdl</wsdl>
+     *     </clerk>
+     *  </clerks>
+     * }
+     * </pre>
+     * 
+     * @param localizerBaseUrl - The baseUrl part which will be used when 
building the bindingTemplate.
+     */
     public void registerWsdls(URL localizerBaseUrl) {
         if (this.getWsdls() != null) {
             Properties properties = new Properties();
@@ -182,12 +229,20 @@ public class UDDIClerk implements Serial
         }
     }
 
+    /**
+     * Registers a WSDL Definition onto the UDDI node referenced by the clerk.
+     * 
+     * @param wsdlDefinition - the WSDL Definition
+     * @param keyDomain - the keyDomain which will be used to construct the 
UDDI key IDs.
+     * If left null the keyDomain defined in the node's properties will be 
used.
+     * @param businessKey - the key of the business to which this service 
belongs. If left null
+     * the businessKey defined in the node's properties will be used.
+     */
     public void registerWsdls(Definition wsdlDefinition, String keyDomain, 
String businessKey) {
 
         try {
             Properties properties = new Properties();
             properties.putAll(this.getUDDINode().getProperties());
-            //Definition wsdlDefinition = rw.readWSDL(wsdlUrl);
             if (keyDomain != null) {
                 properties.setProperty("keyDomain", keyDomain);
             }
@@ -203,7 +258,9 @@ public class UDDIClerk implements Serial
             log.error("Unable to register wsdl " + " ." + t.getMessage(), t);
         }
     }
-
+    /**
+     * Removes the UDDI data structures belonging to the WSDLs for this clerk 
from the UDDI node.
+     */
     public void unRegisterWsdls() {
         if (this.getWsdls() != null) {
             Properties properties = new Properties();
@@ -232,12 +289,18 @@ public class UDDIClerk implements Serial
         }
     }
 
+    /**
+     * Registers the Subscription that is passed in to the UDDI node for this 
clerk.
+     * @param subscription
+     * @return
+     */
     public Subscription register(Subscription subscription) {
         return register(subscription, this.getUDDINode().getApiNode());
     }
 
     /**
-     * Register a Subscription.
+     * Register a Subscription to UDDI node passed in. Make sure you use a 
clerk that
+     * has credentials for this node.
      */
     public Subscription register(Subscription subscription, Node node) {
 

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
 Mon Jan  6 21:13:16 2014
@@ -45,7 +45,27 @@ import org.uddi.api_v3.CategoryBag;
 import org.uddi.api_v3.KeyedReference;
 import org.uddi.api_v3.TModelInstanceDetails;
 import org.uddi.api_v3.TModelInstanceInfo;
-
+/**
+ * <p>The UDDIClient is the main entry point for using the jUDDI client. The 
UDDICLient
+ * provides a simple way to get interact with a UDDI registry using the UDDI 
v3 API.</p>
+ * 
+ * <h3>Note:</h3>
+ * <p>It is also possible to use the Java API for XML Registries (JAXR). 
Apache Scout is
+ * an implementation of this API that can be configured to -behind the scenes- 
use the
+ * jUDDI Client code to access either UDDIv2 or UDDIv3 registry. The advantage 
of using
+ * JAXR is that your code can be configured to interact with any XML Registry 
(such as UDDI
+ * or ebXML). The downside is that JAXR has not evolved beyond the 1.0 release 
and is
+ * tightly coupled to the ebXML data structures, which being mapped to the 
UDDI data structures.
+ * For more information on JAXR see the Apache Scout project, which is a sub 
project of Apache jUDDI.
+ * If programmatic acess to a UDDIv3 registry is what you want, we recommend 
using the UDDIv3 
+ * API with the UDDIClient.</p>
+ * 
+ * <p>The UDDIClient uses a XML formatted configuration file, which by default 
is loaded from the classpath
+ * from location META-INF/uddi.xml.</p>
+ * 
+ * @author kstam
+ *
+ */
 public class UDDIClient {
 
     private static Log log = LogFactory.getLog(UDDIClient.class);

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java
 Mon Jan  6 21:13:16 2014
@@ -24,6 +24,12 @@ import org.apache.juddi.v3.client.ClassU
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.juddi.v3.client.transport.TransportException;
 
+/**
+ * Connection information to a UDDI node.
+ * 
+ * @author kstam
+ *
+ */
 public class UDDINode implements Serializable {
 
        private static final long serialVersionUID = 5721040459195558161L;
@@ -36,7 +42,7 @@ public class UDDINode implements Seriali
        private String description;
        private String custodyTransferUrl;
        private String inquiryUrl;
-        private String inquiryRESTUrl;
+       private String inquiryRESTUrl;
        private String publishUrl;
        private String securityUrl;
        private String subscriptionUrl;

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
 Mon Jan  6 21:13:16 2014
@@ -16,15 +16,11 @@
  */
 package org.apache.juddi.v3.client.config;
 
-import java.lang.reflect.InvocationTargetException;
-
 import javax.servlet.ServletContext;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.juddi.v3.client.ClassUtil;
-import org.apache.juddi.v3.client.transport.Transport;
 
 public class WebHelper {
        
@@ -94,44 +90,4 @@ public class WebHelper {
                        return client;
                }
        }
-       /**
-        * 
-        * @param servletContext
-        * @return
-        * @throws ConfigurationException
-        */
-       public static UDDINode getUDDIHomeNode(ServletContext servletContext) 
throws ConfigurationException {
-               UDDIClient client = getUDDIClient(servletContext);
-               return client.getClientConfig().getHomeNode();  
-       }
-       
-       public static Transport getTransport(ServletContext servletContext) 
-                  throws ConfigurationException, ClassNotFoundException, 
IllegalArgumentException, 
-                   SecurityException, InstantiationException, 
IllegalAccessException, InvocationTargetException, NoSuchMethodException 
-       {
-               Transport transport = (Transport) 
servletContext.getAttribute(JUDDI_CLIENT_TRANSPORT);
-               if (transport==null) {
-                       UDDIClient client = getUDDIClient(servletContext);
-                       UDDINode node = client.getClientConfig().getHomeNode();
-                       Class<?> transportClass = 
ClassUtil.forName(node.getProxyTransport(), Transport.class);
-                       transport = (Transport) 
transportClass.getConstructor(String.class,String.class).newInstance(client.getName(),node.getName());
-                       servletContext.setAttribute(JUDDI_CLIENT_TRANSPORT, 
transport);
-               }
-               return transport;
-       }
-       
-       public static Transport getTransport(ServletContext servletContext, 
UDDINode remoteNode) 
-          throws ConfigurationException, ClassNotFoundException, 
IllegalArgumentException, 
-           SecurityException, InstantiationException, IllegalAccessException, 
InvocationTargetException, NoSuchMethodException 
-       {
-               Transport transport = (Transport) 
servletContext.getAttribute(JUDDI_CLIENT_TRANSPORT + "-" + 
remoteNode.getName());
-               if (transport==null) {
-                       UDDIClient manager = getUDDIClient(servletContext);
-                       Class<?> transportClass = 
ClassUtil.forName(remoteNode.getProxyTransport(), Transport.class);
-                       transport = (Transport) 
transportClass.getConstructor(String.class,String.class).newInstance(manager.getName(),remoteNode.getName());
-                       servletContext.setAttribute(JUDDI_CLIENT_TRANSPORT + 
"-" + remoteNode.getName(), transport);
-               }
-               return transport;
-       }
-       
 }

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/XRegistration.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/XRegistration.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/XRegistration.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/XRegistration.java
 Mon Jan  6 21:13:16 2014
@@ -21,7 +21,12 @@ import org.apache.commons.logging.LogFac
 import org.uddi.api_v3.BindingTemplate;
 import org.uddi.api_v3.BusinessEntity;
 import org.uddi.api_v3.BusinessService;
-
+/**
+ * Is used to exchange UDDI data between UDDI nodes; for example when 
Subscriptions are uses.
+ * 
+ * @author kstam
+ *
+ */
 public class XRegistration {
 
        private Log log = LogFactory.getLog(this.getClass());

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/EmbeddedRegistry.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/EmbeddedRegistry.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/EmbeddedRegistry.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/EmbeddedRegistry.java
 Mon Jan  6 21:13:16 2014
@@ -16,6 +16,12 @@
  */
 package org.apache.juddi.v3.client.embed;
 
+/**
+ * Interface for the jUDDI Client to start and stop an embedded registry.
+ * 
+ * @author kstam
+ *
+ */
 public interface EmbeddedRegistry {
 
        public void start();

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/JUDDIRegistry.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/JUDDIRegistry.java?rev=1556033&r1=1556032&r2=1556033&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/JUDDIRegistry.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/embed/JUDDIRegistry.java
 Mon Jan  6 21:13:16 2014
@@ -21,7 +21,15 @@ import java.lang.reflect.Method;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.v3.client.ClassUtil;
-
+/**
+ * Implementation of the EmbeddedRegistry to start and stop a inVM jUDDI 
server.
+ * 
+ * The implementation is using Reflection to avoid adding a compile time 
dependency since 
+ * it would create a circular dependency as the server already depends on the 
client.
+ * 
+ * @author kstam
+ *
+ */
 public class JUDDIRegistry implements EmbeddedRegistry {
 
        private Log logger = LogFactory.getLog(this.getClass());



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to