juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r1061968 - in /juddi/trunk/uddi-tck-base/src/main: java/org/apache/juddi/v3/tck/Property.java java/org/apache/juddi/v3/tck/TckPublisher.java resources/tck.properties
Date Fri, 21 Jan 2011 19:00:04 GMT
Author: kstam
Date: Fri Jan 21 19:00:04 2011
New Revision: 1061968

URL: http://svn.apache.org/viewvc?rev=1061968&view=rev
Log:
JUDDI-443 making the usernames and passwords configurable

Added:
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/Property.java
    juddi/trunk/uddi-tck-base/src/main/resources/tck.properties
Modified:
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java

Added: juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/Property.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/Property.java?rev=1061968&view=auto
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/Property.java (added)
+++ juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/Property.java Fri Jan
21 19:00:04 2011
@@ -0,0 +1,14 @@
+package org.apache.juddi.v3.tck;
+
+public class Property {
+
+	public static String ROOT_PUBLISHER = "root.publisher";
+	public static String ROOT_PASSWORD  = "root.password";
+	public static String JOE_PUBLISHER  = "joe.publisher";
+	public static String JOE_PASSWORD   = "joe.password";
+	public static String SAM_PUBLISHER  = "sam.publisher";
+	public static String SAM_PASSWORD   = "sam.password";
+	public static String MARY_PUBLISHER = "mary.publisher";
+	public static String MARY_PASSWORD  = "mary.password";
+	
+}

Modified: juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java?rev=1061968&r1=1061967&r2=1061968&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java (original)
+++ juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java Fri
Jan 21 19:00:04 2011
@@ -13,19 +13,61 @@
  * limitations under the License.
  */
 package org.apache.juddi.v3.tck;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
 /**
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
  */
 public class TckPublisher 
 {	
+	private static Properties tckProperties = new Properties();
 	public final static String JOE_PUBLISHER_XML  = "uddi_data/joepublisher/publisher.xml";
-    public final static String JOE_PUBLISHER_ID   = "joepublisher";
-    public final static String JOE_PUBLISHER_CRED = "joepublisher";
 	public final static String SAM_SYNDICATOR_XML = "uddi_data/samsyndicator/publisher.xml";
-    public final static String SAM_SYNDICATOR_ID  = "ssyndicator";
-    public final static String SAM_SYNDICATOR_CRED= "ssyndicator";
-    public final static String MARY_PUBLISHER_XML  = "uddi_data/marypublisher/publisher.xml";
-    public final static String MARY_PUBLISHER_ID   = "marypublisher";
-    public final static String MARY_PUBLISHER_CRED = "marypublisher";
+    public final static String MARY_PUBLISHER_XML = "uddi_data/marypublisher/publisher.xml";
+    
+	static {
+		try {
+			InputStream inputSteam = TckPublisher.class.getResourceAsStream("/tck.properties");
+			tckProperties.load(inputSteam);
+		} catch (IOException ioe) {
+			ioe.printStackTrace();
+		}
+	}
+
+  
+    public final static String getRootPublisherId() {
+    	return tckProperties.getProperty(Property.ROOT_PUBLISHER);
+    }
+    
+    public final static String getRootPassword() {
+    	return tckProperties.getProperty(Property.ROOT_PASSWORD);
+    }
+    
+    public final static String getJoePublisherId() {
+    	return tckProperties.getProperty(Property.JOE_PUBLISHER);
+    }
+    
+    public final static String getJoePassword() {
+    	return tckProperties.getProperty(Property.JOE_PASSWORD);
+    }
+    
+    public final static String getSamPublisherId() {
+    	return tckProperties.getProperty(Property.SAM_PUBLISHER);
+    }
+    
+    public final static String getSamPassword() {
+    	return tckProperties.getProperty(Property.SAM_PASSWORD);
+    }
+    
+    public final static String getMaryPublisherId() {
+    	return tckProperties.getProperty(Property.MARY_PUBLISHER);
+    }
+    
+    public final static String getMaryPassword() {
+    	return tckProperties.getProperty(Property.MARY_PASSWORD);
+    }
 }
\ No newline at end of file

Added: juddi/trunk/uddi-tck-base/src/main/resources/tck.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/tck.properties?rev=1061968&view=auto
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/tck.properties (added)
+++ juddi/trunk/uddi-tck-base/src/main/resources/tck.properties Fri Jan 21 19:00:04 2011
@@ -0,0 +1,8 @@
+root.publisher = root
+root.password  = ""
+joe.publisher  = joepublisher
+joe.password   = joepublisher
+sam.publisher  = ssyndicator
+sam.password   = ssyndicator
+mary.publisher = marypublisher
+mary.password  = marypublisher
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message