You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/11/29 13:22:07 UTC
svn commit: r1040083 -
/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/
Author: fmui
Date: Mon Nov 29 12:22:06 2010
New Revision: 1040083
URL: http://svn.apache.org/viewvc?rev=1040083&view=rev
Log:
- extracted properties interfaces
Added:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectProperties.java (with props)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentProperties.java (with props)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/FolderProperties.java (with props)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/PolicyProperties.java (with props)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/RelationshipProperties.java (with props)
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java Mon Nov 29 12:22:06 2010
@@ -18,7 +18,6 @@
*/
package org.apache.chemistry.opencmis.client.api;
-import java.util.GregorianCalendar;
import java.util.List;
import java.util.Map;
@@ -27,104 +26,18 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.data.AllowableActions;
import org.apache.chemistry.opencmis.commons.data.CmisExtensionElement;
import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
import org.apache.chemistry.opencmis.commons.enums.ExtensionLevel;
/**
* Base CMIS object.
- *
+ *
* See CMIS Domain Model - section 2.1.2.
*/
-public interface CmisObject extends ObjectId {
-
- // common properties
-
- /**
- * Get the name of this object. {@code Property<String> 'cmis:name'}
- */
- String getName();
-
- /**
- * Get the id of the user who created the object (maintained by the
- * repository). {@code Property<String> 'cmis:createdBy'}
- */
- String getCreatedBy();
-
- /**
- * Get the timestamp when the object was created (maintained by the
- * repository). {@code Property<GregorianCalendar> 'cmis:creationDate'}
- */
- GregorianCalendar getCreationDate();
-
- /**
- * Get the id of the user who changed the object (maintained by the
- * repository). {@code Property<String> 'cmis:lastModifiedBy'}
- */
- String getLastModifiedBy();
-
- /**
- * Get the timestamp when the object was changed (maintained by the
- * repository). {@code Property<GregorianCalendar>
- * 'cmis:lastModificationDate'}
- */
- GregorianCalendar getLastModificationDate();
-
- /**
- * Get the object's base type (maintained by the repository).
- * {@code Property<String> 'cmis:baseTypeId'}
- */
- ObjectType getBaseType();
-
- /**
- * Get the object's type. {@code Property<String> 'cmis:objectTypeId'}
- */
- ObjectType getType();
-
- /**
- * Get the type's base type id.
- *
- * @return
- */
- BaseTypeId getBaseTypeId();
-
- /**
- * Get the change token for this object (maintained by the repository).
- * {@code Property<String> 'cmis:changeToken'}
- */
- String getChangeToken();
+public interface CmisObject extends ObjectId, CmisObjectProperties {
// object
/**
- * Returns all properties that have been fetched for this object. If the
- * object was retrieved with a property filter, only the properties that
- * matched the filter are available.
- */
- List<Property<?>> getProperties();
-
- /**
- * Returns a property by id.
- *
- * @param id
- * the property id
- *
- * @return the property or <code>null</code> if the property does not exist
- * or is not available
- */
- <T> Property<T> getProperty(String id);
-
- /**
- * Returns a property value by id.
- *
- * @param id
- * the property id
- *
- * @return the property value or <code>null</code> if the property does not
- * exist or is not available
- */
- <T> T getPropertyValue(String id);
-
- /**
* Returns the allowable actions if they have been fetched for this object.
*/
AllowableActions getAllowableActions();
@@ -143,7 +56,7 @@ public interface CmisObject extends Obje
/**
* Deletes this object.
- *
+ *
* @param allVersions
* if this object is a document this parameter defines if just
* this version or all versions should be deleted
@@ -152,25 +65,25 @@ public interface CmisObject extends Obje
/**
* Updates the properties that are provided.
- *
+ *
* @param properties
* the properties to update
- *
+ *
* @return the updated object (a repository might have created a new object)
*/
CmisObject updateProperties(Map<String, ?> properties);
/**
* Updates the properties that are provided.
- *
+ *
* @param properties
* the properties to update
* @param refresh
* indicates if the object should be refresh after the update
- *
+ *
* @return the object id of the updated object (a repository might have
* created a new object)
- *
+ *
*/
ObjectId updateProperties(Map<String, ?> properties, boolean refresh);
@@ -202,7 +115,7 @@ public interface CmisObject extends Obje
/**
* Adds and removes ACEs to the object.
- *
+ *
* @return the new ACL of this object
*/
Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation);
@@ -233,7 +146,7 @@ public interface CmisObject extends Obje
/**
* Returns a transient object adapter.
- *
+ *
* @see TransientCmisObject
*/
TransientCmisObject getTransientObject();
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectProperties.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectProperties.java?rev=1040083&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectProperties.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectProperties.java Mon Nov 29 12:22:06 2010
@@ -0,0 +1,113 @@
+/*
+ * 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.chemistry.opencmis.client.api;
+
+import java.util.GregorianCalendar;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+
+/**
+ * Accessors to CMIS object properties.
+ *
+ * A property might not be available because either the repository didn't
+ * provide it or a property filter was used to retrieve this object.
+ *
+ * The property values represent a snapshot of the object when it was loaded.
+ * The objects and its properties can be out-of-date if the object has been
+ * modified in the repository.
+ *
+ * Implementations of this interface might alter property values without
+ * updating the object in the repository. In this case, the values returned by
+ * these accessors don't reflect the state of the object in the repository.
+ */
+public interface CmisObjectProperties {
+
+ /**
+ * Returns a list of all available CMIS properties.
+ */
+ List<Property<?>> getProperties();
+
+ /**
+ * Returns the requested property. If the property is not available,
+ * <code>null</code> is returned.
+ */
+ <T> Property<T> getProperty(String id);
+
+ /**
+ * Returns the value of the requested property. If the property is not
+ * available, <code>null</code> is returned.
+ */
+ <T> T getPropertyValue(String id);
+
+ // convenience accessors
+
+ /**
+ * Returns the name of this CMIS object (CMIS property
+ * <code>cmis:name<code>).
+ */
+ String getName();
+
+ /**
+ * Returns the user who created this CMIS object (CMIS property
+ * <code>cmis:createdBy<code>).
+ */
+ String getCreatedBy();
+
+ /**
+ * Returns the timestamp when this CMIS object has been created (CMIS
+ * property <code>cmis:creationDate<code>).
+ */
+ GregorianCalendar getCreationDate();
+
+ /**
+ * Returns the user who modified this CMIS object (CMIS property
+ * <code>cmis:lastModifiedBy<code>).
+ */
+ String getLastModifiedBy();
+
+ /**
+ * Returns the timestamp when this CMIS object has been modified (CMIS
+ * property <code>cmis:lastModificationDate<code>).
+ */
+ GregorianCalendar getLastModificationDate();
+
+ /**
+ * Returns the id of the base type of this CMIS object (CMIS property
+ * <code>cmis:baseTypeId<code>).
+ */
+ BaseTypeId getBaseTypeId();
+
+ /**
+ * Returns the base type of this CMIS object (object type identified by
+ * <code>cmis:baseTypeId<code>).
+ */
+ ObjectType getBaseType();
+
+ /**
+ * Returns the type of this CMIS object (object type identified by
+ * <code>cmis:objectTypeId<code>).
+ */
+ ObjectType getType();
+
+ /**
+ * Returns the change token (CMIS property <code>cmis:changeToken<code>).
+ */
+ String getChangeToken();
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObjectProperties.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Document.java Mon Nov 29 12:22:06 2010
@@ -30,7 +30,7 @@ import org.apache.chemistry.opencmis.com
*
* Domain Model 2.4
*/
-public interface Document extends FileableCmisObject {
+public interface Document extends FileableCmisObject, DocumentProperties {
TransientDocument getTransientDocument();
@@ -159,34 +159,4 @@ public interface Document extends Fileab
Document copy(ObjectId targetFolderId, Map<String, ?> properties, VersioningState versioningState,
List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context);
- // document specific properties
-
- Boolean isImmutable(); // cmis:isImmutable
-
- Boolean isLatestVersion(); // cmis:isLatestVersion
-
- Boolean isMajorVersion(); // cmis:isMajorVersion
-
- Boolean isLatestMajorVersion(); // cmis:isLatestMajorVersion
-
- String getVersionLabel(); // cmis:versionLabel
-
- String getVersionSeriesId(); // cmis:versionSeriesId
-
- Boolean isVersionSeriesCheckedOut(); // cmis:isVersionSeriesCheckedOut
-
- String getVersionSeriesCheckedOutBy(); // cmis:versionSeriesCheckedOutBy
-
- String getVersionSeriesCheckedOutId(); // cmis:versionSeriesCheckedOutId
-
- String getCheckinComment(); // cmis:checkinComment
-
- long getContentStreamLength(); // cmis:contentStreamLength
-
- String getContentStreamMimeType(); // cmis:contentStreamMimeType
-
- String getContentStreamFileName(); // cmis:contentStreamFileName
-
- String getContentStreamId(); // cmis:contentStreamId
-
}
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentProperties.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentProperties.java?rev=1040083&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentProperties.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentProperties.java Mon Nov 29 12:22:06 2010
@@ -0,0 +1,113 @@
+/*
+ * 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.chemistry.opencmis.client.api;
+
+/**
+ * Accessors to CMIS document properties.
+ *
+ * @see CmisObjectProperties
+ */
+public interface DocumentProperties {
+
+ /**
+ * Returns <code>true<code> if this CMIS object is immutable (CMIS property
+ * <code>cmis:isImmutable<code>).
+ */
+ Boolean isImmutable();
+
+ /**
+ * Returns if this CMIS object is the latest version (CMIS property
+ * <code>cmis:isLatestVersion<code>).
+ */
+ Boolean isLatestVersion();
+
+ /**
+ * Returns
+ * <code>true<code> if this CMIS object is the latest version (CMIS property
+ * <code>cmis:isMajorVersion<code>).
+ */
+ Boolean isMajorVersion();
+
+ /**
+ * Returns
+ * <code>true<code> if this CMIS object is the latest major version (CMIS property
+ * <code>cmis:isLatestMajorVersion<code>).
+ */
+ Boolean isLatestMajorVersion();
+
+ /**
+ * Returns the version label (CMIS property <code>cmis:versionLabel<code>).
+ */
+ String getVersionLabel();
+
+ /**
+ * Returns the version series id (CMIS property
+ * <code>cmis:versionSeriesId<code>).
+ */
+ String getVersionSeriesId();
+
+ /**
+ * Returns
+ * <code>true<code> if this version series is checked out (CMIS property
+ * <code>cmis:isVersionSeriesCheckedOut<code>).
+ */
+ Boolean isVersionSeriesCheckedOut();
+
+ /**
+ * Returns the user who checked out this version series (CMIS property
+ * <code>cmis:versionSeriesCheckedOutBy<code>).
+ */
+ String getVersionSeriesCheckedOutBy();
+
+ /**
+ * Returns the PWC id of this version series (CMIS property
+ * <code>cmis:versionSeriesCheckedOutId<code>).
+ */
+ String getVersionSeriesCheckedOutId();
+
+ /**
+ * Returns the checkin comment (CMIS property
+ * <code>cmis:checkinComment<code>).
+ */
+ String getCheckinComment();
+
+ /**
+ * Returns the content stream length or -1 if the document has no content
+ * (CMIS property <code>cmis:contentStreamLength<code>).
+ */
+ long getContentStreamLength();
+
+ /**
+ * Returns the content stream MIME type or <code>null</code> if the document
+ * has no content (CMIS property <code>cmis:contentStreamMimeType<code>).
+ */
+ String getContentStreamMimeType();
+
+ /**
+ * Returns the content stream filename or <code>null</code> if the document
+ * has no content (CMIS property <code>cmis:contentStreamFileName<code>).
+ */
+ String getContentStreamFileName();
+
+ /**
+ * Returns the content stream id or <code>null</code> if the document has no
+ * content (CMIS property <code>cmis:contentStreamId<code>).
+ */
+ String getContentStreamId();
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/DocumentProperties.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Folder.java Mon Nov 29 12:22:06 2010
@@ -31,7 +31,7 @@ import org.apache.chemistry.opencmis.com
*
* Domain Model 2.5
*/
-public interface Folder extends FileableCmisObject {
+public interface Folder extends FileableCmisObject, FolderProperties {
TransientFolder getTransientFolder();
@@ -171,13 +171,4 @@ public interface Folder extends Fileable
* {@link OperationContext}.
*/
ItemIterable<Document> getCheckedOutDocs(OperationContext context);
-
- // folder specific properties
-
- /**
- * If the children object types are restricted, it returns all allowed
- * object types. If the list is empty or <code>null</code> all object types
- * are allowed.
- */
- List<ObjectType> getAllowedChildObjectTypes(); // cmis:allowedChildObjectTypeIds
}
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/FolderProperties.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/FolderProperties.java?rev=1040083&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/FolderProperties.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/FolderProperties.java Mon Nov 29 12:22:06 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.chemistry.opencmis.client.api;
+
+import java.util.List;
+
+/**
+ * Accessors to CMIS folder properties.
+ *
+ * @see CmisObjectProperties
+ */
+public interface FolderProperties {
+ /**
+ * Returns the list of the allowed object types in this folder (CMIS
+ * property
+ * <code>cmis:allowedChildObjectTypeIds<code>). If the list is empty or <code>null</code>
+ * all object types are allowed.
+ */
+ List<ObjectType> getAllowedChildObjectTypes();
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/FolderProperties.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Policy.java Mon Nov 29 12:22:06 2010
@@ -23,13 +23,7 @@ package org.apache.chemistry.opencmis.cl
*
* Domain Model 2.7
*/
-public interface Policy extends FileableCmisObject {
+public interface Policy extends FileableCmisObject, PolicyProperties {
TransientPolicy getTransientPolicy();
-
- /**
- * Returns the policy text.
- */
- public String getPolicyText(); // cmis:policyText
-
}
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/PolicyProperties.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/PolicyProperties.java?rev=1040083&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/PolicyProperties.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/PolicyProperties.java Mon Nov 29 12:22:06 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.chemistry.opencmis.client.api;
+
+/**
+ * Accessors to CMIS policy properties.
+ *
+ * @see CmisObjectProperties
+ */
+public interface PolicyProperties {
+
+ /**
+ * Returns the policy text of this CMIS policy (CMIS property
+ * <code>cmis:policyText<code>).
+ */
+ String getPolicyText();
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/PolicyProperties.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Relationship.java Mon Nov 29 12:22:06 2010
@@ -23,12 +23,10 @@ package org.apache.chemistry.opencmis.cl
*
* Domain Model 2.6
*/
-public interface Relationship extends CmisObject {
+public interface Relationship extends CmisObject, RelationshipProperties {
TransientRelationship getTransientRelationship();
- // relationship specific properties
-
/**
* Gets the source object. If the source object id is invalid,
* <code>null</code> will be returned.
@@ -42,11 +40,6 @@ public interface Relationship extends Cm
CmisObject getSource(OperationContext context);
/**
- * Gets the source object id.
- */
- ObjectId getSourceId(); // cmis:sourceId
-
- /**
* Gets the target object. If the target object id is invalid,
* <code>null</code> will be returned.
*/
@@ -57,9 +50,4 @@ public interface Relationship extends Cm
* target object id is invalid, <code>null</code> will be returned.
*/
CmisObject getTarget(OperationContext context);
-
- /**
- * Gets the target object id.
- */
- ObjectId getTargetId(); // cmis:targetId
}
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/RelationshipProperties.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/RelationshipProperties.java?rev=1040083&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/RelationshipProperties.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/RelationshipProperties.java Mon Nov 29 12:22:06 2010
@@ -0,0 +1,39 @@
+/*
+ * 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.chemistry.opencmis.client.api;
+
+/**
+ * Accessors to CMIS relationship properties.
+ *
+ * @see CmisObjectProperties
+ */
+public interface RelationshipProperties {
+
+ /**
+ * Returns the source id of this CMIS relationship (CMIS property
+ * <code>cmis:sourceId<code>).
+ */
+ ObjectId getSourceId(); // cmis:sourceId
+
+ /**
+ * Returns the target id of this CMIS relationship (CMIS property
+ * <code>cmis:targetId<code>).
+ */
+ ObjectId getTargetId();
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/RelationshipProperties.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientCmisObject.java Mon Nov 29 12:22:06 2010
@@ -18,47 +18,19 @@
*/
package org.apache.chemistry.opencmis.client.api;
-import java.util.GregorianCalendar;
import java.util.List;
import org.apache.chemistry.opencmis.commons.data.Acl;
import org.apache.chemistry.opencmis.commons.data.AllowableActions;
import org.apache.chemistry.opencmis.commons.data.CmisExtensionElement;
import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
import org.apache.chemistry.opencmis.commons.enums.ExtensionLevel;
-public interface TransientCmisObject extends ObjectId {
-
- // CMIS properties
-
- String getName();
-
- void setName(String name);
-
- String getCreatedBy();
-
- GregorianCalendar getCreationDate();
-
- String getLastModifiedBy();
-
- GregorianCalendar getLastModificationDate();
-
- ObjectType getBaseType();
-
- ObjectType getType();
-
- BaseTypeId getBaseTypeId();
-
- String getChangeToken();
+public interface TransientCmisObject extends ObjectId, CmisObjectProperties {
// properties
- List<Property<?>> getProperties();
-
- <T> Property<T> getProperty(String id);
-
- <T> T getPropertyValue(String id);
+ void setName(String name);
<T> void setPropertyValue(String id, Object value);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientDocument.java Mon Nov 29 12:22:06 2010
@@ -25,7 +25,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.data.ContentStream;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
-public interface TransientDocument extends TransientFileableCmisObject {
+public interface TransientDocument extends TransientFileableCmisObject, DocumentProperties {
void deleteAllVersions();
@@ -50,35 +50,5 @@ public interface TransientDocument exten
Document copy(ObjectId targetFolderId, Map<String, ?> properties, VersioningState versioningState,
List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context);
- // document specific properties
-
- Boolean isImmutable(); // cmis:isImmutable
-
- Boolean isLatestVersion(); // cmis:isLatestVersion
-
- Boolean isMajorVersion(); // cmis:isMajorVersion
-
- Boolean isLatestMajorVersion(); // cmis:isLatestMajorVersion
-
- String getVersionLabel(); // cmis:versionLabel
-
- String getVersionSeriesId(); // cmis:versionSeriesId
-
- Boolean isVersionSeriesCheckedOut(); // cmis:isVersionSeriesCheckedOut
-
- String getVersionSeriesCheckedOutBy(); // cmis:versionSeriesCheckedOutBy
-
- String getVersionSeriesCheckedOutId(); // cmis:versionSeriesCheckedOutId
-
- String getCheckinComment(); // cmis:checkinComment
-
- long getContentStreamLength(); // cmis:contentStreamLength
-
- String getContentStreamMimeType(); // cmis:contentStreamMimeType
-
- String getContentStreamFileName(); // cmis:contentStreamFileName
-
- String getContentStreamId(); // cmis:contentStreamId
-
ObjectId checkIn(boolean major, String checkinComment);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientFolder.java Mon Nov 29 12:22:06 2010
@@ -26,7 +26,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
-public interface TransientFolder extends TransientFileableCmisObject {
+public interface TransientFolder extends TransientFileableCmisObject, FolderProperties {
Document createDocument(Map<String, ?> properties, ContentStream contentStream, VersioningState versioningState,
List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context);
@@ -72,7 +72,5 @@ public interface TransientFolder extends
ItemIterable<Document> getCheckedOutDocs(OperationContext context);
- List<ObjectType> getAllowedChildObjectTypes(); // cmis:allowedChildObjectTypeIds
-
void setAllowedChildObjectTypes(List<ObjectType> types);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientPolicy.java Mon Nov 29 12:22:06 2010
@@ -18,9 +18,7 @@
*/
package org.apache.chemistry.opencmis.client.api;
-public interface TransientPolicy extends TransientFileableCmisObject {
-
- String getPolicyText();
+public interface TransientPolicy extends TransientFileableCmisObject, PolicyProperties {
void setPolicyText(String policyText);
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java?rev=1040083&r1=1040082&r2=1040083&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/TransientRelationship.java Mon Nov 29 12:22:06 2010
@@ -18,21 +18,17 @@
*/
package org.apache.chemistry.opencmis.client.api;
-public interface TransientRelationship extends TransientCmisObject {
+public interface TransientRelationship extends TransientCmisObject, RelationshipProperties {
CmisObject getSource();
CmisObject getSource(OperationContext context);
- ObjectId getSourceId(); // cmis:sourceId
-
void setSourceId(ObjectId id);
CmisObject getTarget();
CmisObject getTarget(OperationContext context);
- ObjectId getTargetId(); // cmis:targetId
-
void setTargetId(ObjectId id);
}