chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r934881 [12/12] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src: main/java/org/apache/chemistry/opencmis/client/bindings/cache/ main/java/org/apache/chemistry/opencmis/client/binding...
Date Fri, 16 Apr 2010 14:02:40 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/SimpleReadWriteTests.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/SimpleReadWriteTests.java?rev=934881&r1=934880&r2=934881&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/SimpleReadWriteTests.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/SimpleReadWriteTests.java
Fri Apr 16 14:02:38 2010
@@ -30,28 +30,27 @@ import org.apache.chemistry.opencmis.com
  */
 public class SimpleReadWriteTests extends AbstractSimpleReadWriteTests {
 
-  private Set<String> fTests;
+	private Set<String> fTests;
 
-  public SimpleReadWriteTests() {
-    fTests = new HashSet<String>();
-    fTests.add(TEST_CREATE_FOLDER);
-    fTests.add(TEST_CREATE_DOCUMENT);
-    fTests.add(TEST_CREATE_FROM_SOURCE);
-    fTests.add(TEST_SET_AND_DELETE_CONTENT);
-    fTests.add(TEST_UPDATE_PROPERTIES);
-    fTests.add(TEST_DELETE_TREE);
-    fTests.add(TEST_MOVE_OBJECT);
-    fTests.add(TEST_VERSIONING);
-  }
+	public SimpleReadWriteTests() {
+		fTests = new HashSet<String>();
+		fTests.add(TEST_CREATE_FOLDER);
+		fTests.add(TEST_CREATE_DOCUMENT);
+		fTests.add(TEST_CREATE_FROM_SOURCE);
+		fTests.add(TEST_SET_AND_DELETE_CONTENT);
+		fTests.add(TEST_UPDATE_PROPERTIES);
+		fTests.add(TEST_DELETE_TREE);
+		fTests.add(TEST_MOVE_OBJECT);
+		fTests.add(TEST_VERSIONING);
+	}
 
-  @Override
-  protected CmisBinding createBinding() {
-    return WebServicesTestBindingFactory.createBinding(getWebServicesURL(), getUsername(),
-        getPassword());
-  }
+	@Override
+	protected CmisBinding createBinding() {
+		return WebServicesTestBindingFactory.createBinding(getWebServicesURL(), getUsername(),
getPassword());
+	}
 
-  @Override
-  protected Set<String> getEnabledTests() {
-    return fTests;
-  }
+	@Override
+	protected Set<String> getEnabledTests() {
+		return fTests;
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/WebServicesTestBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/WebServicesTestBindingFactory.java?rev=934881&r1=934880&r2=934881&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/WebServicesTestBindingFactory.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/WebServicesTestBindingFactory.java
Fri Apr 16 14:02:38 2010
@@ -31,62 +31,53 @@ import org.apache.chemistry.opencmis.com
  */
 public class WebServicesTestBindingFactory {
 
-  public static CmisBinding createBinding(String url, String username, String password) {
-    boolean isPrefix = true;
-    String urlLower = url.toLowerCase();
-
-    if (urlLower.endsWith("?wsdl")) {
-      isPrefix = false;
-    }
-    else if (urlLower.endsWith(".wsdl")) {
-      isPrefix = false;
-    }
-    else if (urlLower.endsWith(".xml")) {
-      isPrefix = false;
-    }
-
-    return createBinding(url, isPrefix, username, password);
-  }
-
-  public static CmisBinding createBinding(String url, boolean isPrefix, String username,
-      String password) {
-    // gather parameters
-    Map<String, String> parameters = new HashMap<String, String>();
-    parameters.put(SessionParameter.USER, username);
-    parameters.put(SessionParameter.PASSWORD, password);
-
-    if (!isPrefix) {
-      parameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, url);
-      parameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, url);
-    }
-    else {
-      parameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, url
-          + "RepositoryService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, url
-          + "NavigationService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, url + "ObjectService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, url
-          + "VersioningService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, url + "DiscoveryService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, url
-          + "RelationshipService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, url
-          + "MultiFilingService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, url + "PolicyService?wsdl");
-      parameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, url + "ACLService?wsdl");
-    }
-
-    // get factory and create provider
-    CmisBindingFactory factory = CmisBindingFactory.newInstance();
-    CmisBinding binding = factory.createCmisWebServicesBinding(parameters);
+	public static CmisBinding createBinding(String url, String username, String password) {
+		boolean isPrefix = true;
+		String urlLower = url.toLowerCase();
+
+		if (urlLower.endsWith("?wsdl")) {
+			isPrefix = false;
+		} else if (urlLower.endsWith(".wsdl")) {
+			isPrefix = false;
+		} else if (urlLower.endsWith(".xml")) {
+			isPrefix = false;
+		}
+
+		return createBinding(url, isPrefix, username, password);
+	}
+
+	public static CmisBinding createBinding(String url, boolean isPrefix, String username, String
password) {
+		// gather parameters
+		Map<String, String> parameters = new HashMap<String, String>();
+		parameters.put(SessionParameter.USER, username);
+		parameters.put(SessionParameter.PASSWORD, password);
+
+		if (!isPrefix) {
+			parameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, url);
+			parameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, url);
+		} else {
+			parameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, url + "RepositoryService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, url + "NavigationService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, url + "ObjectService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, url + "VersioningService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, url + "DiscoveryService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, url + "RelationshipService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, url + "MultiFilingService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, url + "PolicyService?wsdl");
+			parameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, url + "ACLService?wsdl");
+		}
+
+		// get factory and create provider
+		CmisBindingFactory factory = CmisBindingFactory.newInstance();
+		CmisBinding binding = factory.createCmisWebServicesBinding(parameters);
 
-    return binding;
-  }
+		return binding;
+	}
 }



Mime
View raw message