chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1538313 - in /chemistry/opencmis/trunk: ./ chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/ chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemist...
Date Sun, 03 Nov 2013 04:13:16 GMT
Author: fmui
Date: Sun Nov  3 04:13:15 2013
New Revision: 1538313

URL: http://svn.apache.org/r1538313
Log:
a bit more JavaDoc

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionParameterMap.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/SessionFactory.java
    chemistry/opencmis/trunk/pom.xml

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java?rev=1538313&r1=1538312&r2=1538313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
Sun Nov  3 04:13:15 2013
@@ -28,6 +28,25 @@ import org.apache.chemistry.opencmis.cli
 
 /**
  * Finds a {@link SessionFactory} implementation and creates a factory object.
+ * <p>
+ * Sample code:
+ * <p>
+ * 
+ * <pre>
+ * SessionFactory factory = SessionFactoryFinder.find();
+ * 
+ * Map&lt;String, String> parameter = new HashMap&lt;String, String>();
+ * parameter.put(SessionParameter.USER, "Otto");
+ * parameter.put(SessionParameter.PASSWORD, "****");
+ * 
+ * parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost/cmis/atom");
+ * parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
+ * parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
+ * ...
+ * Session session = factory.createSession(parameter);
+ * </pre>
+ * 
+ * @see SessionFactory
  */
 public final class SessionFactoryFinder {
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionParameterMap.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionParameterMap.java?rev=1538313&r1=1538312&r2=1538313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionParameterMap.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionParameterMap.java
Sun Nov  3 04:13:15 2013
@@ -43,6 +43,21 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * A map with convenience methods to set session parameters.
+ * <p>
+ * Sample code:
+ * <p>
+ * 
+ * <pre>
+ * SessionFactory factory = ...
+ * 
+ * SessionParameterMap parameter = new SessionParameterMap();
+ * 
+ * parameter.setBasicAuthentication("Otto", "****");
+ * parameter.setAtomPubBindingUrl("http://localhost/cmis/atom");
+ * parameter.setRepositoryId("myRepository");
+ * ...
+ * Session session = factory.createSession(parameter);
+ * </pre>
  * 
  * @see SessionParameter
  * @see SessionFactory

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java?rev=1538313&r1=1538312&r2=1538313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
Sun Nov  3 04:13:15 2013
@@ -27,9 +27,8 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * Query Statement.
- * 
  * <p>
- * Example: <blockquote>
+ * Sample code:
  * 
  * <pre>
  * Calendar cal = ...
@@ -52,9 +51,6 @@ import org.apache.chemistry.opencmis.com
  * 
  * String statement = qs.toQueryString();
  * </pre>
- * 
- * </blockquote>
- * </p>
  */
 public interface QueryStatement extends Cloneable {
 
@@ -63,6 +59,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param typeId
+     *            the type ID
      */
     void setType(int parameterIndex, String typeId);
 
@@ -71,6 +69,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param type
+     *            the object type
      */
     void setType(int parameterIndex, ObjectType type);
 
@@ -79,6 +79,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param propertyId
+     *            the property ID
      */
     void setProperty(int parameterIndex, String typeId, String propertyId);
 
@@ -87,6 +89,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param propertyDefinition
+     *            the property definition
      */
     void setProperty(int parameterIndex, PropertyDefinition<?> propertyDefinition);
 
@@ -95,6 +99,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param num
+     *            the number
      */
     void setNumber(int parameterIndex, Number... num);
 
@@ -103,6 +109,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param str
+     *            the string
      */
     void setString(int parameterIndex, String... str);
 
@@ -112,22 +120,26 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param str
+     *            the LIKE string
      */
     void setStringLike(int parameterIndex, String str);
 
     /**
      * Sets the designated parameter to the given string in a CMIS contains
-     * statement. Note that the CMIS specification requires two levels of
-     * escaping. The first level escapes ', ", \ characters to \', \" and \\.
-     * The characters *, ? and - are interpreted as text search operators and
-     * are not escaped on first level. If *, ?, - shall be used as literals,
-     * they must be passed escaped with \*, \? and \- to this method.
-     * 
+     * statement.
+     * <p>
+     * Note that the CMIS specification requires two levels of escaping. The
+     * first level escapes ', ", \ characters to \', \" and \\. The characters
+     * *, ? and - are interpreted as text search operators and are not escaped
+     * on first level. If *, ?, - shall be used as literals, they must be passed
+     * escaped with \*, \? and \- to this method.
+     * <p>
      * For all statements in a CONTAINS() clause it is required to isolate those
      * from a query statement. Therefore a second level escaping is performed.
      * On the second level grammar ", ', - and \ are escaped with a \. See the
      * spec for further details.
-     * 
+     * <p>
      * Summary (input --> first level escaping --> second level escaping and
      * output): * --> * --> * ? --> ? --> ? - --> - --> - \ --> \\ -->
\\\\ (for
      * any other character following other than * ? -) \* --> \* --> \\* \? -->
@@ -135,6 +147,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param str
+     *            the CONTAINS string
      */
     void setStringContains(int parameterIndex, String str);
 
@@ -143,6 +157,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param id
+     *            the object ID
      */
     void setId(int parameterIndex, ObjectId... id);
 
@@ -151,6 +167,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param uri
+     *            the URI
      */
     void setUri(int parameterIndex, URI... uri);
 
@@ -159,6 +177,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param url
+     *            the URL
      */
     void setUrl(int parameterIndex, URL... url);
 
@@ -167,6 +187,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param bool
+     *            the boolean
      */
     void setBoolean(int parameterIndex, boolean... bool);
 
@@ -175,6 +197,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param cal
+     *            the DateTime value as Calendar object
      */
     void setDateTime(int parameterIndex, Calendar... cal);
 
@@ -183,6 +207,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param cal
+     *            the DateTime value as Date object
      */
     void setDateTime(int parameterIndex, Date... date);
 
@@ -191,6 +217,9 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param cal
+     *            the DateTime value in milliseconds from midnight, January 1,
+     *            1970 UTC.
      */
     void setDateTime(int parameterIndex, long... ms);
 
@@ -200,6 +229,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param cal
+     *            the DateTime value as Calendar object
      */
     void setDateTimeTimestamp(int parameterIndex, Calendar... cal);
 
@@ -209,6 +240,8 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param cal
+     *            the DateTime value as Date object
      */
     void setDateTimeTimestamp(int parameterIndex, Date... date);
 
@@ -218,6 +251,9 @@ public interface QueryStatement extends 
      * 
      * @param parameterIndex
      *            the parameter index (one-based)
+     * @param cal
+     *            the DateTime value in milliseconds from midnight, January 1,
+     *            1970 UTC.
      */
     void setDateTimeTimestamp(int parameterIndex, long... ms);
 
@@ -231,6 +267,12 @@ public interface QueryStatement extends 
     /**
      * Executes the query.
      * 
+     * @param searchAllVersions
+     *            {@code true} if all document versions should be included in
+     *            the search results, {@code false} if only the latest document
+     *            versions should be included in the search results
+     * 
+     * 
      * @see Session#query(String, boolean)
      */
     ItemIterable<QueryResult> query(boolean searchAllVersions);
@@ -238,6 +280,13 @@ public interface QueryStatement extends 
     /**
      * Executes the query.
      * 
+     * @param searchAllVersions
+     *            {@code true} if all document versions should be included in
+     *            the search results, {@code false} if only the latest document
+     *            versions should be included in the search results
+     * @param context
+     *            the operation context to use
+     * 
      * @see Session#query(String, boolean, OperationContext)
      */
     ItemIterable<QueryResult> query(boolean searchAllVersions, OperationContext context);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/SessionFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/SessionFactory.java?rev=1538313&r1=1538312&r2=1538313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/SessionFactory.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/SessionFactory.java
Sun Nov  3 04:13:15 2013
@@ -21,36 +21,45 @@ package org.apache.chemistry.opencmis.cl
 import java.util.List;
 import java.util.Map;
 
-import org.apache.chemistry.opencmis.commons.SessionParameter;
-
 /**
- * Entry point into the OpenCMIS Client API. The <code>SessionFactory</code>
- * class implementation needs to be retrieved by any runtime lookup call. This
- * can for instance be a J2EE JNDI lookup or an OSGi service lookup.
+ * Entry point into the OpenCMIS Client API.
+ * <p>
+ * There might be different ways to get a {@code SessionFactory} instance. For
+ * example it could be retrieved via a J2EE JNDI lookup or an OSGi service
+ * lookup. Clients outside a container might use the
+ * {@link org.apache.chemistry.opencmis.client.SessionFactoryFinder} class.
  * <p>
- * The entries of the parameter map are defined by {@link SessionParameter}
- * class which is part of the commons package. Parameters specify connection
- * settings (user name, authentication, connection URL, binding type, etc.).
+ * The entries of the parameter map are defined by
+ * {@link org.apache.chemistry.opencmis.commons.SessionParameter} class which is
+ * part of the commons package. Parameters specify connection settings (user
+ * name, authentication, connection URL, binding type, etc.).
  * <p>
- * The <code>Session</code> class which is constructed is either the
- * <code>session</code> base class which is the default implementation or it
can
- * be derived from that implementing special behavior for the session.
+ * The {@link Session} class which is constructed is either the {@code session}
+ * base class which is the default implementation or it can be derived from that
+ * implementing special behavior for the session.
  * <p>
  * Sample code:
  * <p>
- * <code>
- * SessionFactory factory = ... // use a runtime lookup service
- * <br>
- * <br>Map<String, String> parameter = ...
- * <br>parameter.put(SessionParameter.USER, "Otto");
- * <br>parameter.put(SessionParameter.PASSWORD, "****");
- * <br>
- * <br>parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost/cmis/atom");
- * <br>parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
- * <br>parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
- * <br>...
- * <br>Session session = factory.createSession(parameter);
- * </code>
+ * 
+ * <pre>
+ * SessionFactory factory = ...
+ * 
+ * Map&lt;String, String> parameter = new HashMap&lt;String, String>();
+ * 
+ * parameter.put(SessionParameter.USER, "Otto");
+ * parameter.put(SessionParameter.PASSWORD, "****");
+ * 
+ * parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost/cmis/atom");
+ * parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
+ * parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
+ * ...
+ * Session session = factory.createSession(parameter);
+ * </pre>
+ * 
+ * @see org.apache.chemistry.opencmis.client.SessionFactoryFinder
+ * @see org.apache.chemistry.opencmis.commons.SessionParameter
+ * @see org.apache.chemistry.opencmis.client.SessionParameterMap
+ * @see Session
  */
 public interface SessionFactory {
 
@@ -58,23 +67,31 @@ public interface SessionFactory {
      * Creates a new session.
      * 
      * @param parameters
-     *            a {@code Map} of name/value pairs with parameters for the
-     *            session, see {@link SessionParameter} for
+     *            a map of name/value pairs with parameters for the session, see
+     *            {@link org.apache.chemistry.opencmis.commons.SessionParameter}
+     *            for parameters supported by OpenCMIS
+     * 
      * 
      * @return a {@link Session} connected to the CMIS repository
      * 
-     * @see SessionParameter
+     * @see org.apache.chemistry.opencmis.commons.SessionParameter
      */
     Session createSession(Map<String, String> parameters);
 
     /**
      * Returns all repositories that are available at the endpoint.
      * 
-     * See {@link #createSession(Map)} for parameter details. The parameter
-     * {@code SessionParameter.REPOSITORY_ID} should not be set.
+     * 
+     * @param parameters
+     *            a map of name/value pairs with parameters for the session, see
+     *            {@link org.apache.chemistry.opencmis.commons.SessionParameter}
+     *            for parameters supported by OpenCMIS, the parameter
+     *            {@link org.apache.chemistry.opencmis.commons.SessionParameter.REPOSITORY_ID}
+     *            should not be set
      * 
      * @return a list of all available repositories
+     * 
+     * @see org.apache.chemistry.opencmis.commons.SessionParameter
      */
     List<Repository> getRepositories(Map<String, String> parameters);
-
 }

Modified: chemistry/opencmis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/pom.xml?rev=1538313&r1=1538312&r2=1538313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/pom.xml (original)
+++ chemistry/opencmis/trunk/pom.xml Sun Nov  3 04:13:15 2013
@@ -534,7 +534,7 @@
                   <groups>
                       <group>
                           <title>OpenCMIS Client API</title>
-                          <packages>org.apache.chemistry.opencmis.client.api:org.apache.chemistry.opencmis.client.util</packages>
+                          <packages>org.apache.chemistry.opencmis.client:org.apache.chemistry.opencmis.client.api:org.apache.chemistry.opencmis.client.util</packages>
                       </group>
                       <group>
                           <title>OpenCMIS Commons API</title>



Mime
View raw message