jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r765129 [2/5] - in /jackrabbit/sandbox/chemistry: ./ chemistry-api/ chemistry-api/src/ chemistry-api/src/main/ chemistry-api/src/main/java/ chemistry-api/src/main/java/org/ chemistry-api/src/main/java/org/apache/ chemistry-api/src/main/java...
Date Wed, 15 Apr 2009 10:49:35 GMT
Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,717 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.chemistry.type.BaseType;
+
+/**
+ * A SPI connection to a CMIS Repository.
+ * <p>
+ * This API contains low-level methods that mirror the CMIS specification.
+ *
+ * @author Florent Guillaume
+ */
+public interface SPI {
+
+    /**
+     * Gets the high-level connection for this SPI connection.
+     *
+     * @return the connection
+     */
+    Connection getConnection();
+
+    /*
+     * ----- Navigation Services -----
+     */
+
+    /**
+     * Gets the descendants of a folder.
+     * <p>
+     * Returns the descendant objects contained at one or more levels in the
+     * tree rooted at the specified folder. The ordering and tree walk algorithm
+     * is repository-specific, but should be consistent. A depth of 1 means
+     * returning only the direct children (same as {@link #getChildren}
+     * <p>
+     * Only the filter-selected properties associated with each object are
+     * returned. The content stream is not returned.
+     * <p>
+     * For a repository that supports version-specific filing, this will return
+     * the version of the documents in the folder specified by the user filing
+     * the documents. Otherwise, the latest version of the documents will be
+     * returned.
+     * <p>
+     * If type is {@code null}, then at each level folders should be returned
+     * before other types of objects.
+     * <p>
+     * As relationships are not fileable, type cannot be
+     * {@link BaseType#RELATIONSHIP}. However, if includeRelationships is set
+     * then relationships are also returned for each returned object, according
+     * to the value of the parameter.
+     * <p>
+     * If includeAllowableActions is {@code true}, the repository will return
+     * the allowable actions for the current user for each descendant object as
+     * part of the results.
+     * <p>
+     * When returning more than one level, the objects are nested.
+     *
+     * @param folderId the folder ID
+     * @param type the base type, or {@code null} for all types
+     * @param depth the depth, or {@code -1} for all levels
+     * @param filter the properties filter, or {@code null} for all properties
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @param orderBy an {@code ORDER BY} clause, or {@code null}
+     */
+    // TODO return type for a tree
+    List<ObjectEntry> getDescendants(String folderId, BaseType type, int depth,
+            String filter, boolean includeAllowableActions,
+            boolean includeRelationships, String orderBy);
+
+    /**
+     * Gets the direct children of a folder.
+     * <p>
+     * Only the filter-selected properties associated with each object are
+     * returned. The content stream is not returned.
+     * <p>
+     * For a repository that supports version-specific filing, this will return
+     * the version of the documents in the folder specified by the user filing
+     * the documents. Otherwise, the latest version of the documents will be
+     * returned.
+     * <p>
+     * Ordering is repository-specific, except that if the repository state has
+     * not changed then the ordering remains consistent across invocations.
+     * <p>
+     * If type is {@code null}, then at each level folders should be returned
+     * before other types of objects.
+     * <p>
+     * As relationships are not fileable, type cannot be
+     * {@link BaseType#RELATIONSHIP}. However, if includeRelationships is set
+     * then relationships are also returned for each returned object, according
+     * to the value of the parameter.
+     * <p>
+     * If includeAllowableActions is {@code true}, the repository will return
+     * the allowable actions for the current user for each descendant object as
+     * part of the results.
+     * <p>
+     * When returning more than one level, the objects are nested.
+     * <p>
+     * The return value hasMoreItems is filled if {@code maxItems > 0}.
+     *
+     * @param folderId the folder ID
+     * @param type the base type, or {@code null} for all types
+     * @param filter the properties filter, or {@code null} for all properties
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @param maxItems the maximum number of objects to returned, or {@code 0}
+     *            for a repository-specific default
+     * @param skipCount the skip count
+     * @param orderBy an {@code ORDER BY} clause, or {@code null}
+     * @param hasMoreItems a 1-value boolean array to return a flag stating if
+     *            there are more items
+     */
+    List<ObjectEntry> getChildren(String folderId, BaseType type,
+            String filter, boolean includeAllowableActions,
+            boolean includeRelationships, int maxItems, int skipCount,
+            String orderBy, boolean[] hasMoreItems);
+
+    /**
+     * Gets the parent of a folder.
+     * <p>
+     * Returns {@code null} if the specified folder is the root folder.
+     * <p>
+     * To find the parent of a non-folder, use {@link #getObjectParents}.
+     * <p>
+     * If returnToRoot is {@code false}, returns only the immediate parent of
+     * the folder. If {@code true}, return an ordered list of all ancestor
+     * folders from the specified folder to the root folder. The resulting list
+     * is ordered by ancestry, closest to specified folder first. However, as
+     * XML clients may not always respect ordering, repositories should always
+     * include the parent and the ObjectID property in the filter to allow
+     * re-ordering if necessary.
+     *
+     * @param folderId the folder ID
+     * @param filter the properties filter, or {@code null} for all properties
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @param returnToRoot {@code true} if all ancestors must be returned
+     * @return the parents and optionally relationships
+     */
+    List<ObjectEntry> getFolderParent(String folderId, String filter,
+            boolean includeAllowableActions, boolean includeRelationships,
+            boolean returnToRoot);
+
+    /**
+     * Gets the direct parents of an object.
+     * <p>
+     * The object must be a non-folder, fileable object.
+     * <p>
+     * To find the parent of a folder, use {@link #getFolderParent}.
+     *
+     * @param objectId the object ID
+     * @param filter the properties filter, or {@code null} for all properties
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @param maxItems the maximum number of objects to returned, or {@code 0}
+     *            for a repository-specific default
+     * @param skipCount the skip count
+     * @return the collection of parent folders
+     */
+    Collection<ObjectEntry> getObjectParents(String objectId, String filter,
+            boolean includeAllowableActions, boolean includeRelationships);
+
+    /**
+     * Gets the list of documents that are checked out that the user has access
+     * to.
+     * <p>
+     * Most likely this will be the set of documents checked out by the user, bu
+     * the repository may also include checked-out objects that the calling user
+     * has access to, but did not check out.
+     * <p>
+     * If folderId is not {@code null}, then the results include only direct
+     * children of that folder.
+     * <p>
+     * The return value hasMoreItems is filled if {@code maxItems > 0}.
+     *
+     * @param folderId the folder ID, or {@code null}
+     * @param filter
+     * @param includeAllowableActions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @param maxItems
+     * @param hasMoreItems a 1-value boolean array to return a flag stating if
+     *            there are more items
+     * @param skipCount
+     */
+    Collection<ObjectEntry> getCheckedoutDocuments(String folderId,
+            String filter, boolean includeAllowableActions,
+            boolean includeRelationships, int maxItems, int skipCount,
+            boolean[] hasMoreItems);
+
+    /*
+     * ----- Object Services -----
+     */
+
+    /**
+     * Creates a document.
+     * <p>
+     * Creates a document of the specified type, and optionally adds the
+     * document to a folder.
+     * <p>
+     * The versioningState input is used to create a document in a
+     * {@link VersioningState#CHECKED_OUT CHECKED_OUT} state, or as a checked-in
+     * {@link VersioningState#MINOR MINOR} version, or as a checked-in
+     * {@link VersioningState#MAJOR MAJOR} version. If created in a
+     * {@link VersioningState#CHECKED_OUT CHECKED_OUT} state, the object is a
+     * private working copy and there is no corresponding
+     * "checked out document".
+     *
+     * @param typeId the document type ID
+     * @param properties the properties
+     * @param folderId the containing folder ID, or {@code null}
+     * @param contentStream the content stream, or {@code null}
+     * @param versioningState the versioning state
+     * @return the ID of the created document
+     */
+    String createDocument(String typeId, Map<String, Serializable> properties,
+            String folderId, ContentStream contentStream,
+            VersioningState versioningState);
+
+    /**
+     * Creates a folder.
+     * <p>
+     * Creates a folder object of the specified type.
+     *
+     * @param typeId the folder type ID
+     * @param properties the properties
+     * @param folderId the containing folder ID
+     * @return the ID of the created folder
+     */
+    String createFolder(String typeId, Map<String, Serializable> properties,
+            String folderId);
+
+    /**
+     * Creates a relationship.
+     * <p>
+     * Creates a relationship of the specified type.
+     *
+     * @param typeId the relationship type ID
+     * @param properties the properties
+     * @param sourceId the source ID
+     * @param targetId the target ID
+     * @return the ID of the created relationship
+     */
+    String createRelationship(String typeId,
+            Map<String, Serializable> properties, String sourceId,
+            String targetId);
+
+    /**
+     * Creates a policy.
+     * <p>
+     * Creates a policy of the specified type, and optionally adds the policy to
+     * a folder.
+     *
+     * @param typeId the relationship type ID
+     * @param properties the properties
+     * @param folderId the containing folder ID, or {@code null}
+     * @return the ID of the created policy
+     */
+    String createPolicy(String typeId, Map<String, Serializable> properties,
+            String folderId);
+
+    /**
+     * Gets the allowable actions.
+     * <p>
+     * Returns the list of allowable actions for an object based on the current
+     * user's context, subject to any access constraints that are currently
+     * imposed by the repository.
+     *
+     * @param objectId the object ID
+     * @param asUser the user for which the check should be made, or {@code
+     *            null} for the current user
+     * @return the allowable actions
+     */
+    Collection<String> getAllowableActions(String objectId, String asUser);
+
+    /**
+     * Gets the properties of an object.
+     * <p>
+     * Returns the properties of an object, and optionally the operations that
+     * the user is allowed to perform on the object.
+     * <p>
+     * If a returnVersion is specified, it's actually the properties of that
+     * version of the given object that is returned.
+     * <p>
+     * The content stream of the object is not returned, use
+     * {@link #getContentStream} for that.
+     *
+     * @param objectId the object ID
+     * @param returnVersion the version to be returned
+     * @param filter the properties filter, or {@code null} for all properties
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @return the properties of the object
+     */
+    ObjectEntry getProperties(String objectId, ReturnVersion returnVersion,
+            String filter, boolean includeAllowableActions,
+            boolean includeRelationships);
+
+    /**
+     * Gets the content stream for a document.
+     *
+     * @param documentId the document ID
+     * @param offset the offset into the content stream
+     * @param length the length of stream to return, or {@code -1} for all
+     * @return the specified part of the content stream
+     * @throws IOException
+     */
+    InputStream getContentStream(String documentId, int offset, int length)
+            throws IOException;
+
+    /**
+     * Sets the content stream for a document.
+     * <p>
+     * Sets (creates or replaces) the content stream for the specified document.
+     * This is considered an update of the document object.
+     * <p>
+     * If the document is a private working copy, some repositories may not
+     * support updates.
+     * <p>
+     * Because repositories may automatically create new document versions on a
+     * user's behalf, the document ID returned may not match the one provided as
+     * a parameted to this method.
+     *
+     * @param documentId the document ID
+     * @param overwrite {@code true} if an already-existing content stream must
+     *            be overwritten
+     * @param contentStream the content stream to set
+     * @return the document ID, which may differ from the passed one
+     */
+    void setContentStream(String documentId, boolean overwrite,
+            ContentStream contentStream);
+
+    /**
+     * Deletes the content stream for a document.
+     * <p>
+     * This does not delete properties. If there are other versions this does
+     * not affect them, their properties or their content streams. This does not
+     * change the ID of the document.
+     * <p>
+     * This is considered an update of the document object.
+     * <p>
+     * If the document is a private working copy, some repositories may not
+     * support updates.
+     *
+     * @param documentId the document ID
+     */
+    void deleteContentStream(String documentId);
+
+    /**
+     * Updates the properties of an object.
+     * <p>
+     * To remove a property, specify property with a {@code null} value. For
+     * multi-value properties, the whole list of values must be provided on
+     * every update. Properties not specified are not changed.
+     * <p>
+     * If the object is a private working copy, some repositories may not
+     * support updates.
+     * <p>
+     * If a changeToken was provided when the object was retrieved, the change
+     * token must be included as-is when calling this method.
+     * <p>
+     * Because repositories may automatically create new document versions on a
+     * user's behalf, the object ID returned may not match the one provided as a
+     * parameter to this method.
+     *
+     * @param objectId the object ID
+     * @param changeToken the change token, or {@code null}
+     * @param properties the properties to change
+     * @return the object ID, which may differ from the passed one
+     */
+    String updateProperties(String objectId, String changeToken,
+            Map<String, Serializable> properties);
+
+    /**
+     * Moves the specified filed object from one folder to another.
+     * <p>
+     * The targetFolderId is the ID of the target folder into which the object
+     * has to be moved. When the object is multi-filed, a source folder ID to be
+     * moved out of must be specified.
+     *
+     * @param objectId the object ID
+     * @param targetFolderId the target folder ID
+     * @param sourceFolderId the source folder ID, or {@code null}
+     */
+    void moveObject(String objectId, String targetFolderId,
+            String sourceFolderId);
+
+    /**
+     * Deletes the specified object.
+     * <p>
+     * When a filed object is deleted, it is removed from all folders it is
+     * filed in.
+     * <p>
+     * This service deletes a specific version of a document object. To delete
+     * all versions, use {@link #deleteAllVersions}.
+     * <p>
+     * Deletion of a private working copy (checked out version) is the same as
+     * to cancel checkout.
+     *
+     * @param objectId the object ID
+     */
+    void deleteObject(String objectId);
+
+    /**
+     * Deletes a tree of objects.
+     * <p>
+     * Deletes the tree rooted at the specified folder (including that folder).
+     * <p>
+     * If a non-folder object is removed from the last folder it is filed in, it
+     * can continue to survive outside of the folder structure if the repository
+     * supports unfiling; this is controlled based on the unfiling parameter.
+     * <p>
+     * For repositories that support version-specific filing, this may delete
+     * some versions of a document but not necessarily all versions. For
+     * repositories that do not support version-specific filing, if a document
+     * is to be deleted, all versions are deleted.
+     * <p>
+     * This method is not transactional. However, if
+     * {@link Unfiling#DELETE_SINGLE_FILED DELETE_SINGLE_FILED} and some objects
+     * fail to delete, then single-filed objects are either deleted or kept,
+     * never just unfiled. This is so that user can call this method again to
+     * recover from the error by using the same tree.
+     * <p>
+     * The order in which deletion will happen is unspecified; however, any
+     * objects that are not deleted (e.g., because a previous object failed to
+     * delete) remain valid objects (including any applicable filing
+     * constraint).
+     * <p>
+     * Returns the collection of IDs of objects that could not be deleted. If
+     * all objects could be deleted, an empty collection is returned. If at
+     * least one object could not be deleted, then if continueOnFailure is
+     * {@code false} that single object ID is returned, otherwise all IDs of
+     * objects that could not be deleted are returned.
+     *
+     * @param folderId the folder ID
+     * @param unfiling how to unfile non-folder objects, if {@code null} then
+     *            same as {@link Unfiling#DELETE}
+     * @param continueOnFailure {@code true} if failure to delete one object
+     *            should not stop deletion of other objects
+     * @return the collection of IDs of objects that could not be deleted
+     */
+    Collection<String> deleteTree(String folderId, Unfiling unfiling,
+            boolean continueOnFailure);
+
+    /**
+     * Adds an existing non-folder, fileable object to a folder.
+     *
+     * @param objectId the object ID
+     * @param folderId the folder ID
+     */
+    void addObjectToFolder(String objectId, String folderId);
+
+    /**
+     * Removes a non-folder object from a folder or from all folders.
+     * <p>
+     * If folderId is {@code null}, then the the object is removed from all
+     * folders.
+     * <p>
+     * This never deletes the object, which means that if unfiling is not
+     * supported, and an object is to be removed from the last folder it exists
+     * in, or is to be removed from all folders, an exception will be thrown.
+     *
+     * @param objectId the object ID
+     * @param folderId the folder ID, or {@code null} for all folders
+     */
+    void removeObjectFromFolder(String objectId, String folderId);
+
+    /*
+     * ----- Discovery Services -----
+     */
+
+    /**
+     * Queries the repository for queryable objects.
+     * <p>
+     * The query is based on properties or an optional full-text string.
+     * <p>
+     * Content-streams are not returned as part of the query.
+     * <p>
+     * If searchAllVersions is {@code true}, and {@code CONTAINS()} is used in
+     * the query, an exception will be thrown if full-text search is not
+     * supported or if the repository does not have previous versions in the
+     * full-text index.
+     * <p>
+     * Returns a result table produced by the query statement. Typically each
+     * row of this table corresponds to an object, and each column corresponds
+     * to a property or a computed value as specified by the {@code SELECT}
+     * clause of the query statement.
+     * <p>
+     * If includeAllowableActions is {@code true}, the repository will return
+     * the allowable actions for the current user for each result object in the
+     * output table as an additional multi-valued column containing computed
+     * values of type String, provided that each row in the output table indeed
+     * corresponds to one object (which is true for a query without {@code JOIN}
+     * ). If each row in the output table does not correspond to a specific
+     * object and includeAllowableActions is {@code true}, then an exception
+     * will be thrown.
+     * <p>
+     * The return value hasMoreItems is filled if {@code maxItems > 0}.
+     *
+     * @param statement the SQL statement
+     * @param searchAllVersions {@code true} if all versions (not only that
+     *            latest) must be searched
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param includeRelationships {@code true} if relationships should be
+     *            included as well
+     * @param maxItems the maximum number of objects to returned, or {@code 0}
+     *            for a repository-specific default
+     * @param skipCount the skip count
+     * @param hasMoreItems
+     * @return the matching objects
+     */
+    // TODO returns a result set actually, there may be computed values
+    Collection<ObjectEntry> query(String statement, boolean searchAllVersions,
+            boolean includeAllowableActions, boolean includeRelationships,
+            int maxItems, int skipCount, boolean[] hasMoreItems);
+
+    /*
+     * ----- Versioning Services -----
+     */
+
+    /**
+     * Checks out a document.
+     * <p>
+     * Creates a private working copy of the document, copies the metadata and
+     * optionally content.
+     * <p>
+     * It is up to the repository to determine if updates to the current version
+     * (not private working copy) and prior versions are allowed if checked out.
+     * <p>
+     * Some repositories may not support updating of private working copies and
+     * the updates must then be supplied via {@link #checkIn}.
+     * <p>
+     * This method may remove update permission on prior versions.
+     * <p>
+     * The ID of the private working copy is returned.
+     * <p>
+     * The return value contentCopied[0] is set to {@code true} if the content
+     * is copied, {@code false} if not. Whether the content is copied on
+     * check-out or not is repository-specific.
+     *
+     * @param documentId the document ID
+     * @param contentCopied a return array of size 1
+     * @return ID of the private working copy
+     */
+    String checkOut(String documentId, boolean[] contentCopied);
+
+    /**
+     * Cancels a check-out.
+     * <p>
+     * Reverses the effect of a check-out. Removes the private working copy of
+     * the checked-out document, allowing other documents in the version series
+     * to be checked out again.
+     *
+     * @param documentId the private working copy ID
+     */
+    void cancelCheckOut(String documentId);
+
+    /**
+     * Checks in a private working copy.
+     * <p>
+     * Makes the private working copy the current version of the document.
+     *
+     * @param documentId the private working copy ID
+     * @param major {@code true} if the version is a major version
+     * @param properties the properties to set on the document, or {@code null}
+     * @param contentStream the content stream to set on the document, or
+     *            {@code null}
+     * @param comment a check-in comment, or {@code null}
+     * @return the ID for the new version of the document
+     */
+    String checkIn(String documentId, boolean major,
+            Map<String, Serializable> properties, ContentStream contentStream,
+            String comment);
+
+    /**
+     * Gets the properties of the latest version.
+     * <p>
+     * Returns the properties of the latest version, or the latest major
+     * version, of the specified version series.
+     * <p>
+     * If the latest major version is requested and the series has no major
+     * version, an exception is thrown.
+     *
+     * @param versionSeriesId the version series ID
+     * @param majorVersion {@code true} if the last major version is requested
+     * @param filter the properties filter, or {@code null} for all properties
+     * @return a collection of properties
+     */
+    Map<String, Serializable> getPropertiesOfLatestVersion(
+            String versionSeriesId, boolean majorVersion, String filter);
+
+    /**
+     * Gets all the versions of a document.
+     * <p>
+     * Returns the list of all document versions for the specified version
+     * series, sorted by CREATION_DATE descending. All versions that the user
+     * can access, including checked-out version and private working copy, are
+     * returned.
+     *
+     * @param versionSeriesId the version series ID
+     * @param filter the properties filter, or {@code null} for all properties
+     */
+    Collection<ObjectEntry> getAllVersions(String versionSeriesId, String filter);
+
+    /**
+     * Deletes all the versions of a document.
+     * <p>
+     * Deletes all document versions in the specified version series.
+     *
+     * @param versionSeriesId the version series ID
+     */
+    void deleteAllVersions(String versionSeriesId);
+
+    /*
+     * ----- Relationship Services -----
+     */
+
+    /**
+     * Gets the relationships having as source or target a given document.
+     * <p>
+     * Returns a list of relationships associated with the given object,
+     * optionally of a specified relationship type, and optionally in a
+     * specified direction.
+     * <p>
+     * If typeId is {@code null}, returns relationships of any type.
+     * <p>
+     * Ordering is repository specific but consistent across requests.
+     *
+     * @param objectId the object ID
+     * @param direction the direction of relationships to include
+     * @param typeId the type ID, or {@code null}
+     * @param includeSubRelationshipTypes {@code true} if relationships of any
+     *            sub-type of typeId are to be returned as well
+     * @param filter the properties filter, or {@code null} for all properties
+     * @param includeAllowableActions {@code true} to include allowable actions
+     * @param maxItems the maximum number of objects to returned, or {@code 0}
+     *            for a repository-specific default
+     * @param skipCount the skip count
+     * @param hasMoreItems a 1-value boolean array to return a flag stating if
+     *            there are more items
+     * @return the list of relationships
+     */
+    List<ObjectEntry> getRelationships(String objectId,
+            RelationshipDirection direction, String typeId,
+            boolean includeSubRelationshipTypes, String filter,
+            String includeAllowableActions, int maxItems, int skipCount,
+            boolean[] hasMoreItems);
+
+    /*
+     * ----- Policy Services -----
+     */
+
+    /**
+     * Applies a policy to an object.
+     * <p>
+     * The target object must be controllable.
+     *
+     * @param policyId the policy ID
+     * @param objectId the target object ID
+     */
+    void applyPolicy(String policyId, String objectId);
+
+    /**
+     * Removes a policy from an object.
+     * <p>
+     * Removes a previously applied policy from a target object. The policy is
+     * not deleted, and may still be applied to other objects.
+     * <p>
+     * The target object must be controllable.
+     *
+     * @param policyId the policy ID
+     * @param objectId the target object ID
+     */
+    void removePolicy(String policyId, String objectId);
+
+    /**
+     * Gets the policies applied to an object.
+     * <p>
+     * Returns the list of policy objects currently applied to a target object.
+     * Only policies that are directly (explicitly) applied to the target object
+     * are returned.
+     * <p>
+     * The target object must be controllable.
+     *
+     * @param objectId the target object ID
+     * @param filter the properties filter, or {@code null} for all properties
+     */
+    Collection<ObjectEntry> getAppliedPolicies(String objectId, String filter);
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Unfiling.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Unfiling.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Unfiling.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Unfiling.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry;
+
+/**
+ * Flag specifying how to unfile non-folder objects when a tree of objects is
+ * deleted through {@link Connection#deleteTree}.
+ *
+ * @author Florent Guillaume
+ */
+public enum Unfiling {
+
+    /**
+     * Unfile all non-folder objects from folders in this tree. They may remain
+     * filed in other folders, or may become unfiled if no other folder contains
+     * them.
+     */
+    UNFILE("unfile"),
+
+    /**
+     * Deletes non-folder objects filed only in this tree, and unfiles the
+     * others so they remain filed in other folders.
+     */
+    DELETE_SINGLE_FILED("deletesinglefiled"),
+
+    /**
+     * Deletes all non-folder objects in this tree.
+     */
+    DELETE("delete");
+
+    private final String value;
+
+    private Unfiling(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Unfiling.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Unfiling.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/VersioningState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/VersioningState.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/VersioningState.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/VersioningState.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry;
+
+/**
+ * State of a document when it is created.
+ *
+ * @author Florent Guillaume
+ */
+public enum VersioningState {
+
+    /**
+     * Create the document as a private working copy.
+     */
+    CHECKED_OUT("checkedout"),
+
+    /**
+     * Create the document as a checked in minor version.
+     */
+    MINOR("minor"),
+
+    /**
+     * Create the document as a checked in major version.
+     */
+    MAJOR("major");
+
+    private final String value;
+
+    private VersioningState(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/VersioningState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/VersioningState.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Choice.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Choice.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Choice.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Choice.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.property;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * A CMIS Property Definition Choice.
+ *
+ * @author Florent Guillaume
+ */
+public interface Choice {
+
+    /**
+     * The choice name.
+     * <p>
+     * The name is used for presentation purpose.
+     *
+     * @return the name
+     */
+    String getName();
+
+    /**
+     * The choice value.
+     * <p>
+     * The value will be stored in the property when selected.
+     * <p>
+     * If {@code null}, then the name is displayed but not selectable.
+     *
+     * @return the value, or {@code null}
+     */
+    Serializable getValue();
+
+    /**
+     * The choice index.
+     * <p>
+     * The index provides guidance for the ordering of names when presented.
+     *
+     * @return the index
+     */
+    int getIndex();
+
+    /**
+     * The sub-choices, if hierarchical.
+     * <p>
+     * The sub-choices are returnd ordered by index.
+     *
+     * @return the collection of sub-choices, or {@code null} if none are
+     *         provided
+     */
+    List<Choice> getSubChoices();
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Choice.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Choice.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Property.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Property.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Property.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Property.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.property;
+
+import java.io.Serializable;
+
+/**
+ * CMIS Object Property.
+ *
+ * @author Florent Guillaume
+ */
+public interface Property {
+
+    /*
+     * ----- Object -----
+     */
+
+    String ID = "ObjectId";
+
+    String URI = "Uri";
+
+    String TYPE_ID = "ObjectTypeId";
+
+    String CREATED_BY = "CreatedBy";
+
+    String CREATION_DATE = "CreationDate";
+
+    String LAST_MODIFIED_BY = "LastModifiedBy";
+
+    String LAST_MODIFICATION_DATE = "LastModificationDate";
+
+    String CHANGE_TOKEN = "ChangeToken";
+
+    /*
+     * ----- Document -----
+     */
+
+    String NAME = "Name";
+
+    String IS_IMMUTABLE = "IsImmutable";
+
+    String IS_LATEST_VERSION = "IsLatestVersion";
+
+    String IS_MAJOR_VERSION = "IsMajorVersion";
+
+    String IS_LATEST_MAJOR_VERSION = "IsLatestMajorVersion";
+
+    String VERSION_LABEL = "VersionLabel";
+
+    String VERSION_SERIES_ID = "VersionSeriesId";
+
+    String IS_VERSION_SERIES_CHECKED_OUT = "IsVersionSeriesCheckedOut";
+
+    String VERSION_SERIES_CHECKED_OUT_BY = "VersionSeriesCheckedOutBy";
+
+    String VERSION_SERIES_CHECKED_OUT_ID = "VersionSeriesCheckedOutId";
+
+    String CHECKIN_COMMENT = "CheckinComment";
+
+    String CONTENT_STREAM_ALLOWED = "ContentStreamAllowed";
+
+    String CONTENT_STREAM_LENGTH = "ContentStreamLength";
+
+    String CONTENT_STREAM_MIME_TYPE = "ContentStreamMimeType";
+
+    String CONTENT_STREAM_FILENAME = "ContentStreamFilename";
+
+    String CONTENT_STREAM_URI = "ContentStreamUri";
+
+    /*
+     * ----- Folder -----
+     */
+
+    // NAME as well
+    String PARENT_ID = "ParentId";
+
+    String ALLOWED_CHILD_OBJECT_TYPE_IDS = "AllowedChildObjectTypeIds";
+
+    /*
+     * ----- Relationship -----
+     */
+
+    String SOURCE_ID = "SourceId";
+
+    String TARGET_ID = "TargetId";
+
+    /*
+     * ----- Policy -----
+     */
+
+    String POLICY_NAME = "PolicyName";
+
+    String POLICY_TEXT = "PolicyText";
+
+    /**
+     * The property definition.
+     */
+    PropertyDefinition getDefinition();
+
+    /**
+     * Gets the property value.
+     */
+    Serializable getValue();
+
+    /**
+     * Sets the property value.
+     */
+    // for connection-tied live objects
+    void setValue(Serializable value);
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Property.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Property.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyDefinition.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyDefinition.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyDefinition.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.property;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.util.List;
+
+/**
+ * A CMIS Property Definition.
+ *
+ * @author Florent Guillaume
+ */
+public interface PropertyDefinition {
+
+    /**
+     * The property's name.
+     * <p>
+     * This identifies this property among all properties of this type,
+     * including inherited properties. This is also used as a column name in a
+     * SQL query. It may be in mixed case, but must uniquely identify this
+     * property case-insensitively, and must conform to the syntax rules for SQL
+     * identifiers.
+     *
+     * @return the property's name
+     */
+    String getName();
+
+    /**
+     * The property ID.
+     * <p>
+     * This contains a system-assigned ID which uniquely identifies this
+     * property.
+     * <p>
+     * Two properties of different names from different types may have the same
+     * ID if they are considered to represent "identical" information by the
+     * repository.
+     *
+     * @return the property ID
+     */
+    String getId();
+
+    /**
+     * The property's display name.
+     * <p>
+     * This is used for presentation by the application.
+     *
+     * @return the property's display name
+     */
+    String getDisplayName();
+
+    /**
+     * The property's description.
+     * <p>
+     * This is a description of the property, or {@code null} if none is
+     * provided.
+     *
+     * @return the property's description, or {@code null}
+     */
+    String getDescription();
+
+    /**
+     * Is the property inherited.
+     * <p>
+     * This indicates whether the property is inherited from the parent type or
+     * it is explicitly defined for the type from which this property definition
+     * was retrieved.
+     *
+     * @return {@code true} if the property is inherited
+     */
+    boolean isInherited();
+
+    /**
+     * The property's type.
+     * <p>
+     * This indicates the type of this property.
+     *
+     * @return the property's type
+     */
+    PropertyType getType();
+
+    /**
+     * Is the property multi-valued.
+     * <p>
+     * Repositories should preserve the ordering of values in a multi-valued
+     * property. That is, the order in which the values of a multi-valued
+     * property are returned in "read" operations should be the same as the
+     * order in which they were supplied during previous 'write" operation.
+     *
+     * @return true if the property is multi-valued
+     */
+    boolean isMultiValued();
+
+    /**
+     * The choices for this property.
+     * <p>
+     * This is optional and is only applicable to application-maintained
+     * properties. It specifies what property values are allowed. If choices are
+     * not specified, there is no constraint on the data value.
+     * <p>
+     * The choices are returned ordered by index.
+     *
+     * @return a list of choices, or {@code null} if no choices are provided
+     */
+    List<Choice> getChoices();
+
+    /**
+     * Are the choices open.
+     * <p>
+     * This is only applicable to properties that provide a value for
+     * {@link #getChoices}.
+     * <p>
+     * If {@code false}, then the value for the property must be one of the
+     * values specified by {@link #getChoices}. If {@code true}, then values
+     * other than those included from {@link #getChoices} may be used for the
+     * property.
+     *
+     * @return {@code true} if the choices are open
+     */
+    boolean isOpenChoice();
+
+    /**
+     * Is the property required.
+     * <p>
+     * A property that is required can never be {@code null}.
+     * <p>
+     * For non-read-only properties: the value of a required property is never
+     * {@code null}. If a value is not provided by the application, then the
+     * default value is used. If no default value is defined, then this
+     * constraint is violated.
+     * <p>
+     * For read-only properties: the value of a required system property must
+     * always be set by the repository or computed by the repository when it is
+     * requested by an application. A not required system property may be left
+     * {@code null}.
+     *
+     * @return {@code true} if the property is required
+     */
+    boolean isRequired();
+
+    /**
+     * The property's default value.
+     * <p>
+     * This is optional and only applicable to application-maintained
+     * properties. The property will have this value if a value is not provided
+     * by the application. Without a default value, the property value will be
+     * left {@code null} until a value is provided by the application.
+     *
+     * @return the default value, or {@code null} if none is provided
+     */
+    Serializable getDefaultValue();
+
+    /**
+     * The property's updatability status.
+     * <p>
+     * This can be {@link Updatability#READ_ONLY read-only},
+     * {@link Updatability#READ_WRITE read-write} or
+     * {@link Updatability#WHEN_CHECKED_OUT read-write when checked out}.
+     */
+    Updatability getUpdatability();
+
+    /**
+     * Is the property queryable.
+     * <p>
+     * This defines whether or not the property can appear in the {@code WHERE}
+     * clause of a SQL {@code SELECT} statement. Only the properties of a
+     * queryable type, both inherited and specifically defined properties, may
+     * be queryable.
+     * <p>
+     * Note that "Queryable" has a different meaning for type and for property.
+     * The former pertains to the {@code FROM} clause and the latter pertains to
+     * the {@code WHERE} clause.
+     *
+     * @return {@code true} if the property is queryable
+     */
+    boolean isQueryable();
+
+    /**
+     * Is the property orderable.
+     * <p>
+     * This defines whether or not the property can appear in the {@code ORDER
+     * BY} clause of a SQL {@code SELECT} statement.
+     * <p>
+     * Only single-valued properties of a queryable type may be orderable.
+     *
+     * @return {@code true} if the property is orderable
+     */
+    boolean isOrderable();
+
+    /**
+     * The precision for this decimal property.
+     * <p>
+     * This is the precision in bits supported for this property (32 or 64
+     * currently).
+     *
+     * @return the precisions
+     */
+    int getPrecision();
+
+    /**
+     * The minimum value for this integer property.
+     *
+     * @return the minimum value, or {@code null} if none is provided
+     */
+    Integer getMinValue();
+
+    /**
+     * The maximum value for this integer property.
+     *
+     * @return the maximum value, or {@code null} if none is provided
+     */
+    Integer getMaxValue();
+
+    /**
+     * The maximum length of this string property.
+     *
+     * @return the maximum length, or -1 if none is provided
+     */
+    int getMaxLength();
+
+    /**
+     * The URI of the XML schema for this XML property.
+     * <p>
+     * This provides the URI location of an XML schema to which the property
+     * value must conform.
+     *
+     * @return the URI of the XML schema for this property
+     */
+    URI getSchemaURI();
+
+    /**
+     * The encoding for this XML property.
+     * <p>
+     * This specifies the encoding used for the property value (e.g. UTF-8,
+     * etc.).
+     *
+     * @return the encoding for this property
+     */
+    String getEncoding();
+
+    /**
+     * Checks if a value can be set in this property.
+     *
+     * @param value the candidate value
+     * @return {@code true} if the value can be set, {@code false} if not
+     */
+    boolean validates(Serializable value);
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyDefinition.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyType.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyType.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyType.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyType.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.property;
+
+/**
+ * The type of a CMIS property.
+ *
+ * @author Florent Guillaume
+ */
+public enum PropertyType {
+
+    /**
+     * A string property, represented as a {@link String}.
+     */
+    STRING("string"),
+
+    /**
+     * A decimal property, represented as a {@link java.math.BigDecimal
+     * BigDecimal}.
+     */
+    DECIMAL("decimal"),
+
+    /**
+     * An integer property, represented as a {@link Integer}.
+     */
+    INTEGER("integer"),
+
+    /**
+     * A boolean property, represented as a {@link Boolean}.
+     */
+    BOOLEAN("boolean"),
+
+    /**
+     * A date-time property, represented as a {@link java.util.Calendar
+     * Calendar}.
+     */
+    DATETIME("datetime"),
+
+    /**
+     * A URI property, represented as a {@link java.net.URI URI}.
+     */
+    URI("uri"),
+
+    /**
+     * An ID property, represented as a {@link String}.
+     */
+    ID("id"),
+
+    /**
+     * An XML property, represented as a String.
+     */
+    XML("xml"),
+
+    /**
+     * An HTML property, represented as a String.
+     */
+    HTML("html");
+
+    private final String value;
+
+    private PropertyType(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/PropertyType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Updatability.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Updatability.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Updatability.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Updatability.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.property;
+
+/**
+ * The Updatability of a property.
+ *
+ * @author Florent Guillaume
+ */
+public enum Updatability {
+
+    /**
+     * Property is read-only.
+     * <p>
+     * A read-only property is a system property that is either maintained or
+     * computed by the repository. An application can not alter the property
+     * value directly using the updateProperties() service, and often can not
+     * explicitly set the property value when the object is created. In some
+     * cases, an application may indirectly cause a change in the property value
+     * as a result of calling a special-purpose service. For example, the
+     * ParentID property of a folder object is maintained by repository. An
+     * application can not alter its value using the updateProperties() service,
+     * but may use the moveObject() service to cause a change in the value of
+     * the ParentID property.
+     */
+    READ_ONLY("readonly"),
+
+    /**
+     * Property is read-write.
+     * <p>
+     * A "read + write" property is one that is updatable using the
+     * updateProperties() service.
+     */
+    READ_WRITE("readwrite"),
+
+    /**
+     * Property is read-write when checked out.
+     * <p>
+     * A read-write when checked out property is updatable when the update is
+     * made using a Private Working Copy object ID. That is, the update is
+     * either made on a Private Working Copy object or made using a "check in"
+     * service
+     */
+    WHEN_CHECKED_OUT("whencheckedout");
+
+    private final String value;
+
+    private Updatability(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Updatability.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/property/Updatability.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/JoinCapability.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/JoinCapability.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/JoinCapability.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/JoinCapability.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+/**
+ * Support for inner and outer join in query.
+ *
+ * @author Florent Guillaume
+ */
+public enum JoinCapability {
+
+    /**
+     * No join support.
+     */
+    NO_JOIN("nojoin"),
+
+    /**
+     * Support inner join only.
+     */
+    INNER_ONLY("inneronly"),
+
+    /**
+     * Support inner and outer join.
+     */
+    INNER_AND_OUTER("innerandouter");
+
+    private final String value;
+
+    private JoinCapability(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/JoinCapability.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/JoinCapability.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/QueryCapability.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/QueryCapability.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/QueryCapability.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/QueryCapability.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+/**
+ * Support for query on full-text or metadata.
+ *
+ * @author Florent Guillaume
+ */
+public enum QueryCapability {
+
+    /**
+     * No query support.
+     */
+    NONE("none"),
+
+    /**
+     * Support only metadata queries.
+     */
+    METADATA_ONLY("metadataonly"),
+
+    /**
+     * Support only full-text queries.
+     */
+    FULL_TEXT_ONLY("fulltextonly"),
+
+    /**
+     * Support both full-text and metadata queries, but not in the same query.
+     */
+    BOTH_SEPARATE("bothseparate"),
+
+    /**
+     * Support both full-text and metadata queries, in the same query.
+     */
+    BOTH_COMBINED("bothcombined");
+
+    private final String value;
+
+    private QueryCapability(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/QueryCapability.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/QueryCapability.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/Repository.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/Repository.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/Repository.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/Repository.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.chemistry.Connection;
+import org.apache.chemistry.property.PropertyDefinition;
+import org.apache.chemistry.type.Type;
+
+/**
+ * A CMIS Repository.
+ *
+ * @author Florent Guillaume
+ * @author Bogdan Stefanescu
+ */
+public interface Repository extends RepositoryEntry {
+
+    /**
+     * Gets a connection to the repository.
+     * <p>
+     * This connection can be used to use the other services offered by the
+     * repository.
+     * <p>
+     * The connection parameters are repository-dependent; they can be used for
+     * instance to authenticate a user.
+     *
+     * @param parameters connection parameters, or {@code null}
+     */
+    Connection getConnection(Map<String, Serializable> parameters);
+
+    /*
+     * ----- Repository Services -----
+     */
+
+    /**
+     * Returns information about the repository and the capabilities it
+     * supports.
+     *
+     * @return information about the repository
+     */
+    RepositoryInfo getInfo();
+
+    /**
+     * Gets the type definitions of the repository.
+     * <p>
+     * If typeId is provided, only the specific type and its descendants are
+     * returned, otherwise all types are returned.
+     * <p>
+     * If returnPropertyDefinitions is {@code false}, then the
+     * {@link PropertyDefinition}s will not be returned in each {@link Type}.
+     *
+     * @param typeId the base type ID, or {@code null}
+     * @return the repository's types
+     */
+    Collection<Type> getTypes(String typeId, boolean returnPropertyDefinitions);
+
+    /**
+     * Gets the type definitions of the repository.
+     * <p>
+     * If typeId is provided, only the specific type and its descendants are
+     * returned, otherwise all types are returned.
+     * <p>
+     * If returnPropertyDefinitions is {@code false}, then the
+     * {@link PropertyDefinition}s will not be returned in each {@link Type}.
+     * <p>
+     * If maxItems is {@code 0} then a repository-specific maximum will be used.
+     *
+     * @param typeId the base type ID, or {@code null}
+     * @param returnPropertyDefinitions {@code false} to skip property
+     *            definitions
+     * @param maxItems the maximum number of items, or {@code 0}
+     * @param skipCount the number of results to skip in the list
+     * @param hasMoreItems a 1-value boolean array to return a flag stating if
+     *            there are more items
+     * @return the repository's types, or a subset of them
+     */
+    // this API is present to mirror the wire protocol
+    List<Type> getTypes(String typeId, boolean returnPropertyDefinitions,
+            int maxItems, int skipCount, boolean[] hasMoreItems);
+
+    /**
+     * Gets the definition for the specified type.
+     *
+     * @param typeId the type ID
+     * @return the type definition
+     */
+    Type getType(String typeId);
+
+ 
+    /**
+     * Get an extension service on this repository.
+     * This is an optional operation and may always return null if not supported. 
+     * @param <T>
+     * @param klass the interface for the requested extension
+     * @return the extension instance if any implementation was found
+     */
+    <T> T getExtension(Class<T> klass);
+    
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/Repository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/Repository.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryCapabilities.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryCapabilities.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryCapabilities.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+/**
+ * The capabilities of a CMIS Repository.
+ *
+ * @author Florent Guillaume
+ */
+public interface RepositoryCapabilities {
+
+    /**
+     * Ability to file a document (or other fileable object) in more than a
+     * folder.
+     */
+    boolean hasMultifiling();
+
+    /**
+     * Ability to leave a document (or other fileable object) not filed in a any
+     * folder.
+     */
+    boolean hasUnfiling();
+
+    /**
+     * Ability to file a particular version of a document in a folder.
+     */
+    boolean hasVersionSpecificFiling();
+
+    /**
+     * Ability to update the private working copy of a checked-out document.
+     */
+    boolean isPWCUpdatable();
+
+    /**
+     * Ability to include the private working copy of checked-out documents in
+     * query search scope; otherwise private working copies are not searchable.
+     */
+    boolean isPWCSearchable();
+
+    /**
+     * Ability to include non-latest versions of document in query search scope;
+     * otherwise only the latest version of each document is searchable.
+     */
+    // prefixed by "is" to follow the JavaBean spec
+    boolean isAllVersionsSearchable();
+
+    /**
+     * Support for query on full-text or metadata.
+     */
+    QueryCapability getQueryCapability();
+
+    /**
+     * Support for inner and outer join in query.
+     */
+    JoinCapability getJoinCapability();
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryCapabilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryCapabilities.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryEntry.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryEntry.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryEntry.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+import java.net.URI;
+
+/**
+ * Basic information about a CMIS Repository.
+ *
+ * @author Florent Guillaume
+ */
+public interface RepositoryEntry {
+
+    /**
+     * The repository ID.
+     * <p>
+     * The ID is an opaque string.
+     */
+    String getId();
+
+    /**
+     * The repository name.
+     */
+    String getName();
+
+    /**
+     * The repository URI.
+     */
+    URI getURI();
+
+    /**
+     * The relationship name to another repository.
+     * <p>
+     * This returns a value only when this basic info was returned by
+     * {@link RepositoryInfo#getRelatedRepositories}.
+     *
+     * @return a relationship name, or {@code null}
+     */
+    String getRelationshipName();
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryEntry.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryInfo.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryInfo.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryInfo.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+import java.util.Collection;
+
+/**
+ * Information about a CMIS Repository.
+ *
+ * @author Florent Guillaume
+ */
+public interface RepositoryInfo extends RepositoryEntry {
+
+    /**
+     * The repository description.
+     */
+    String getDescription();
+
+    /**
+     * The ID of the root Folder of the repository.
+     */
+    String getRootFolderId();
+
+    /**
+     * The repository vendor name.
+     */
+    String getVendorName();
+
+    /**
+     * The repository product name.
+     */
+    String getProductName();
+
+    /**
+     * The repository product version.
+     */
+    String getProductVersion();
+
+    /**
+     * The CMIS version supported by the repository.
+     */
+    String getVersionSupported();
+
+    /**
+     * Some repository-specific information.
+     *
+     * @return an XML Document, or {@code null} if no information is provided
+     */
+    org.w3c.dom.Document getRepositorySpecificInformation();
+
+    /**
+     * The capabilities of the repository.
+     */
+    RepositoryCapabilities getCapabilities();
+
+    /**
+     * The related repositories.
+     *
+     * @return the related repositories, or {@code null} if no information is
+     *         provided
+     */
+    Collection<RepositoryEntry> getRelatedRepositories();
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryInfo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryService.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryService.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryService.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.repository;
+
+import java.util.Collection;
+
+/**
+ * CMIS Repository Service.
+ *
+ * @author Florent Guillaume
+ */
+public interface RepositoryService {
+
+    /**
+     * Gets a list of available repositories.
+     *
+     * @return a collection of repository entries
+     */
+    Collection<RepositoryEntry> getRepositories();
+
+    /**
+     * Gets the default repository, if any.
+     * <p>
+     * If not default repository is available, {@code null} is returned.
+     *
+     * @return the default repository, or {@code null}
+     */
+    Repository getDefaultRepository();
+
+    /**
+     * Gets a repository identified by its ID.
+     *
+     * @param repositoryId the repository ID
+     */
+    Repository getRepository(String repositoryId);
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/repository/RepositoryService.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/BaseType.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/BaseType.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/BaseType.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/BaseType.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.type;
+
+/**
+ * The CMIS base types.
+ *
+ * @author Florent Guillaume
+ */
+public enum BaseType {
+
+    /**
+     * A document represents a standalone information asset.
+     */
+    DOCUMENT("document"),
+
+    /**
+     * A folder represents a logical container for a collection of fileable
+     * objects, which include folders and documents. Folders are used to
+     * organize fileable objects.
+     */
+    FOLDER("folder"),
+
+    /**
+     * A relationship represents a directional relationship between two
+     * independent objects.
+     */
+    RELATIONSHIP("relationship"),
+
+    /**
+     * A policy represents an administrative policy, which may be applied to one
+     * or more controllable objects
+     */
+    POLICY("policy");
+
+    private final String value;
+
+    private BaseType(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/BaseType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/BaseType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/ContentStreamPresence.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/ContentStreamPresence.java?rev=765129&view=auto
==============================================================================
--- jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/ContentStreamPresence.java (added)
+++ jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/ContentStreamPresence.java Wed Apr 15 10:49:31 2009
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2009 Nuxeo SA <http://nuxeo.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume
+ */
+package org.apache.chemistry.type;
+
+/**
+ * The presence status for a content stream.
+ *
+ * @author Florent Guillaume
+ */
+public enum ContentStreamPresence {
+
+    /**
+     * A content stream is not allowed.
+     */
+    NOT_ALLOWED("notallowed"),
+
+    /**
+     * A content stream is allowed but optional.
+     */
+    ALLOWED("allowed"),
+
+    /**
+     * A content stream is required.
+     */
+    REQUIRED("required");
+
+    private final String value;
+
+    private ContentStreamPresence(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return value;
+    }
+}

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/ContentStreamPresence.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/chemistry/chemistry-api/src/main/java/org/apache/chemistry/type/ContentStreamPresence.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url



Mime
View raw message