Author: fmui
Date: Tue Mar 17 10:16:23 2015
New Revision: 1667231
URL: http://svn.apache.org/r1667231
Log:
Minor improvements
Modified:
chemistry/site/trunk/content/java/examples/example-create-session.mdtext
chemistry/site/trunk/content/java/examples/example-create-update.mdtext
chemistry/site/trunk/content/java/examples/example-get-id-from-path.mdtext
Modified:
chemistry/site/trunk/content/java/examples/example-create-session.mdtext
URL:
http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-create-session.mdtext?rev=1667231&r1=1667230&r2=1667231&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-create-session.mdtext
(original)
+++ chemistry/site/trunk/content/java/examples/example-create-session.mdtext
Tue Mar 17 10:16:23 2015
@@ -54,6 +54,26 @@ A complete list of all session parameter
Session session = factory.createSession(parameter);
+## Browser binding
+
+ :::java
+ // default factory implementation
+ SessionFactory factory = SessionFactoryImpl.newInstance();
+ Map<String, String> parameter = new HashMap<String, String>();
+
+ // user credentials
+ parameter.put(SessionParameter.USER, "Otto");
+ parameter.put(SessionParameter.PASSWORD, "****");
+
+ // connection settings
+ parameter.put(SessionParameter.BROWSER_URL,
"http://<host>:<port>/cmis/browser");
+ parameter.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value());
+ parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
+
+ // create session
+ Session session = factory.createSession(parameter);
+
+
## Local binding
The local binding is specific to OpenCMIS. It lets an OpenCMIS client connect
to an OpenCMIS server in the same JVM.
Modified:
chemistry/site/trunk/content/java/examples/example-create-update.mdtext
URL:
http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-create-update.mdtext?rev=1667231&r1=1667230&r2=1667231&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-create-update.mdtext
(original)
+++ chemistry/site/trunk/content/java/examples/example-create-update.mdtext Tue
Mar 17 10:16:23 2015
@@ -7,6 +7,7 @@ Title: Creating and updating CMIS object
This example creates a folder under the root folder.
+ :::java
Folder root = session.getRootFolder();
// properties
@@ -23,6 +24,7 @@ This example creates a folder under the
This example creates a document in the folder `parent`.
+ :::java
Folder parent = ....
String name = "myNewDocument.txt";
@@ -46,6 +48,7 @@ This example creates a document in the f
This example updates five properties of a CMIS object
+ :::java
CmisObject cmisobject = ....
Map<String, Object> updateProperties = new HashMap<String, Object>();
Modified:
chemistry/site/trunk/content/java/examples/example-get-id-from-path.mdtext
URL:
http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-get-id-from-path.mdtext?rev=1667231&r1=1667230&r2=1667231&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-get-id-from-path.mdtext
(original)
+++ chemistry/site/trunk/content/java/examples/example-get-id-from-path.mdtext
Tue Mar 17 10:16:23 2015
@@ -1,6 +1,6 @@
Title: Getting the id from path
-# Getting the id of an object from its path
+# Getting the ID of an object from its path
A code snippet how to get the id of an object when only a path is known: