You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/08/04 16:51:02 UTC
svn commit: r982271 - in /incubator/chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/
chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apa...
Author: fmui
Date: Wed Aug 4 14:51:01 2010
New Revision: 982271
URL: http://svn.apache.org/viewvc?rev=982271&view=rev
Log:
more JavaDoc
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentType.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectType.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/package.html
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentFilableCmisObject.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Ace.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Acl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/ContentStream.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Principal.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyData.java
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java Wed Aug 4 14:51:01 2010
@@ -100,59 +100,163 @@ public interface CmisObject extends Obje
// object
+ /**
+ * Returns all properties that have been fetched for this object. If the
+ * object was retrieved with a property filter, only the properties that
+ * matched the filter are available.
+ */
List<Property<?>> getProperties();
+ /**
+ * Returns a property by id.
+ *
+ * @param id
+ * the property id
+ *
+ * @return the property or <code>null</code> if the property does not exist
+ * or is not available
+ */
<T> Property<T> getProperty(String id);
+ /**
+ * Returns a property (single) value by id.
+ *
+ * @param id
+ * the property id
+ *
+ * @return the property value or <code>null</code> if the property does not
+ * exist or is not available
+ */
<T> T getPropertyValue(String id);
+ /**
+ * Returns a property multi-value by id.
+ *
+ * @param id
+ * the property id
+ *
+ * @return the list of values or <code>null</code> if the property does not
+ * exist or is not available
+ */
<T> List<T> getPropertyMultivalue(String id);
+ /**
+ * Returns the allowable actions if they have been fetched for this object.
+ */
AllowableActions getAllowableActions();
+ /**
+ * Returns the relationships if they have been fetched for this object.
+ */
List<Relationship> getRelationships();
+ /**
+ * Returns the ACL if it has been fetched for this object.
+ */
Acl getAcl();
// object service
+ /**
+ * Deletes this object.
+ *
+ * @param allVersions
+ * if this object is a document this parameter defines if just
+ * this version or all versions should be deleted
+ */
void delete(boolean allVersions);
+ /**
+ * Updates the properties that have been set with
+ * {@link #setProperty(String, Object)} or
+ * {@link #setPropertyMultivalue(String, List)}.
+ *
+ * @return the object id of the updated object (a repository might have
+ * created a new object)
+ */
ObjectId updateProperties();
+ /**
+ * Updates the properties that are provided.
+ *
+ * @param properties
+ * the properties to update
+ *
+ * @return the object id of the updated object (a repository might have
+ * created a new object)
+ */
ObjectId updateProperties(Map<String, ?> properties);
// relationship service
+ /**
+ * Fetches the relationships from or to this object from the repository.
+ */
ItemIterable<Relationship> getRelationships(boolean includeSubRelationshipTypes,
RelationshipDirection relationshipDirection, ObjectType type, OperationContext context);
// renditions
+ /**
+ * Returns the renditions if they have been fetched for this object.
+ */
List<Rendition> getRenditions();
// policy service
+ /**
+ * Applies a policy to this object.
+ */
void applyPolicy(ObjectId policyId);
+ /**
+ * Remove a policy from this object.
+ */
void removePolicy(ObjectId policyId);
+ /**
+ * Returns the applied policies if they have been fetched for this object.
+ */
List<Policy> getPolicies();
// ACL service
+ /**
+ * Fetches the ACL of this object from the repository.
+ */
Acl getAcl(boolean onlyBasicPermissions);
+ /**
+ * Adds and removes ACEs to the object.
+ *
+ * @return the new ACL of this object
+ */
Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation);
+ /**
+ * Adds ACEs to the object.
+ */
void addAcl(List<Ace> addAces, AclPropagation aclPropagation);
+ /**
+ * Removes ACEs to the object.
+ */
void removeAcl(List<Ace> removeAces, AclPropagation aclPropagation);
// buffered stuff
+ /**
+ * Sets a new property single value.
+ *
+ * Use {@link #updateProperties()} to store the new value in the repository.
+ */
<T> void setProperty(String id, T value);
+ /**
+ * Sets a new property multi value.
+ *
+ * Use {@link #updateProperties()} to store the new value in the repository.
+ */
<T> void setPropertyMultivalue(String id, List<T> value);
// extensions
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java Wed Aug 4 14:51:01 2010
@@ -26,37 +26,97 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
/**
+ * CMIS Document.
+ *
* Domain Model 2.4
*/
public interface Document extends FileableCmisObject {
// object service
+ /**
+ * Deletes this document and all its versions.
+ */
void deleteAllVersions();
+ /**
+ * Retrieves the content stream of this document.
+ */
ContentStream getContentStream();
-
+
+ /**
+ * Retrieves the content stream that is associated with the given stream id.
+ * This is usually a rendition of the document.
+ */
ContentStream getContentStream(String streamId);
+ /**
+ * Sets a new content stream for the document.
+ */
ObjectId setContentStream(ContentStream contentStream, boolean overwrite);
+ /**
+ * Removes the current content stream from the document.
+ */
ObjectId deleteContentStream();
// versioning service
+ /**
+ * Checks out the document and returns the object id of the PWC (private
+ * working copy).
+ *
+ * @return PWC id
+ */
ObjectId checkOut(); // returns the PWC id
+ /**
+ * If this is a PWC (private working copy) the check out will be reversed.
+ * If this is not a PWC it an exception will be thrown.
+ */
void cancelCheckOut();
+ /**
+ * If this is a PWC (private working copy) it performs a check in. If this
+ * is not a PWC it an exception will be thrown.
+ *
+ * @return new document id
+ */
ObjectId checkIn(boolean major, Map<String, ?> properties, ContentStream contentStream, String checkinComment,
List<Policy> policies, List<Ace> addAces, List<Ace> removeAces);
+ /**
+ * Fetches the latest major or minor version of this document.
+ *
+ * @param major
+ * if <code>true</code> the latest major version will be
+ * returned, otherwise the very last version will be returned
+ *
+ * @return the latest document object
+ */
Document getObjectOfLatestVersion(boolean major);
+ /**
+ * Fetches the latest major or minor version of this document using the
+ * given {@link OperationContext}.
+ *
+ * @param major
+ * if <code>true</code> the latest major version will be
+ * returned, otherwise the very last version will be returned
+ *
+ * @return the latest document object
+ */
Document getObjectOfLatestVersion(boolean major, OperationContext context);
+ /**
+ * Fetches all versions of this document.
+ */
List<Document> getAllVersions();
+ /**
+ * Fetches all versions of this document using the given
+ * {@link OperationContext}.
+ */
List<Document> getAllVersions(OperationContext context);
// document specific properties
@@ -90,14 +150,7 @@ public interface Document extends Fileab
String getContentStreamId(); // cmis:contentStreamId
/**
- * Shortcut for ObjectFactory.createDocumentFromSource(this, ...).
- *
- * @param properties
- * @param versioningState
- * @param policies
- * @param addACEs
- * @param removeACEs
- * @return
+ * Creates a (content) copy of this document.
*/
Document copy(List<Property<?>> properties, VersioningState versioningState, List<Policy> policies,
List<Ace> addACEs, List<Ace> removeACEs);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentType.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentType.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentType.java Wed Aug 4 14:51:01 2010
@@ -28,7 +28,7 @@ import org.apache.chemistry.opencmis.com
public interface DocumentType extends ObjectType {
/**
- * Get the {@code isVersionable} flag.
+ * Gets the {@code isVersionable} flag.
*
* @return {@code true} if this document type is versionable, {@code false}
* if documents of this type cannot be versioned.
@@ -36,7 +36,7 @@ public interface DocumentType extends Ob
Boolean isVersionable();
/**
- * Get the enum that describes, how content streams have to be handled with
+ * Gets the enum that describes, how content streams have to be handled with
* this document type.
*
* @return the mode of content stream support ({@code notallowed}, {@code
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java Wed Aug 4 14:51:01 2010
@@ -27,56 +27,127 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
/**
+ * CMIS Folder.
+ *
* Domain Model 2.5
*/
public interface Folder extends FileableCmisObject {
// object service
+
+ /**
+ * Creates a new document in this folder.
+ *
+ * @return the new document object or <code>null</code> if the parameter
+ * <code>context</code> was set to <code>null</code>
+ */
Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
+ /**
+ * Creates a new document from a source document in this folder.
+ *
+ * @return the new document object or <code>null</code> if the parameter
+ * <code>context</code> was set to <code>null</code>
+ */
Document createDocumentFromSource(ObjectId source, Map<String, ?> properties, VersioningState versioningState,
List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
+ /**
+ * Creates a new subfolder in this folder.
+ *
+ * @return the new folder object or <code>null</code> if the parameter
+ * <code>context</code> was set to <code>null</code>
+ */
Folder createFolder(Map<String, ?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces,
OperationContext context);
+ /**
+ * Creates a new policy in this folder.
+ *
+ * @return the new policy object or <code>null</code> if the parameter
+ * <code>context</code> was set to <code>null</code>
+ */
Policy createPolicy(Map<String, ?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces,
OperationContext context);
/**
- * @return list of object ids which failed to be deleted
+ * Deletes this folder and all subfolders.
+ *
+ * @return a list of object ids which failed to be deleted
*/
List<String> deleteTree(boolean allversions, UnfileObject unfile, boolean continueOnFailure);
// navigation service
+ /**
+ * Gets the folder tree starting with this folder.
+ */
List<Tree<FileableCmisObject>> getFolderTree(int depth);
+ /**
+ * Gets the folder tree starting with this folder using the given
+ * {@link OperationContext}.
+ */
List<Tree<FileableCmisObject>> getFolderTree(int depth, OperationContext context);
+ /**
+ * Gets the folder descendants starting with this folder.
+ */
List<Tree<FileableCmisObject>> getDescendants(int depth);
+ /**
+ * Gets the folder descendants starting with this folder using the given
+ * {@link OperationContext}.
+ */
List<Tree<FileableCmisObject>> getDescendants(int depth, OperationContext context);
+ /**
+ * Returns the children of this folder.
+ */
ItemIterable<CmisObject> getChildren();
+ /**
+ * Returns the children of this folder using the given
+ * {@link OperationContext}.
+ */
ItemIterable<CmisObject> getChildren(OperationContext context);
+ /**
+ * Returns if the folder is the root folder.
+ */
boolean isRootFolder();
+ /**
+ * Gets the parent folder object
+ *
+ * @return the parent folder object or <code>null</code> if the folder is
+ * the root folder.
+ */
Folder getFolderParent();
+ /**
+ * Returns the path of the folder.
+ */
String getPath();
/**
- * Returns all checked out documents of this folder.
+ * Returns all checked out documents in this folder.
*/
ItemIterable<Document> getCheckedOutDocs();
+ /**
+ * Returns all checked out documents in this folder using the given
+ * {@link OperationContext}.
+ */
ItemIterable<Document> getCheckedOutDocs(OperationContext context);
// folder specific properties
+ /**
+ * If the children object types are restricted, it returns all allowed
+ * object types. If the list is empty or <code>null</code> all object types
+ * are allowed.
+ */
List<ObjectType> getAllowedChildObjectTypes(); // cmis:allowedChildObjectTypeIds
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectType.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectType.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectType.java Wed Aug 4 14:51:01 2010
@@ -68,7 +68,7 @@ public interface ObjectType extends Type
* this type on {@code getParent()}).
*
* @return a {@code List} of types which are directly derived from this
- * type. @
+ * type.
*/
ItemIterable<ObjectType> getChildren();
@@ -78,7 +78,7 @@ public interface ObjectType extends Type
* @param depth
* the depth to which the derived types should be resolved.
* @return a {@code Tree} of types which are derived from this type (direct
- * and via their parents). @
+ * and via their parents).
*/
List<Tree<ObjectType>> getDescendants(int depth);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/OperationContext.java Wed Aug 4 14:51:01 2010
@@ -22,12 +22,33 @@ import java.util.Set;
import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
+/**
+ * An <code>OperationContext</code> object defines the filtering, paging and
+ * caching of an operation.
+ */
public interface OperationContext {
+ /**
+ * Returns the current filter.
+ *
+ * @return a set of <em>query names</em>
+ */
Set<String> getFilter();
+ /**
+ * Sets the current filter.
+ *
+ * @param propertyFilter
+ * a set of <em>query names</em>
+ */
void setFilter(Set<String> propertyFilter);
+ /**
+ * Sets the current filter.
+ *
+ * @param propertyFilter
+ * a comma separated list of <em>query names</em>
+ */
void setFilterString(String propertyFilter);
/**
@@ -36,45 +57,134 @@ public interface OperationContext {
*/
String getFilterString();
+ /**
+ * Returns if allowable actions should returned.
+ */
boolean isIncludeAllowableActions();
+ /**
+ * Sets if allowable actions should returned.
+ */
void setIncludeAllowableActions(boolean include);
+ /**
+ * Returns if ACLs should returned.
+ */
boolean isIncludeAcls();
+ /**
+ * Sets if ACLs should returned.
+ */
void setIncludeAcls(boolean include);
+ /**
+ * Returns which relationships should be returned.
+ */
IncludeRelationships getIncludeRelationships();
+ /**
+ * Sets which relationships should be returned.
+ */
void setIncludeRelationships(IncludeRelationships include);
+ /**
+ * Returns if policies should returned.
+ */
boolean isIncludePolicies();
+ /**
+ * Sets if policies should returned.
+ */
void setIncludePolicies(boolean include);
+ /**
+ * Returns the current rendition filter. (See CMIS spec
+ * "2.2.1.2.4.1 Rendition Filter Grammar")
+ *
+ * @return a set of rendition filter terms
+ */
Set<String> getRenditionFilter();
+ /**
+ * Sets the current rendition filter. (See CMIS spec
+ * "2.2.1.2.4.1 Rendition Filter Grammar")
+ *
+ * @param renditionFilter
+ * a set of rendition filter terms
+ */
void setRenditionFilter(Set<String> renditionFilter);
+ /**
+ * Sets the current rendition filter. (See CMIS spec
+ * "2.2.1.2.4.1 Rendition Filter Grammar")
+ *
+ * @param renditionFilter
+ * a comma separated list of rendition filter terms
+ */
void setRenditionFilterString(String renditionFilter);
+ /**
+ * Returns the current rendition filter. (See CMIS spec
+ * "2.2.1.2.4.1 Rendition Filter Grammar")
+ *
+ * @return a comma separated list of rendition filter terms
+ */
String getRenditionFilterString();
+ /**
+ * Returns if path segments should returned.
+ */
boolean isIncludePathSegments();
+ /**
+ * Sets if path segments should returned.
+ */
void setIncludePathSegments(boolean include);
+ /**
+ * Returns the order by rule for operations that return lists.
+ *
+ * @return a comma-separated list of <em>query names</em> and the ascending
+ * modifier "ASC" or the descending modifier "DESC" for each query
+ * name
+ */
String getOrderBy();
+ /**
+ * Sets the order by rule for operations that return lists.
+ *
+ * @param orderBy
+ * a comma-separated list of <em>query names</em> and the
+ * ascending modifier "ASC" or the descending modifier "DESC" for
+ * each query name
+ */
void setOrderBy(String orderBy);
+ /**
+ * Return if caching is enabled.
+ */
boolean isCacheEnabled();
+ /**
+ * Enables or disables the cache.
+ */
void setCacheEnabled(boolean cacheEnabled);
+ /**
+ * Returns a key for this OperationContext object that is used for caching.
+ */
String getCacheKey();
-
+
+ /**
+ * Set the max number of items per page for operations that return lists.
+ *
+ * @param maxItemsPerPage
+ * max number of items (must be >0)
+ */
void setMaxItemsPerPage(int maxItemsPerPage);
+ /**
+ * Returns the current max number of items per page.
+ */
int getMaxItemsPerPage();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java Wed Aug 4 14:51:01 2010
@@ -19,10 +19,15 @@
package org.apache.chemistry.opencmis.client.api;
/**
+ * CMIS Policy.
+ *
* Domain Model 2.7
*/
public interface Policy extends FileableCmisObject {
+ /**
+ * Returns the policy text.
+ */
public String getPolicyText(); // cmis:policyText
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java Wed Aug 4 14:51:01 2010
@@ -23,22 +23,35 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
/**
- * {@see org.apache.opencmis.client.api.CMISObject#getProperties()}, {@see
- * org.apache.opencmis.client.api.Session#createProperty(String, Object)} and
- * {@see org.apache.opencmis.client.api.Session#createPropertyMultivalue(String,
- * List)}. Domain Model 2.2.1
+ * CMIS Property.
*
- * @param <T>
+ * Domain Model 2.2.1
*/
public interface Property<T> extends PropertyData<T> {
+ /**
+ * Returns if the property is a multi-value property.
+ */
boolean isMultiValued();
+ /**
+ * Returns the property data type.
+ */
PropertyType getType();
+ /**
+ * Returns the property definition.
+ */
PropertyDefinition<T> getDefinition();
+ /**
+ * Returns a human readable representation of the property value. If the
+ * property is multi-value property, only the first value will be returned.
+ */
String getValueAsString();
+ /**
+ * Returns a human readable representation of the property values.
+ */
String getValuesAsString();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java Wed Aug 4 14:51:01 2010
@@ -28,23 +28,65 @@ import org.apache.chemistry.opencmis.com
*/
public interface QueryResult {
+ /**
+ * Returns a list of all properties in this query result.
+ */
List<PropertyData<?>> getProperties();
+ /**
+ * Returns a property by id.
+ *
+ * Since repositories are not obligated to add property ids to their query
+ * result properties, this method might not always work as expected with
+ * some repositories. Use {@link #getPropertyByQueryName(String)} instead.
+ */
<T> PropertyData<T> getPropertyById(String id);
+ /**
+ * Returns a property by query name or alias.
+ */
<T> PropertyData<T> getPropertyByQueryName(String queryName);
+ /**
+ * Returns a property (single) value by id.
+ *
+ * @see #getPropertyById(String)
+ */
<T> T getPropertyValueById(String id);
+ /**
+ * Returns a property (single) value by query name or alias.
+ *
+ * @see #getPropertyByQueryName(String)
+ */
<T> T getPropertyValueByQueryName(String queryName);
+ /**
+ * Returns a property multi-value by id.
+ *
+ * @see #getPropertyById(String)
+ */
<T> List<T> getPropertyMultivalueById(String id);
+ /**
+ * Returns a property multi-value by query name or alias.
+ *
+ * @see #getPropertyByQueryName(String)
+ */
<T> List<T> getPropertyMultivalueByQueryName(String queryName);
+ /**
+ * Returns the allowable actions if they were requested.
+ */
AllowableActions getAllowableActions();
+ /**
+ * Returns the relationships if they were requested.
+ */
List<Relationship> getRelationships();
+ /**
+ * Returns the renditions if they were requested.
+ */
List<Rendition> getRenditions();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java Wed Aug 4 14:51:01 2010
@@ -19,17 +19,31 @@
package org.apache.chemistry.opencmis.client.api;
/**
+ * CMIS Relationship.
+ *
* Domain Model 2.6
*/
public interface Relationship extends CmisObject {
// relationship specific properties
+ /**
+ * Gets the source object.
+ */
CmisObject getSource(); // cmis:sourceId
+ /**
+ * Gets the source object using the given {@link OperationContext}.
+ */
CmisObject getSource(OperationContext context);
+ /**
+ * Gets the target object.
+ */
CmisObject getTarget(); // cmis:targetId
+ /**
+ * Gets the target object using the given {@link OperationContext}.
+ */
CmisObject getTarget(OperationContext context);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Session.java Wed Aug 4 14:51:01 2010
@@ -28,51 +28,76 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
/**
- * A session is associated with a specific connection to a CMIS repository. A
- * session belongs to one authenticated user and
+ * A session is a connection to a CMIS repository with a specific authenticated
+ * user.
+ *
+ * <p>
+ * Not all operations are supported by the connected repository. Either OpenCMIS
+ * or the repository will throw an exception if an unsupported operation is
+ * called. The capabilities of the repository can be discover by evaluating the
+ * repository info (see {@link #getRepositoryInfo()}).
+ * </p>
+ *
+ * <p>
+ * Almost all methods might throw exceptions derived from
+ * {@link CmisBaseException} which is a runtime exception!
+ * </p>
+ *
+ * <p>
+ * (Please refer to the <a
+ * href="http://docs.oasis-open.org/cmis/CMIS/v1.0/os/">CMIS specification</a>
+ * for details about the domain model, terms, concepts, base types, properties,
+ * ids and query names, query language, etc.)
+ * </p>
*/
public interface Session {
/**
- * Clear all cached data. This implies that all data will be reloaded from
+ * Clears all cached data. This implies that all data will be reloaded from
* the repository (depending on the implementation, reloading might be done
* immediately or be deferred).
*/
void clear();
/**
- * Save all pending actions for this session. Corresponds to a
+ * Saves all pending actions for this session. Corresponds to a
* <code>commit</code> if the CMIS provider supports transactions. If
* transactions are not supported by the CMIS provider, changes might be
* applied only partially.
+ *
+ * <em>Not all session implementations require this method!</em>
*/
void save();
/**
- * Cancel all pending actions for this session. Corresponds to a
+ * Cancels all pending actions for this session. Corresponds to a
* <code>rollback</code> if the CMIS provider supports transactions. If
* transactions are not supported by the CMIS provider, some changes might
* already be applied and therefore not rolled back.
+ *
+ * <em>Not all session implementations require this method!</em>
*/
void cancel();
// session context
/**
- * Gets the underlying binding object.
+ * Returns the underlying binding object.
*/
CmisBinding getBinding();
/**
- * Get the current default operation parameters for filtering and paging.
+ * Returns the current default operation parameters for filtering, paging
+ * and caching.
*/
OperationContext getDefaultContext();
/**
- * Set the current session parameters for filtering and paging.
+ * Sets the current session parameters for filtering, paging and caching.
*
* @param context
* the <code>OperationContext</code> to be used for the session;
@@ -81,19 +106,21 @@ public interface Session {
void setDefaultContext(OperationContext context);
/**
- * Creates a default operation context object.
+ * Creates a new operation context object.
*/
OperationContext createOperationContext();
-
+
/**
- * Creates an operation context object.
+ * Creates a new operation context object with the given properties.
+ *
+ * @see OperationContext
*/
OperationContext createOperationContext(Set<String> filter, boolean includeAcls, boolean includeAllowableActions,
boolean includePolicies, IncludeRelationships includeRelationships, Set<String> renditionFilter,
boolean includePathSegments, String orderBy, boolean cacheEnabled, int maxItemsPerPage);
/**
- * Creates an object id.
+ * Creates an object id from a String.
*/
ObjectId createObjectId(String id);
@@ -107,14 +134,14 @@ public interface Session {
// services
/**
- * Repository service <code>getRepositoryInfo()</code>.
+ * Returns the repository info of the repository associated with this
+ * session.
*/
RepositoryInfo getRepositoryInfo();
/**
- * Access to the object services <code>create</code><i>...</i>, plus factory
- * methods to create <code>Acl</code>s, <code>Ace</code>s, and
- * <code>ContentStream</code>.
+ * Gets a factory object that provides methods to create the objects used by
+ * this API.
*/
ObjectFactory getObjectFactory();
@@ -138,63 +165,156 @@ public interface Session {
// navigation
/**
- * Gets the root folder for the repository.
+ * Gets the root folder of the repository.
*/
Folder getRootFolder();
+ /**
+ * Gets the root folder of the repository with the given
+ * {@link OperationContext}.
+ */
Folder getRootFolder(OperationContext context);
/**
* Returns all checked out documents.
*
- * @see Folder#getCheckedOutDocs(int)
+ * @see Folder#getCheckedOutDocs()
*/
ItemIterable<Document> getCheckedOutDocs();
+ /**
+ * Returns all checked out documents with the given {@link OperationContext}
+ * .
+ *
+ * @see Folder#getCheckedOutDocs(OperationContext)
+ */
ItemIterable<Document> getCheckedOutDocs(OperationContext context);
/**
- * Object service <code>getObject</code>.
+ * Returns a CMIS object from the session cache. If the object is not in the
+ * cache or the cache is turned off per default {@link OperationContext}, it
+ * will load the object from the repository and puts it into the cache.
+ *
+ * @param objectId
+ * the object id
*/
CmisObject getObject(ObjectId objectId);
+ /**
+ * Returns a CMIS object from the session cache. If the object is not in the
+ * cache or the given {@link OperationContext} has caching turned off, it
+ * will load the object from the repository and puts it into the cache.
+ *
+ * @param objectId
+ * the object id
+ * @param context
+ * the {@link OperationContext} to use
+ */
CmisObject getObject(ObjectId objectId, OperationContext context);
/**
- * Object service <code>getObjectByPath</code>.
+ * Returns a CMIS object from the session cache. If the object is not in the
+ * cache or the cache is turned off per default {@link OperationContext}, it
+ * will load the object from the repository and puts it into the cache.
+ *
+ * @param path
+ * the object path
*/
CmisObject getObjectByPath(String path);
+ /**
+ * Returns a CMIS object from the session cache. If the object is not in the
+ * cache or the given {@link OperationContext} has caching turned off, it
+ * will load the object from the repository and puts it into the cache.
+ *
+ * @param path
+ * the object path
+ * @param context
+ * the {@link OperationContext} to use
+ */
CmisObject getObjectByPath(String path, OperationContext context);
// discovery
/**
- * Discovery service <code>query</code>.
+ * Sends a query to the repository. (See CMIS spec "2.1.10 Query".)
+ *
+ * @param statement
+ * the query statement (CMIS query language)
+ * @param searchAllVersions
+ * specifies if the latest and non-latest versions of document
+ * objects should be included
*/
ItemIterable<QueryResult> query(String statement, boolean searchAllVersions);
+ /**
+ * Sends a query to the repository using the given {@link OperationContext}.
+ * (See CMIS spec "2.1.10 Query".)
+ *
+ * @param statement
+ * the query statement (CMIS query language)
+ * @param searchAllVersions
+ * specifies if the latest and non-latest versions of document
+ * objects should be included
+ * @param context
+ * the OperationContext
+ */
ItemIterable<QueryResult> query(String statement, boolean searchAllVersions, OperationContext context);
/**
- * Discovery service <code>getContentChanges</code>.
+ * Returns the content changes. (See CMIS spec "2.1.11 Change Log".)
*/
ItemIterable<ChangeEvent> getContentChanges(String changeLogToken);
// create
+ /**
+ * Creates a new document.
+ *
+ * @return the object id of the new document
+ *
+ * @see Folder#createDocument(Map, ContentStream, VersioningState, List,
+ * List, List, OperationContext)
+ */
ObjectId createDocument(Map<String, ?> properties, ObjectId folderId, ContentStream contentStream,
VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces);
+ /**
+ * Creates a new document from a source document.
+ *
+ * @return the object id of the new document
+ *
+ * @see Folder#createDocumentFromSource(ObjectId, Map, VersioningState,
+ * List, List, List, OperationContext)
+ */
ObjectId createDocumentFromSource(ObjectId source, Map<String, ?> properties, ObjectId folderId,
VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces);
+ /**
+ * Creates a new folder.
+ *
+ * @return the object id of the new folder
+ *
+ * @see Folder#createFolder(Map, List, List, List, OperationContext)
+ */
ObjectId createFolder(Map<String, ?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces,
List<Ace> removeAces);
+ /**
+ * Creates a new policy.
+ *
+ * @return the object id of the new policy
+ *
+ * @see Folder#createPolicy(Map, List, List, List, OperationContext)
+ */
ObjectId createPolicy(Map<String, ?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces,
List<Ace> removeAces);
+ /**
+ * Creates a new relationship.
+ *
+ * @return the object id of the new relationship
+ */
ObjectId createRelationship(Map<String, ?> properties, List<Policy> policies, List<Ace> addAces,
List<Ace> removeAces);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/package.html
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/package.html?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/package.html (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/package.html Wed Aug 4 14:51:01 2010
@@ -36,24 +36,22 @@ The OpenCMIS client API depends on the O
</p>
<p>
To use the OpenCMIS client API, a client needs to get a reference to the entry interface
-{@link org.opencmis.client.api.SessionFactory} and then connect to the CMIS repository
-by obtaining a session to the repository from the {@code SessionFactory}.
-The way to get an instance of a {@code SessionFactory} depends on the clients runtime:
-Usually this will be done via JNDI lookup in a J2E runtime or a service lookup in a OSGi Runtime.
+{@link org.apache.chemistry.opencmis.client.api.SessionFactory} and then connect to the
+CMIS repository by obtaining a session to the repository from the {@code SessionFactory}.
+The way to get a {@code SessionFactory} instance depends on the clients runtime:
+Usually this will be done via JNDI lookup in a J2EE runtime or a service lookup in a OSGi Runtime.
</p>
<p>
-Note: A session is not thread-safe, thus either multiple sessions should be used or some
-kind of synchronization has to be used. <br/>
All operations that require a round-trip to the back-end will do that synchronously,
causing the client to be blocked during that call.</p>
<h2>Usage of the API</h2>
<p>
-See <a href="http://cwiki.apache.org/CMIS/opencmis-client-api.html">OpenCMIS Wiki</a>.
+See <a href="http://incubator.apache.org/chemistry/opencmis.html">OpenCMIS Wiki</a>.
</p>
<p>
-@see org.opencmis.client.api.SessionFactory
-@see org.opencmis.client.api.Session
+@see org.apache.chemistry.opencmis.client.api.SessionFactory
+@see org.apache.chemistry.opencmis.client.api.Session
</p>
</body>
</html>
\ No newline at end of file
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentFilableCmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentFilableCmisObject.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentFilableCmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentFilableCmisObject.java Wed Aug 4 14:51:01 2010
@@ -40,12 +40,6 @@ import org.apache.chemistry.opencmis.com
public abstract class AbstractPersistentFilableCmisObject extends AbstractPersistentCmisObject implements
FileableCmisObject {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.chemistry.opencmis.client.api.FileableCmisObject#getParents()
- */
public List<Folder> getParents() {
String objectId = getObjectId();
@@ -83,12 +77,6 @@ public abstract class AbstractPersistent
return parents;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.chemistry.opencmis.client.api.FileableCmisObject#getPaths()
- */
public List<String> getPaths() {
String objectId = getObjectId();
@@ -124,14 +112,6 @@ public abstract class AbstractPersistent
return paths;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.chemistry.opencmis.client.api.FileableCmisObject#move(org.
- * apache.opencmis.client.api.ObjectId,
- * org.apache.chemistry.opencmis.client.api.ObjectId)
- */
public FileableCmisObject move(ObjectId sourceFolderId, ObjectId targetFolderId) {
String objectId = getObjectId();
Holder<String> objectIdHolder = new Holder<String>(objectId);
@@ -159,13 +139,6 @@ public abstract class AbstractPersistent
return (FileableCmisObject) movedObject;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.chemistry.opencmis.client.api.FileableCmisObject#addToFolder
- * (org.apache.opencmis.client.api.ObjectId, boolean)
- */
public void addToFolder(ObjectId folderId, boolean allVersions) {
String objectId = getObjectId();
@@ -177,13 +150,6 @@ public abstract class AbstractPersistent
allVersions, null);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.chemistry.opencmis.client.api.FileableCmisObject#removeFromFolder
- * (org .apache.opencmis.client.api.ObjectId)
- */
public void removeFromFolder(ObjectId folderId) {
String objectId = getObjectId();
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java Wed Aug 4 14:51:01 2010
@@ -64,7 +64,7 @@ public class OperationContextImpl implem
setCacheEnabled(false);
generateCacheKey();
- setMaxItemsPerPage(100); // default
+ setMaxItemsPerPage(100); // default
}
/**
@@ -83,7 +83,7 @@ public class OperationContextImpl implem
generateCacheKey();
setMaxItemsPerPage(source.getMaxItemsPerPage());
-}
+ }
/**
* Constructor with parameters.
@@ -101,15 +101,10 @@ public class OperationContextImpl implem
setOrderBy(orderBy);
setCacheEnabled(cacheEnabled);
generateCacheKey();
-
+
setMaxItemsPerPage(maxItemsPerPage);
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#getFilter()
- */
public Set<String> getFilter() {
if (this.filter == null) {
return null;
@@ -118,12 +113,6 @@ public class OperationContextImpl implem
return Collections.unmodifiableSet(this.filter);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setFilter(java.util.Set)
- */
public void setFilter(Set<String> propertyFilter) {
if (propertyFilter != null) {
TreeSet<String> tempSet = new TreeSet<String>();
@@ -161,13 +150,6 @@ public class OperationContextImpl implem
generateCacheKey();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setFilter(java.lang.String
- * )
- */
public void setFilterString(String propertyFilter) {
if (propertyFilter == null) {
setFilter(null);
@@ -183,11 +165,6 @@ public class OperationContextImpl implem
setFilter(tempSet);
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#getFilterString()
- */
public String getFilterString() {
if (this.filter == null) {
return null;
@@ -214,97 +191,42 @@ public class OperationContextImpl implem
return sb.toString();
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#isIncludeAcls()
- */
public boolean isIncludeAcls() {
return includeAcls;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setIncludeAcls(boolean)
- */
public void setIncludeAcls(boolean include) {
this.includeAcls = include;
generateCacheKey();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#isIncludeAllowableActions
- * ()
- */
public boolean isIncludeAllowableActions() {
return this.includeAllowableActions;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setIncludeAllowableActions
- * (boolean)
- */
public void setIncludeAllowableActions(boolean include) {
this.includeAllowableActions = include;
generateCacheKey();
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#isIncludePolicies()
- */
public boolean isIncludePolicies() {
return this.includePolicies;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setIncludePolicies(boolean
- * )
- */
public void setIncludePolicies(boolean include) {
this.includePolicies = include;
generateCacheKey();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#getIncludeRelationships()
- */
public IncludeRelationships getIncludeRelationships() {
return this.includeRelationships;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setIncludeRelationships
- * (org.apache.opencmis .commons.enums.IncludeRelationships)
- */
public void setIncludeRelationships(IncludeRelationships include) {
this.includeRelationships = include;
generateCacheKey();
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#getRenditionFilter()
- */
public Set<String> getRenditionFilter() {
if (this.renditionFilter == null) {
return null;
@@ -313,13 +235,6 @@ public class OperationContextImpl implem
return Collections.unmodifiableSet(this.renditionFilter);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setRenditionFilter(java
- * .util.Set)
- */
public void setRenditionFilter(Set<String> renditionFilter) {
TreeSet<String> tempSet = new TreeSet<String>();
@@ -351,13 +266,6 @@ public class OperationContextImpl implem
generateCacheKey();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setRenditionFilterString
- * (java.lang.String)
- */
public void setRenditionFilterString(String renditionFilter) {
if (renditionFilter == null) {
setRenditionFilter(null);
@@ -373,13 +281,6 @@ public class OperationContextImpl implem
setRenditionFilter(tempSet);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#getRenditionFilterString
- * ()
- */
public String getRenditionFilterString() {
if (this.renditionFilter == null) {
return null;
@@ -398,71 +299,30 @@ public class OperationContextImpl implem
return sb.toString();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#isIncludePathSegments()
- */
public boolean isIncludePathSegments() {
return includePathSegments;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setIncludePathSegments
- * (boolean)
- */
public void setIncludePathSegments(boolean include) {
this.includePathSegments = include;
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#getOrderBy()
- */
public String getOrderBy() {
return this.orderBy;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setOrderBy(java.lang.
- * String)
- */
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#isCacheEnabled()
- */
public boolean isCacheEnabled() {
return cacheEnabled;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.opencmis.client.api.OperationContext#setCacheEnabled(boolean)
- */
public void setCacheEnabled(boolean cacheEnabled) {
this.cacheEnabled = cacheEnabled;
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.opencmis.client.api.OperationContext#getCacheKey()
- */
public String getCacheKey() {
return cacheKey;
}
@@ -493,7 +353,7 @@ public class OperationContextImpl implem
}
public int getMaxItemsPerPage() {
- return this.maxItemsPerPage ;
+ return this.maxItemsPerPage;
}
public void setMaxItemsPerPage(int maxItemsPerPage) {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Ace.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Ace.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Ace.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Ace.java Wed Aug 4 14:51:01 2010
@@ -20,18 +20,31 @@ package org.apache.chemistry.opencmis.co
import java.util.List;
-
/**
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
+ * Access Control Entry (ACE).
*/
public interface Ace extends ExtensionsData {
+ /**
+ * Returns the ACE principal.
+ */
Principal getPrincipal();
+ /**
+ * Returns the ACE principal id.
+ *
+ * Shortcut for <code>getPrincipal().getId()</code>.
+ */
String getPrincipalId();
+ /**
+ * Returns the permissions granted to the principal.
+ */
List<String> getPermissions();
+ /**
+ * Indicates if the ACE was directly applied to the object or has been
+ * inherited from another object (e.g. from the folder it resides in).
+ */
boolean isDirect();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Acl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Acl.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Acl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Acl.java Wed Aug 4 14:51:01 2010
@@ -20,14 +20,24 @@ package org.apache.chemistry.opencmis.co
import java.util.List;
-
/**
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
+ * Access Control List (ACL).
*/
public interface Acl extends ExtensionsData {
+ /**
+ * Returns the list of ACEs.
+ */
List<Ace> getAces();
+ /**
+ * Indicates if this ACL expresses all permissions.
+ *
+ * @return if <code>true</code> then the ACL expresses the exact permission
+ * set, if <code>false</code> then there are other permission rules
+ * that cannot be expressed through ACEs, if <code>null</code> then
+ * it this in unknown (the repository did not provide this
+ * information)
+ */
Boolean isExact();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/ContentStream.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/ContentStream.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/ContentStream.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/ContentStream.java Wed Aug 4 14:51:01 2010
@@ -21,16 +21,47 @@ package org.apache.chemistry.opencmis.co
import java.io.InputStream;
import java.math.BigInteger;
-
+/**
+ * Content stream.
+ */
public interface ContentStream extends ExtensionsData {
+ /**
+ * Returns the length of stream.
+ *
+ * @return the length of the stream in bytes or <code>-1</code> if the
+ * length is unknown
+ */
long getLength();
+ /**
+ * Returns the length of stream.
+ *
+ * @return the length of the stream in bytes or <code>null</code> if the
+ * length is unknown
+ */
BigInteger getBigLength();
+ /**
+ * Returns the MIME type of the stream.
+ *
+ * @return the MIME type of the stream or <code>null</code> if the MIME type
+ * is unknown
+ */
String getMimeType();
+ /**
+ * Returns the file name of the stream.
+ *
+ * @return the file name of the stream or <code>null</code> if the file name
+ * is unknown
+ */
String getFileName();
+ /**
+ * Returns the stream.
+ *
+ * It is important to close this stream properly!
+ */
InputStream getStream();
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Principal.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Principal.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Principal.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Principal.java Wed Aug 4 14:51:01 2010
@@ -19,11 +19,12 @@
package org.apache.chemistry.opencmis.commons.data;
/**
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
+ * ACE Principal.
*/
public interface Principal extends ExtensionsData {
+ /**
+ * Returns the principal id.
+ */
String getId();
-
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyData.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyData.java?rev=982271&r1=982270&r2=982271&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyData.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyData.java Wed Aug 4 14:51:01 2010
@@ -22,9 +22,6 @@ import java.util.List;
/**
* Base property interface.
- *
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
*/
public interface PropertyData<T> extends ExtensionsData {