chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r910572 [3/36] - in /incubator/chemistry/trunk/opencmis: ./ _dev/ opencmis-client/ opencmis-client/opencmis-client-api/ opencmis-client/opencmis-client-api/src/ opencmis-client/opencmis-client-api/src/main/ opencmis-client/opencmis-client-a...
Date Tue, 16 Feb 2010 16:04:07 GMT
Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api;
+
+import java.util.Locale;
+
+import org.apache.opencmis.client.api.objecttype.ObjectType;
+import org.apache.opencmis.client.api.repository.ObjectFactory;
+import org.apache.opencmis.client.api.repository.PropertyFactory;
+import org.apache.opencmis.client.api.repository.RepositoryInfo;
+import org.apache.opencmis.client.api.util.PagingList;
+
+public interface Session {
+
+  /**
+   * Clear 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();
+
+  // session context
+
+  /**
+   * Get the current session parameters for filtering and paging.
+   */
+  SessionContext getContext();
+
+  /**
+   * Set the current session parameters for filtering and paging.
+   * 
+   * @param context
+   *          the <code>SessionContext</code> to be used for the session; if <code>null</code>, a
+   *          default context is used
+   * @return the old <code>SessionContext</code> used before <code>setContext</code> was called
+   */
+  SessionContext setContext(SessionContext context);
+
+  // localization
+
+  /**
+   * Get the current locale to be used for this sesion.
+   */
+  Locale getLocale();
+
+  // extensions
+
+  // TODO : clarify extension handling
+
+  /*
+   * basic idea is: Application does something like startup: session.setExtensionHandler('action',
+   * handler); performing an action: session.set('action'); ... do some operations on the session
+   * ... --> handler.handleExtension('action') is called by runtime
+   */
+
+  /**
+   * Get an ID representing an 'extension context' (an action or something)?
+   */
+  String getExtensionContext();
+
+  /**
+   * Set an ID representing an 'extension context' (an action or something)? (null = default/no
+   * context)
+   * 
+   * @param context
+   * @return
+   */
+  String setExtensionContext(String context);
+
+  /**
+   * Get the <code>ExtensionHandler</code> for a given 'extension context'. (null = default)
+   * 
+   * @param context
+   * @return
+   */
+  ExtensionHandler getExtensionHandler(String context);
+
+  /**
+   * Set the <code>ExtensionHandler</code> for a given 'extension context'. (null = default)
+   * 
+   * @param context
+   * @param extensionHandler
+   * @return
+   */
+  ExtensionHandler setExtensionHandler(String context, ExtensionHandler extensionHandler);
+
+  // services
+
+  /**
+   * Repository service <code>getRepositoryInfo()</code>.
+   */
+  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>.
+   */
+  ObjectFactory getObjectFactory();
+
+  /**
+   * Get the factory for <code>Property</code> objects.
+   */
+  PropertyFactory getPropertyFactory();
+
+  ObjectType getTypeDefinition(String typeId);
+
+  PagingList<ObjectType> getTypeChildren(ObjectType t, boolean includePropertyDefinitions, int itemsPerPage);
+
+  PagingList<ObjectType> getTypeDescendants(ObjectType t, int depth, boolean includePropertyDefinitions, int itemsPerPage);
+
+  // navigation
+
+  /**
+   * Get the root folder for the repository.
+   */
+  Folder getRootFolder();
+
+  /**
+   * Navigation service <code>getCheckedOutDocs</code>.
+   * 
+   * @param folder
+   * @param orderby
+   * @return @
+   */
+  PagingList<Document> getCheckedOutDocs(Folder folder, String orderby, int itemsPerPage);
+
+  /**
+   * Object service <code>getObject</code>.
+   * 
+   * @param objectid
+   * @return @
+   */
+  CmisObject getObject(String objectid);
+
+  /**
+   * Object service <code>getObjectByPath</code>.
+   * 
+   * @param path
+   * @return @
+   */
+  CmisObject getObjectByPath(String path);
+
+  // discovery
+
+  /**
+   * Discovery service <code>query</code>.
+   */
+  PagingList<CmisObject> query(String statement, boolean searchAllVersions, int itemsPerPage);
+
+  /**
+   * Discovery service <code>getContentChanges</code>.
+   * 
+   * @return
+   */
+  PagingList<ChangeEvent> getContentChanges(String changeLogToken, int itemsPerPage);
+
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionContext.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionContext.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionContext.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api;
+
+import org.apache.opencmis.commons.enums.IncludeRelationships;
+import org.apache.opencmis.commons.exceptions.CmisFilterNotValidException;
+
+/**
+ * A container for some session parameters, like paging cursors, etc.
+ * 
+ * @see Session.getContext
+ * @see Session.setContext
+ */
+public interface SessionContext {
+
+  // filtering and additional data ((pre-)populating objects)
+
+  void setIncludeProperties(String filter) throws CmisFilterNotValidException;
+
+  void setIncludeRelationships(IncludeRelationships filter) throws CmisFilterNotValidException;
+
+  void setIncludePolicies(boolean include);
+
+  void setIncludeRenditions(String filter) throws CmisFilterNotValidException;
+
+  void setIncludeAcls(boolean include);
+
+  void setIncludeAllowableActions(boolean include);
+
+  void setIncludePathSegments(boolean include);
+
+  String getIncludeProperties();
+
+  IncludeRelationships getIncludeRelationships();
+
+  boolean getIncludePolicies();
+
+  String getIncludeRenditions();
+
+  boolean getIncludeAcls();
+
+  boolean getIncludeAllowableActions();
+
+  boolean getIncludePathSegments();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionFactory.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionFactory.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionFactory.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api;
+
+import java.util.Map;
+
+/**
+ * Entry point into the OpenCMIS Client API. The <code>SessionFactory</code>
+ * class implementation needs to be retrieved by any runtime lookup call. This
+ * can for instance be a J2EE JNDI lookup or an OSGi service lookup.
+ * <p>
+ * The entries of parameter map are defined by <code>SessionParameter</code>
+ * class which is part of the commons package. Parameters specify connection
+ * settings (user name, authentication, connection url, binding type (soap or
+ * atom pub) ...).
+ * <p>
+ * The <code>Session</code> class which is constructed is either the
+ * <code>session</code> base class which is the default implementation or it can
+ * be derived from that implementing special behavior for the session. Which
+ * session finally is returned can be controlled by the
+ * <code>SessionParameter.SESSION_TYPE</code> parameter.
+ * <p>
+ * Example Coding:
+ * <p>
+ * <code>
+ * SessionFactory factory = ... // use a runtime lookup service
+ * <br>Map<String, String> parameters = ...
+ * <br>
+ * <br>parameters.put(SessionParameter.USER, "username");
+ * <br>parameters.put(SessionParameter.URL, "http://...");
+ * <br>parameters.put(SessionParameter.SESSION_TYPE, SessionType.TRANSIENT.value());
+ * <br> ...
+ * <br>
+ * <br>TrasnientSession s = factory.createSession(parameters);
+ * </code>
+ *<p>
+ * If the <code>SessionType</code> parameter is not specified then the default
+ * session is returned.
+ * 
+ */
+public interface SessionFactory {
+
+	/**
+	 * Obtain a new session.
+	 * 
+	 * @param parameters
+	 *            a {@code Map} of name/value pairs with parameters for the
+	 *            session.
+	 * @return a {@code session} to the CMIS repository specified by the {@code
+	 *         parameters}.
+	 */
+	<T extends Session> T createSession(Map<String, String> parameters);
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/SessionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/TransientSession.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/TransientSession.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/TransientSession.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/TransientSession.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api;
+
+public interface TransientSession extends Session {
+  /**
+   * Save 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.
+   */
+  void save();
+
+  /**
+   * Cancel 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.
+   */
+  void cancel();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/TransientSession.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/DocumentType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/DocumentType.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/DocumentType.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/DocumentType.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.objecttype;
+
+import org.apache.opencmis.commons.enums.ContentStreamAllowed;
+
+/**
+ * Document Object Type.
+ * 
+ * See CMIS Domain Model - section 2.1.4.3.
+ */
+public interface DocumentType extends ObjectType {
+
+  /**
+   * Get the {@code isVersionable} flag.
+   * 
+   * @return {@code true} if this document type is versionable, {@code false} if documents of this
+   *         type cannot be versioned.
+   */
+  boolean isVersionable();
+
+  /**
+   * Get 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 allowed}, or {@code
+   *         required}).
+   */
+  ContentStreamAllowed getContentStreamAllowed();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/DocumentType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/FolderType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/FolderType.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/FolderType.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/FolderType.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.objecttype;
+
+/**
+ * Folder Object Type.
+ * 
+ * See CMIS Domain Model - section 2.1.5.4.
+ */
+public interface FolderType extends ObjectType {
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/FolderType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.objecttype;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.opencmis.commons.api.PropertyDefinition;
+import org.apache.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.opencmis.commons.exceptions.CmisRuntimeException;
+
+/**
+ * Object Type.
+ * 
+ * See CMIS Domain Model - section 2.1.3.
+ */
+public interface ObjectType {
+
+  String DOCUMENT_BASETYPE_ID = BaseObjectTypeIds.CMIS_DOCUMENT.value();
+  String FOLDER_BASETYPE_ID = BaseObjectTypeIds.CMIS_FOLDER.value();
+  String RELATIONSHIP_BASETYPE_ID = BaseObjectTypeIds.CMIS_RELATIONSHIP.value();
+  String POLICY_BASETYPE_ID = BaseObjectTypeIds.CMIS_POLICY.value();
+
+  /**
+   * Get this type's id.
+   * 
+   * @return the id of this type.
+   */
+  String getId();
+
+  /**
+   * Get the type's local name as used in the repository.
+   * 
+   * @return the local name of the type.
+   */
+  String getLocalName();
+
+  /**
+   * Get the type's namespace as used in the repository.
+   * 
+   * @return the namespace for this type.
+   */
+  String getLocalNamespace();
+
+  /**
+   * Get the type's query name, used for query and filter operations.
+   * 
+   * @return the type's query name.
+   */
+  String getQueryName();
+
+  /**
+   * Get the type's display name, used to be presented to the user.
+   * 
+   * @return the type's display name.
+   */
+  String getDisplayName();
+
+  /**
+   * Indicates if this is base object type (i.e. if {@code getId()} returns ...{@code _BASETYPE_ID}.
+   * 
+   * @return {@code true} if this type is a base type, {@code false} if this type is a derived type.
+   */
+  boolean isBase();
+
+  /**
+   * Get the type's base type, if the type is a derived (non-base) type.
+   * 
+   * @return the base type this type is derived from, or {@code null} if it is a base type ({@code
+   *         isBase()==true}).
+   * @throws CmisRuntimeException
+   */
+  ObjectType getBaseType(); // null if isBase == true
+
+  /**
+   * Get the type's base type id. 
+   * 
+   * @return 
+   */
+  BaseObjectTypeIds getBaseTypeId();
+
+  /**
+   * Get the type's parent type, if the type is a derived (non-base) type.
+   * 
+   * @return the parent type from which this type is derived, or {@code null} if it is a base type (
+   *         {@code isBase()==true}).
+   * @throws CmisRuntimeException
+   */
+  ObjectType getParent();
+
+  /**
+   * Additional description for this type.
+   * 
+   * @return the description, intended for the user. Might be {@code null}.
+   */
+  String getDescription();
+
+  /**
+   * Indicates that objects of this type can be created.
+   * 
+   * @return {@code true} if objects for this type can be created.
+   */
+  boolean isCreatable();
+
+  /**
+   * Indicates that objects of this type can be filed/unfiled.
+   * 
+   * @return {@code true} if objects for this type can be used for filing operations.
+   */
+  boolean isFileable();
+
+  /**
+   * Indicates that objects of this type can be queried.
+   * 
+   * @return {@code true} if objects for this type can be used for query operations.
+   */
+  boolean isQueryable();
+
+  /**
+   * Indicates that objects of this type can be controlled by policies.
+   * 
+   * @return {@code true} if objects for this type can be used for policy operations.
+   */
+  boolean isControllablePolicy();
+
+  /**
+   * Indicates that objects of this type can be controlled by ACLs.
+   * 
+   * @return {@code true} if objects for this type can be used for ACL operations.
+   */
+  boolean isControllableAcl();
+
+  /**
+   * Indicates that objects of this type are indexed in the full text index.
+   * 
+   * @return {@code true} if objects for this type can be searched via full text searches.
+   */
+  boolean isFulltextIndexed();
+
+  /**
+   * Indicates that objects of this type can be queried via its super type.
+   * 
+   * @return {@code true} if objects for this type are included in queries for their super type.
+   */
+  boolean isIncludedInSupertypeQuery();
+
+  /**
+   * Get the {@code Map} of {@code PropertyDefinition}s, indexed by the property definition's ids.
+   * 
+   * @return the {@code Map} of property definitions. @
+   */
+  Map<String, PropertyDefinition<?>> getPropertyDefintions();
+
+  /**
+   * Get the list of types directly derived from this type (which will return this type on {@code
+   * getParent()}).
+   * 
+   * @return a {@code List} of types which are directly derived from this type. @
+   */
+  List<ObjectType> getChildren();
+
+  /**
+   * Get the list of all types somehow derived from this type.
+   * 
+   * @param depth
+   *          the depth to which the derived types should be resolved.
+   * @return a {@code List} of types which are derived from this type (direct and via their
+   *         parents). @
+   */
+  List<ObjectType> getDescendants(int depth);
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/PolicyType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/PolicyType.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/PolicyType.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/PolicyType.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.objecttype;
+
+/**
+ * Policy Object Type.
+ * 
+ * See CMIS Domain Model - section 2.1.7.1.
+ */
+public interface PolicyType extends ObjectType {
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/PolicyType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/RelationshipType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/RelationshipType.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/RelationshipType.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/RelationshipType.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */package org.apache.opencmis.client.api.objecttype;
+
+import java.util.List;
+
+/**
+ * Relationship Object Type.
+ * 
+ * See CMIS Domain Model - section 2.1.6.1.
+ */
+public interface RelationshipType extends ObjectType {
+
+  /**
+   * Get the list of object types, allowed as source for relationships of this type.
+   * 
+   * @return the allowed source types for this relationship type.
+   */
+  List<ObjectType> getAllowedSourceTypes();
+
+  /**
+   * Get the list of object types, allowed as target for relationships of this type.
+   * 
+   * @return the allowed target types for this relationship type.
+   */
+  List<ObjectType> getAllowedTargetTypes();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/RelationshipType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/package.html
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/package.html?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/package.html (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/package.html Tue Feb 16 16:03:38 2010
@@ -0,0 +1,34 @@
+<!--
+ 
+  Copyright 2009 Alfresco Software Ltd / Open Text Corporation / SAP AG
+
+  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.
+  
+ -->
+<html>
+<head>
+<!--
+ JavaDoc package.html
+-->
+</head>
+<body>
+The OpenCMIS Client API object type definitions.
+<p>
+This package provides interfaces defining the CMIS object types.
+<br/>
+</p>
+<p>
+@see org.opencmis.client.api.repository.ObjectTypes
+</p>
+</body>
+</html>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html Tue Feb 16 16:03:38 2010
@@ -0,0 +1,79 @@
+<!--
+ 
+  Copyright 2009 Alfresco Software Ltd / Open Text Corporation / SAP AG
+
+  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.
+  
+ -->
+<html>
+<head>
+<!--
+ JavaDoc package.html
+-->
+</head>
+<body>
+The OpenCMIS Client API.
+<p>
+This package provides interfaces and classes for accessing CMIS repositories
+via an object oriented API.
+<br/>
+Interfaces in this package are implemented by the OpenCMIS runtime and must not be
+implemented by applications.
+The OpenCMIS client API depends on the OpenCMIS commons API. 
+</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.
+</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>
+The following example code illustrates how the session is obtained, used and finally released.
+<pre>
+  SessionFactory factory;
+  Session session;
+  try {
+    // acquire the session factory  
+    factory = (SessionFactory) new InitialContext().lookup(JNDI_LOOKUP_KEY);
+    // provide some basic configuration
+    HashMap parameters = new HashMap();
+    parameters.put(SessionParameter.USER, "user");
+    parameters.put(SessionParamter.PASSWORD, encode("password"));
+    parameters.put(SessionParameter.URL, "http://server:port/path");
+    // get the session
+    session = factory.getSession(parameters);
+    // sample: get the root folder and create a new top-level folder
+    Folder rootFolder = session.getRootFolder();
+    Document document = session.getObjectFactory().createDocument(rootFolder, "test");
+    document.setProperty("myProperty", "stringpropertyvalue");
+    document.save(); // create document with property
+  } // end try
+  finally {
+    //cleanup
+  }    
+</pre>
+</p>
+<p>
+@see org.opencmis.client.api.SessionFactory
+@see org.opencmis.client.api.Session
+</p>
+</body>
+</html>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AclPermissionMapping.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AclPermissionMapping.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AclPermissionMapping.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AclPermissionMapping.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+import java.util.List;
+
+import org.apache.opencmis.client.api.AclPermission;
+
+/**
+ * Information about a repositories permission mappings, as provided by RepositoryInfo.
+ * 
+ * @see RepositoryAclCapabilities#getPermissionMapping()
+ * 
+ *      See CMIS Domain Model - section 2.1.8.3.
+ */
+public interface AclPermissionMapping {
+
+  // the keys for the permission mappings (AllowableAction + "." + Operand)
+
+  String CAN_GET_DESCENDENTS_FOLDER = "canGetDescendents.Folder";
+  String CAN_GET_CHILDREN_FOLDER = "canGetChildren.Folder";
+  String CAN_GET_PARENTS_FOLDER = "canGetParents.Folder";
+  String CAN_GET_FOLDER_PARENT_OBJECT = "canGetFolderParent.Object";
+  String CAN_CREATE_DOCUMENT_TYPE = "canCreateDocument.Type";
+  String CAN_CREATE_DOCUMENT_FOLDER = "canCreateDocument.Folder";
+  String CAN_CREATE_FOLDER_TYPE = "canCreateFolder.Type";
+  String CAN_CREATE_FOLDER_FOLDER = "canCreateFolder.Folder";
+  String CAN_CREATE_RELATIONSHIP_TYPE = "canCreateRelationship.Type";
+  String CAN_CREATE_RELATIONSHIP_SOURCE = "canCreateRelationship.Source";
+  String CAN_CREATE_RELATIONSHIP_TARGET = "canCreateRelationship.Target";
+  String CAN_CREATE_POLICY_TYPE = "canCreatePolicy.Type";
+  String CAN_GET_PROPERTIES_OBJECT = "canGetProperties.Object";
+  String CAN_VIEW_CONTENT_OBJECT = "canViewContent.Object";
+  String CAN_UPDATE_PROPERTIES_OBJECT = "canUpdateProperties.Object";
+  String CAN_MOVE_OBJECT = "canMove.Object";
+  String CAN_MOVE_TARGET = "canMove.Target";
+  String CAN_MOVE_SOURCE = "canMove.Source";
+  String CAN_DELETE_OBJECT = "canDelete.Object";
+  String CAN_DELETE_TREE_FOLDER = "canDeleteTree.Folder";
+  String CAN_SET_CONTENT_DOCUMENT = "canSetContent.Document";
+  String CAN_DELETE_CONTENT_DOCUMENT = "canDeleteContent.Document";
+  String CAN_ADD_TO_FOLDER_OBJECT = "canAddToFolder.Object";
+  String CAN_ADD_TO_FOLDER_FOLDER = "canAddToFolder.Folder";
+  String CAN_REMOVE_FROM_FOLDER_OBJECT = "canRemoveFromFolder.Object";
+  String CAN_REMOVE_FROM_FOLDER_FOLDER = "canRemoveFromFolder.Folder";
+  String CAN_CHECKOUT_DOCUMENT = "canCheckout.Document";
+  String CAN_CANCEL_CHECKOUT_DOCUMENT = "canCancelCheckout.Document";
+  String CAN_CHECKIN_DOCUMENT = "canCheckin.Document";
+  String CAN_GET_ALL_VERSIONS_VERSION_SERIES = "canGetAllVersions.VersionSeries";
+  String CAN_GET_OBJECT_RELATIONSHIPS_OBJECT = "canGetObjectRelationships.Object";
+  String CAN_ADD_POLICY_OBJECT = "canAddPolicy.Object";
+  String CAN_ADD_POLICY_POLICY = "canAddPolicy.Policy";
+  String CAN_REMOVE_POLICY_OBJECT = "canRemovePolicy.Object";
+  String CAN_REMOVE_POLICY_POLICY = "canRemovePolicy.Policy";
+  String CAN_GET_APPLIED_POLICIES_OBJECT = "canGetAppliedPolicies.Object";
+  String CAN_GET_ACL_OBJECT = "canGetACL.Object";
+  String CAN_APPLY_ACL_OBJECT = "canApplyACL.Object";
+
+  /**
+   * Get the key (AllowableAction + "." + OperandType) for this permission mapping.
+   * 
+   * @return the key for the permission mapping (CAN_...).
+   */
+  String getKey();
+
+  /**
+   * Get the mapped permissions for the permission mapping (identified by it's key).
+   * 
+   * @return the list of permissions that are required for the AllowableAction and Operand.
+   */
+  List<AclPermission> getPermissions();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AclPermissionMapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AllowableActions.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AllowableActions.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AllowableActions.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AllowableActions.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+/**
+ * Information about the actions for a CMIS object.
+ * 
+ * @see org.apache.opencmis.client.api.CmisObject#getAllowableActions()
+ * 
+ *      See CMIS Domain Model - section 2.2.4.6.
+ */
+public interface AllowableActions {
+
+  boolean canDeleteObject();
+
+  boolean canUpdateProperties();
+
+  boolean canGetProperties();
+
+  boolean canGetObjectRelationships();
+
+  boolean canGetObjectParents();
+
+  boolean canGetFolderParent();
+
+  boolean canGetDescendants();
+
+  boolean canMoveObject();
+
+  boolean canDeleteContentStream();
+
+  boolean canCheckOut();
+
+  boolean canCancelCheckOut();
+
+  boolean canCheckIn();
+
+  boolean canSetContentStream();
+
+  boolean canGetAllVersions();
+
+  boolean canAddObjectToFolder();
+
+  boolean canRemoveObjectFromFolder();
+
+  boolean canGetContentStream();
+
+  boolean canApplyPolicy();
+
+  boolean canGetAppliedPolicies();
+
+  boolean canRemovePolicy();
+
+  boolean canGetChildren();
+
+  boolean canCreateDocument();
+
+  boolean canCreateFolder();
+
+  boolean canCreateRelationship();
+
+  boolean canCreatePolicy();
+
+  boolean canDeleteTree();
+
+  boolean canGetRenditions();
+
+  boolean canGetAcl();
+
+  boolean canApplyAcl();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/AllowableActions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/ObjectFactory.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/ObjectFactory.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/ObjectFactory.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+import java.io.InputStream;
+import java.util.List;
+
+import org.apache.opencmis.client.api.Ace;
+import org.apache.opencmis.client.api.Acl;
+import org.apache.opencmis.client.api.AclPermission;
+import org.apache.opencmis.client.api.ContentStream;
+import org.apache.opencmis.client.api.Document;
+import org.apache.opencmis.client.api.Folder;
+import org.apache.opencmis.client.api.Policy;
+import org.apache.opencmis.client.api.Property;
+import org.apache.opencmis.client.api.Relationship;
+import org.apache.opencmis.commons.enums.VersioningState;
+
+/**
+ * A factory to create CMIS objects.
+ * 
+ * @see org.apache.opencmis.client.api.Session#getObjectFactory()
+ */
+public interface ObjectFactory {
+
+  // object factory
+
+  Ace createAce(String principal, List<AclPermission> permissions);
+
+  Acl createAcl(List<Ace> aces);
+
+  ContentStream createContentStream(int length, String mimetype, String filename, InputStream stream);
+
+  // object service
+
+  // shortcut
+  Document createDocument(Folder parentfolder, String name);
+
+  Document createDocument(List<Property<?>> properties, Folder parentfolder,
+      ContentStream contentstream, VersioningState versioningState, List<Policy> policies,
+      List<Ace> addACEs, List<Ace> removeACEs);
+
+  Document createDocumentFromSource(Document source, List<Property<?>> properties,
+      Folder parentfolder, VersioningState versioningState, List<Policy> policies,
+      List<Ace> addACEs, List<Ace> removeACEs);
+
+  Relationship createRelationship(List<Property<?>> properties, List<Policy> policies,
+      List<Ace> addACEs, List<Ace> removeACEs);
+
+  Policy createPolicy(List<Property<?>> properties, Folder parentfolder, List<Policy> policies,
+      List<Ace> addACEs, List<Ace> removeACEs);
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/ObjectFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/PropertyFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/PropertyFactory.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/PropertyFactory.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/PropertyFactory.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+import java.util.List;
+
+import org.apache.opencmis.client.api.Property;
+import org.apache.opencmis.commons.enums.CmisProperties;
+import org.apache.opencmis.commons.enums.PropertyType;
+
+/**
+ * A factory to create properties.
+ * 
+ * @see org.apache.opencmis.client.api.Session#getPropertyFactory()
+ */
+public interface PropertyFactory {
+
+  // property factory
+
+  <T> Property<T> createProperty(String id, PropertyType type, T value);
+
+  <T> Property<T> createPropertyMultivalue(String id, PropertyType type, List<T> value);
+
+  <T> Property<T> createCmisProperty(CmisProperties p, T value);
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/PropertyFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.opencmis.client.api.AclPermission;
+import org.apache.opencmis.commons.enums.AclPropagation;
+
+/**
+ * Information about a repositories ACL capabilities, as provided by RepositoryInfo.
+ * 
+ * @see RepositoryInfo#getAclCapabilities()
+ * 
+ *      See CMIS Domain Model - section 2.2.2.2.
+ */
+public interface RepositoryAclCapabilities {
+
+  AclPropagation getAclPropagation();
+
+  List<AclPermission> getPermissions();
+
+  // generic mapping
+
+  /**
+   * The methods {@code get}&lt;<i>AllowableAction</i>&gt;&lt;<i>Operand</i>&gt;{@code Permissions}
+   * should be used instead...
+   */
+  Map<String, AclPermissionMapping> getPermissionMapping();
+
+  // specific mappings
+
+  AclPermissionMapping getGetDescendentsFolderPermissions();
+
+  AclPermissionMapping getGetChildrenFolderPermissions();
+
+  AclPermissionMapping getGetParentsFolderPermissions();
+
+  AclPermissionMapping getGetFolderParentObjectPermissions();
+
+  AclPermissionMapping getCreateDocumentTypePermissions();
+
+  AclPermissionMapping getCreateDocumentFolderPermissions();
+
+  AclPermissionMapping getCreateFolderTypePermissions();
+
+  AclPermissionMapping getCreateFolderFolderPermissions();
+
+  AclPermissionMapping getCreateRelationshipTypePermissions();
+
+  AclPermissionMapping getCreateRelationshipSourcePermissions();
+
+  AclPermissionMapping getCreateRelationshipTargetPermissions();
+
+  AclPermissionMapping getCreatePolicyTypePermissions();
+
+  AclPermissionMapping getGetPropertiesObjectPermissions();
+
+  AclPermissionMapping getViewContentObjectPermissions();
+
+  AclPermissionMapping getUpdatePropertiesObjectPermissions();
+
+  AclPermissionMapping getMoveObjectPermissions();
+
+  AclPermissionMapping getMoveTargetPermissions();
+
+  AclPermissionMapping getMoveSourcePermissions();
+
+  AclPermissionMapping getDeleteObjectPermissions();
+
+  AclPermissionMapping getDeleteTreeFolderPermissions();
+
+  AclPermissionMapping getSetContentDocumentPermissions();
+
+  AclPermissionMapping getDeleteContentDocumentPermissions();
+
+  AclPermissionMapping getAddToFolderObjectPermissions();
+
+  AclPermissionMapping getAddToFolderFolderPermissions();
+
+  AclPermissionMapping getRemoveFromFolderObjectPermissions();
+
+  AclPermissionMapping getRemoveFromFolderFolderPermissions();
+
+  AclPermissionMapping getCheckoutDocumentPermissions();
+
+  AclPermissionMapping getCancelCheckoutDocumentPermissions();
+
+  AclPermissionMapping getCheckinDocumentPermissions();
+
+  AclPermissionMapping getGetAllVersionsVersionSeriesPermissions();
+
+  AclPermissionMapping getGetObjectRelationshipsObjectPermissions();
+
+  AclPermissionMapping getAddPolicyObjectPermissions();
+
+  AclPermissionMapping getAddPolicyPolicyPermissions();
+
+  AclPermissionMapping getRemovePolicyObjectPermissions();
+
+  AclPermissionMapping getRemovePolicyPolicyPermissions();
+
+  AclPermissionMapping getGetAppliedPoliciesObjectPermissions();
+
+  AclPermissionMapping getGetAclObjectPermissions();
+
+  AclPermissionMapping getApplyAclObjectPermissions();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+import org.apache.opencmis.commons.enums.CapabilityAcl;
+import org.apache.opencmis.commons.enums.CapabilityChanges;
+import org.apache.opencmis.commons.enums.CapabilityContentStreamUpdates;
+import org.apache.opencmis.commons.enums.CapabilityJoin;
+import org.apache.opencmis.commons.enums.CapabilityQuery;
+import org.apache.opencmis.commons.enums.CapabilityRendition;
+
+/**
+ * Information about a repositories capabilities, as provided by RepositoryInfo.
+ * 
+ * @see RepositoryInfo#getCapabilities()
+ * 
+ *      See CMIS Domain Model - section 2.2.2.2.
+ */
+public interface RepositoryCapabilities {
+
+  // Object
+
+  CapabilityContentStreamUpdates getContentStreamUpdatabilitySupport();
+
+  CapabilityChanges getChangesSupport();
+
+  CapabilityRendition getRenditionsSupport();
+
+  // Navigation
+
+  boolean isGetDescendantsSupported();
+
+  boolean isGetFolderTreeSupported();
+
+  // Filing
+
+  boolean isMultifilingSupported();
+
+  boolean isUnfilingSupported();
+
+  boolean isVersionSpecificFilingSupported();
+
+  // Versioning
+
+  boolean isPwcUpdatableSupported();
+
+  boolean isPwcSearchableSupported();
+
+  boolean isAllVersionsSearchableSupported();
+
+  // Query
+
+  CapabilityQuery getQuerySupport();
+
+  CapabilityJoin getJoinSupport();
+
+  // ACLs
+
+  CapabilityAcl getAclSupport();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.repository;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.enums.BaseObjectTypeIds;
+
+/**
+ * Information provided by the getRepositoryInfo service.
+ * 
+ * @see org.apache.opencmis.client.api.Session#getRepositoryInfo()
+ * 
+ *      See CMIS Domain Model - section 2.2.2.2.
+ */
+public interface RepositoryInfo {
+
+  String getId();
+
+  String getName();
+
+  String getDescription();
+
+  String getVendorName();
+
+  String getProductName();
+
+  String getProductVersion();
+
+  String getCmisVersionSupported();
+
+  String getThinClientUri();
+
+  boolean changesIncomplete();
+
+  List<BaseObjectTypeIds> getChangesOnType();
+
+  String getPrincipalIdAnonymous();
+
+  String getPrincipalIdAnyone();
+
+  RepositoryCapabilities getCapabilities();
+
+  RepositoryAclCapabilities getAclCapabilities();
+
+  String getRootFolderId();
+
+  String getLatestChangeLogToken();
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/package.html
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/package.html?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/package.html (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/package.html Tue Feb 16 16:03:38 2010
@@ -0,0 +1,34 @@
+<!--
+ 
+  Copyright 2009 Alfresco Software Ltd / Open Text Corporation / SAP AG
+
+  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.
+  
+ -->
+<html>
+<head>
+<!--
+ JavaDoc package.html
+-->
+</head>
+<body>
+The OpenCMIS Client API repository related package.
+<p>
+This package provides interfaces to the CMIS repository.
+<br/>
+</p>
+<p>
+@see org.opencmis.client.api.Session
+</p>
+</body>
+</html>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/AceList.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/AceList.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/AceList.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/AceList.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,27 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you 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.
+*/
+package org.apache.opencmis.client.api.util;
+
+import java.util.List;
+
+import org.apache.opencmis.client.api.Ace;
+
+public interface AceList extends List<Ace> {
+  boolean isExact();
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/AceList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/PagingList.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/PagingList.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/PagingList.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/PagingList.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.client.api.util;
+
+import java.util.List;
+
+/**
+ * Basically this is a nested list of lists where the outer list represent pages and the inner list
+ * is the result set with items of type T. <code>PagingList</code> implementations can support lazy
+ * load of result sets.
+ * 
+ * @param <T>
+ */
+public interface PagingList<T> extends Iterable<List<T>> {
+
+  /**
+   * If the repository knows the total number of items in a result set, the repository SHOULD
+   * include the number here. If the repository does not know the number of items in a result set,
+   * this parameter SHOULD not be set. The value in the parameter MAY NOT be accurate the next time
+   * the client retrieves the result set or the next page in the result set.
+   * 
+   * @return total number of items or (-1)
+   */
+  int totalItems();
+
+  /**
+   * This is the maximum number of items to return in one page. The repository MUST NOT exceed
+   * this maximum. Default is repository-specific.
+   */
+  void setMaxItems();
+
+  /**
+   * This is the maximum number of pages calculated from number of <code>totalItems</code> and
+   * <code>maxItems</code>. If the number of <code>totalItems</code> is not known then -1 is
+   * returned.
+   * 
+   * @return Number of pages or (-1)
+   */
+  int size();
+
+  /**
+   * Return one page as list of items of type T.
+   * 
+   * @param pageNumber
+   *          The number of the page to return.
+   * @return a page of items
+   */
+  List<T> get(int pageNumber);
+
+  /**
+   * Returns true if the server does not return any items.
+   * @return true for empty list
+   */
+  boolean isEmpty();
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/util/PagingList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 16 16:03:38 2010
@@ -0,0 +1,7 @@
+bin
+target
+*.iws
+*.ipr
+*.iml
+.*
+log4j.log*

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/pom.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/pom.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/pom.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+                             
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opencmis</groupId>
+    <artifactId>opencmis</artifactId>
+    <version>0.1-SNAPSHOT</version>
+	<relativePath>../../pom.xml</relativePath>	
+  </parent>
+  
+  <artifactId>opencmis-client-impl</artifactId>
+  <name>OpenCMIS Client Implementation</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-client-api</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-commons-api</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-provider-impl</artifactId>
+      <version>${version}</version>
+    </dependency>	
+    <dependency>
+    	<groupId>org.easymock</groupId>
+    	<artifactId>easymock</artifactId>
+    	<version>2.5.2</version>
+    	<scope>test</scope>
+    </dependency> 
+  </dependencies>
+
+</project>

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/AbstractSessionTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/AbstractSessionTest.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/AbstractSessionTest.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/AbstractSessionTest.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.test;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.client.api.SessionFactory;
+
+/**
+ * Create a OpenCMIS test session based on fixture parameter.
+ */
+public abstract class AbstractSessionTest {
+
+  protected Log log = LogFactory.getLog(this.getClass());
+
+  /**
+   * test session
+   */
+  protected Session session = null;
+
+  @Before
+  public void setUp() throws Exception {
+    SessionFactory factory = Fixture.getSessionFactory();
+    this.session = factory.createSession(Fixture.getParamter());
+
+    Fixture.setUpTestData(this.session);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    Fixture.teardownTestData(this.session);
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/AbstractSessionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/Fixture.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/Fixture.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/Fixture.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/Fixture.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.test;
+
+import java.net.URI;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.client.api.SessionFactory;
+import org.apache.opencmis.commons.SessionParameter;
+import org.apache.opencmis.test.mock.MockSessionFactory;
+
+/**
+ * Definition of unit environment for running test cases. Default implementation supports InMemory
+ * binding of OpenCMIS which can be used for stand alone test cases. Within test unit suite it is
+ * possible to overwrite the fixture.
+ * 
+ */
+public class Fixture {
+
+  public static String PROPERTY_FILTER = "*";
+  /*
+   * general
+   */
+  public static String TEST_ROOT_FOLDER_NAME = null;
+  public static String FOLDER_TYPE_ID = "test.folder";
+  public static String DOCUMENT_TYPE_ID = "test.file";
+  public static String QUERY = "SELECT * FROM cmis:document";
+  /*
+   * cmis objects
+   */
+  public static String FOLDER1_NAME = "folder.1";
+  public static String FOLDER2_NAME = "folder.2";
+  public static String DOCUMENT1_NAME = "document.1.txt";
+  public static String DOCUMENT2_NAME = "document.2.txt";
+
+  /*
+   * properties
+   */
+  public static String PROPERTY_NAME_STRING = "StringProperty";
+  public static String PROPERTY_VALUE_STRING = "abc";
+  public static String PROPERTY_NAME_INTEGER = "IntegerProperty";
+  public static Integer PROPERTY_VALUE_INTEGER = new Integer(4711);
+  public static String PROPERTY_NAME_BOOLEAN = "BooleanProperty";
+  public static Boolean PROPERTY_VALUE_BOOLEAN = new Boolean(true);
+  public static String PROPERTY_NAME_DOUBLE = "DoubleProperty";
+  public static Double PROPERTY_VALUE_DOUBLE = new Double(1.0);
+  public static String PROPERTY_NAME_FLOAT = "FloatProperty";
+  public static Float PROPERTY_VALUE_FLOAT = new Float(1.0);
+  public static String PROPERTY_NAME_ID = "DoubleProperty";
+  public static String PROPERTY_VALUE_ID = "xyz";
+  public static String PROPERTY_NAME_HTML = "HtmlProperty";
+  public static String PROPERTY_VALUE_HTML = "<body>";
+  public static String PROPERTY_NAME_DATETIME = "DateTimeProperty";
+  public static Calendar PROPERTY_VALUE_DATETIME = GregorianCalendar.getInstance();
+  public static String PROPERTY_NAME_URI = "UriProperty";
+  public static URI PROPERTY_VALUE_URI = URI.create("http://foo.com");
+  public static final String PROPERTY_NAME_STRING_MULTI_VALUED = "MultiValuedStringProperty";
+
+  static {
+    Fixture.TEST_ROOT_FOLDER_NAME = "test_" + UUID.randomUUID().toString();
+  }
+
+  /**
+   * @return session parameter
+   */
+  public static Map<String, String> getParamter() {
+    return paramter;
+  }
+
+  /**
+   * Overwriting default session parameter.
+   * 
+   * @param paramter
+   */
+  public static void setParamter(Map<String, String> paramter) {
+    Fixture.paramter = paramter;
+  }
+
+  /**
+   * session parameter.
+   */
+  private static Map<String, String> paramter = null;
+
+  /**
+   * Overwriting default session factory.
+   * 
+   * @param factory
+   */
+  public static void setSessionFactory(SessionFactory factory) {
+    Fixture.factory = factory;
+  }
+
+  /**
+   * @return factory
+   */
+  public static SessionFactory getSessionFactory() {
+    return Fixture.factory;
+  }
+
+  /**
+   * factory
+   */
+  private static SessionFactory factory = null;
+
+  static {
+    // Mock as default
+    Map<String, String> parameter = new HashMap<String, String>();
+
+    parameter.put(SessionParameter.USER, "Mr. Mock");
+    parameter.put(SessionParameter.PASSWORD, "*mock#");
+    parameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "EN");
+
+    Fixture.paramter = parameter;
+    Fixture.factory = new MockSessionFactory();
+  }
+
+  public static void setUpTestData(Session session) {
+
+  }
+
+  public static void teardownTestData(Session session) {
+
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/Fixture.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/LogReportTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/LogReportTest.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/LogReportTest.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/LogReportTest.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.test;
+
+import org.junit.Test;
+
+/**
+ * Write log entry
+ */
+public class LogReportTest extends AbstractSessionTest {
+
+  @Test
+  public void report() {
+    this.log.info("---------------------------------------------------------------");
+    this.log.info("--- CMIS Test Setup -------------------------------------------");
+    this.log.info("---------------------------------------------------------------");
+    this.log.info("test suite:        " + "default");
+    this.log.info("session factory:   " + Fixture.getSessionFactory().getClass());
+    this.log.info("session parameter: " + Fixture.getParamter());
+    this.log.info("---------------------------------------------------------------");
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/LogReportTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/ReadOnlyAclCapabilityTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/ReadOnlyAclCapabilityTest.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/ReadOnlyAclCapabilityTest.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/ReadOnlyAclCapabilityTest.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.opencmis.test;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.Test;
+import org.apache.opencmis.client.api.AclPermission;
+import org.apache.opencmis.client.api.repository.AclPermissionMapping;
+import org.apache.opencmis.client.api.repository.RepositoryAclCapabilities;
+import org.apache.opencmis.client.api.repository.RepositoryCapabilities;
+import org.apache.opencmis.client.api.repository.RepositoryInfo;
+import org.apache.opencmis.commons.enums.AclPropagation;
+import org.apache.opencmis.commons.enums.CapabilityAcl;
+
+public class ReadOnlyAclCapabilityTest extends AbstractSessionTest {
+
+  private RepositoryAclCapabilities aclCapabilities = null;
+
+  @Before
+  public void setup() throws Exception {
+    super.setUp();
+
+    RepositoryInfo r = this.session.getRepositoryInfo();
+    // capabilities
+    RepositoryCapabilities repcap = r.getCapabilities();
+    CapabilityAcl capacl = repcap.getAclSupport();
+
+    if (capacl != CapabilityAcl.NONE) {
+      // acl capabilities
+      this.aclCapabilities = r.getAclCapabilities();
+    }
+
+    Assume.assumeNotNull(this.aclCapabilities);
+  }
+
+  @Test
+  public void repositoryCapabilitiesAclPropagation() {
+    AclPropagation aclprop = this.aclCapabilities.getAclPropagation();
+    switch (aclprop) {
+    case OBJECTONLY:
+      break;
+    case PROPAGATE:
+      break;
+    case REPOSITORYDETERMINED:
+      break;
+    default:
+      Assert.fail("enumeration not supported");
+    }
+  }
+
+  @Test
+  public void repositoryCapabilitiesAclPermissionMapping() {
+    AclPermissionMapping apm = this.aclCapabilities.getAddPolicyObjectPermissions();
+    List<AclPermission> aclps = apm.getPermissions();
+    Assert.assertNotNull(aclps);
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/test/ReadOnlyAclCapabilityTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message