You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by sv...@apache.org on 2004/03/16 21:15:17 UTC
cvs commit: ws-juddi/src/java/org/apache/juddi/proxy RegistryProxy.java
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;
}
-
+
/**
*
*/