Return-Path: Mailing-List: contact juddi-cvs-help@ws.apache.org; run by ezmlm Delivered-To: mailing list juddi-cvs@ws.apache.org Received: (qmail 65763 invoked from network); 16 Mar 2004 20:15:07 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 16 Mar 2004 20:15:07 -0000 Received: (qmail 87191 invoked by uid 1759); 16 Mar 2004 20:15:17 -0000 Date: 16 Mar 2004 20:15:17 -0000 Message-ID: <20040316201517.87190.qmail@minotaur.apache.org> From: sviens@apache.org To: ws-juddi-cvs@apache.org Subject: cvs commit: ws-juddi/src/java/org/apache/juddi/proxy RegistryProxy.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N sviens 2004/03/16 12:15:17 Modified: src/java/org/apache/juddi/proxy RegistryProxy.java Log: Adding class members and getters/setters for securityProvider and protocolHandler Revision Changes Path 1.4 +58 -7 ws-juddi/src/java/org/apache/juddi/proxy/RegistryProxy.java Index: RegistryProxy.java =================================================================== RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/proxy/RegistryProxy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RegistryProxy.java 16 Mar 2004 15:12:13 -0000 1.3 +++ RegistryProxy.java 16 Mar 2004 20:15:17 -0000 1.4 @@ -65,6 +65,8 @@ private URL adminURL; private String uddiVersion; private String uddiNamespace; + private String securityProvider; + private String protocolHandler; /** * Create a new instance of RegistryProxy. This constructor @@ -77,7 +79,12 @@ { super(); - this.init(null); + // attempt to load proxy properties from + // the juddi.properties file which should + // be located in the classpath. + Properties props = null; + + this.init(props); } /** @@ -99,7 +106,7 @@ */ private void init(Properties props) { - // initialize proxy with default values + // Initialize proxy with default values try { this.setInquiryURL(new URL(DEFAULT_INQUIRY_ENDPOINT)); this.setPublishURL(new URL(DEFAULT_PUBLISH_ENDPOINT)); @@ -111,7 +118,12 @@ muex.printStackTrace(); } - // override defaults with specific specific values + // There's no point in going any further + // if the Properties parameter is null. + if (props == null) + return; + + // Override defaults with specific specific values try { String iURL = props.getProperty("juddi.proxy.inquiryURL"); if (iURL != null) @@ -129,6 +141,14 @@ muex.printStackTrace(); } + String secProvider = props.getProperty("juddi.proxy.securityProvider"); + if (secProvider != null) + this.setSecurityProvider(secProvider); + + String protoHandler = props.getProperty("juddi.proxy.protocolHandler"); + if (protoHandler != null) + this.setProtocolHandler(protoHandler); + String uddiVer = props.getProperty("juddi.proxy.uddiVersion"); if (uddiVer != null) this.setUddiVersion(uddiVer); @@ -186,13 +206,44 @@ this.publishURL = url; } - + /** + * @return Returns the protocolHandler. + */ + public String getProtocolHandler() + { + return this.protocolHandler; + } + + /** + * @param protocolHandler The protocolHandler to set. + */ + public void setProtocolHandler(String protoHandler) + { + this.protocolHandler = protoHandler; + } + + /** + * @return Returns the securityProvider. + */ + public String getSecurityProvider() + { + return this.securityProvider; + } + + /** + * @param securityProvider The securityProvider to set. + */ + public void setSecurityProvider(String secProvider) + { + this.securityProvider = secProvider; + } + /** * @return Returns the uddiNS. */ public String getUddiNamespace() { - return uddiNamespace; + return this.uddiNamespace; } /** @@ -208,7 +259,7 @@ */ public String getUddiVersion() { - return uddiVersion; + return this.uddiVersion; } /** @@ -218,7 +269,7 @@ { this.uddiVersion = uddiVer; } - + /** * */