[dna-commits] DNA SVN: r1131 - branches/eclipse/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Fri Jul 24 16:08:32 EDT 2009


Author: elvisisking
Date: 2009-07-24 16:08:32 -0400 (Fri, 24 Jul 2009)
New Revision: 1131

Modified:
   branches/eclipse/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/ServerManager.java
Log:
Added a ServerManager constructor that does not need a IRestClient input. The default IRestClient will be used which is the JsonRestClient.

Modified: branches/eclipse/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/ServerManager.java
===================================================================
--- branches/eclipse/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/ServerManager.java	2009-07-24 18:13:16 UTC (rev 1130)
+++ branches/eclipse/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/ServerManager.java	2009-07-24 20:08:32 UTC (rev 1131)
@@ -47,6 +47,7 @@
 import org.jboss.dna.web.jcr.rest.client.domain.Repository;
 import org.jboss.dna.web.jcr.rest.client.domain.Server;
 import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.json.JsonRestClient;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -168,6 +169,17 @@
         this.listeners = new CopyOnWriteArrayList<IServerRegistryListener>();
     }
 
+    /**
+     * This server manager uses the default REST Client.
+     * 
+     * @param stateLocationPath the directory where the {@link Server} registry} is persisted (may be <code>null</code> if
+     *        persistence is not desired)
+     * @since 0.6
+     */
+    public ServerManager( String stateLocationPath ) {
+        this(stateLocationPath, new JsonRestClient());
+    }
+
     // ===========================================================================================================================
     // Methods
     // ===========================================================================================================================



More information about the dna-commits mailing list