Author: fmui
Date: Tue Jan 25 11:27:34 2011
New Revision: 1063230
URL: http://svn.apache.org/viewvc?rev=1063230&view=rev
Log:
- implemented CMIS 1.1 schema update
Added:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/FeatureKeyValuePair.java
(with props)
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeMutabilityCapabilities.java
(with props)
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureKeyValuePairImpl.java
(with props)
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeMutabilityCapabilitiesImpl.java
(with props)
Removed:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryInfo.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java
Tue Jan 25 11:27:34 2011
@@ -18,8 +18,10 @@
*/
package org.apache.chemistry.opencmis.commons.data;
+import java.util.List;
+
public interface Feature extends ExtensionsData {
-
+
String getId();
String getUrl();
@@ -29,4 +31,6 @@ public interface Feature extends Extensi
String getVersionLabel();
String getDescription();
+
+ List<FeatureKeyValuePair> getData();
}
Added:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/FeatureKeyValuePair.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/FeatureKeyValuePair.java?rev=1063230&view=auto
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/FeatureKeyValuePair.java
(added)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/FeatureKeyValuePair.java
Tue Jan 25 11:27:34 2011
@@ -0,0 +1,25 @@
+/*
+ * 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.commons.data;
+
+public interface FeatureKeyValuePair {
+
+ String getKey();
+
+ String getValue();
+}
Propchange:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/FeatureKeyValuePair.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
Tue Jan 25 11:27:34 2011
@@ -19,7 +19,6 @@
package org.apache.chemistry.opencmis.commons.data;
import java.io.Serializable;
-import java.util.List;
import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
import org.apache.chemistry.opencmis.commons.enums.CapabilityChanges;
@@ -73,8 +72,4 @@ public interface RepositoryCapabilities
// Type Mutability
NewTypeSettableAttributes getNewTypeSettableAttributes();
-
- // Feature
-
- List<Feature> getFeatures();
}
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryInfo.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryInfo.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryInfo.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryInfo.java
Tue Jan 25 11:27:34 2011
@@ -56,4 +56,6 @@ public interface RepositoryInfo extends
String getPrincipalIdAnonymous();
String getPrincipalIdAnyone();
+
+ List<Feature> getFeatures();
}
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java
Tue Jan 25 11:27:34 2011
@@ -23,7 +23,6 @@ import java.util.Map;
import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
-import org.apache.chemistry.opencmis.commons.enums.TypeMutability;
/**
* Base type definition interface.
@@ -153,7 +152,7 @@ public interface TypeDefinition extends
*/
Boolean isControllableAcl();
- TypeMutability getTypeMutability();
+ TypeMutabilityCapabilities getTypeMutability();
/**
* Returns the property definitions of this type.
Added:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeMutabilityCapabilities.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeMutabilityCapabilities.java?rev=1063230&view=auto
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeMutabilityCapabilities.java
(added)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeMutabilityCapabilities.java
Tue Jan 25 11:27:34 2011
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.definitions;
+
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+
+public interface TypeMutabilityCapabilities extends ExtensionsData {
+
+ boolean supportsCreate();
+
+ boolean supportsUpdate();
+
+ boolean supportsDelete();
+}
Propchange:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeMutabilityCapabilities.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
Tue Jan 25 11:27:34 2011
@@ -50,6 +50,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
import org.apache.chemistry.opencmis.commons.data.Feature;
+import org.apache.chemistry.opencmis.commons.data.FeatureKeyValuePair;
import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
import org.apache.chemistry.opencmis.commons.data.ObjectData;
import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
@@ -90,6 +91,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import
org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
+import
org.apache.chemistry.opencmis.commons.definitions.TypeMutabilityCapabilities;
import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
import org.apache.chemistry.opencmis.commons.enums.Action;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
@@ -105,7 +107,6 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.DateTimeResolution;
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
import org.apache.chemistry.opencmis.commons.enums.SupportedPermissions;
-import org.apache.chemistry.opencmis.commons.enums.TypeMutability;
import org.apache.chemistry.opencmis.commons.enums.Updatability;
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractPropertyData;
@@ -124,6 +125,7 @@ import org.apache.chemistry.opencmis.com
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.ExtensionDataImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.FailedToDeleteDataImpl;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.FeatureImpl;
+import
org.apache.chemistry.opencmis.commons.impl.dataobjects.FeatureKeyValuePairImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.NewTypeSettableAttributesImpl;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl;
@@ -159,6 +161,7 @@ import org.apache.chemistry.opencmis.com
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.RepositoryInfoImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionContainerImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionListImpl;
+import
org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeMutabilityCapabilitiesImpl;
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisACLCapabilityType;
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisACLType;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisAccessControlEntryType;
@@ -175,6 +178,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisChoiceString;
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisChoiceUri;
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisContentStreamType;
+import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionFeatureKeyValuePair;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionFeatureType;
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType;
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisListOfIdsType;
@@ -226,7 +230,6 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityJoin;
import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityQuery;
import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityRendition;
-import
org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityTypeMutability;
import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCardinality;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.EnumContentStreamAllowed;
import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumDateTimeResolution;
@@ -289,6 +292,13 @@ public final class Converter {
result.setRootFolder(repositoryInfo.getRootFolderId());
result.setThinClientUri(repositoryInfo.getThinClientURI());
result.setVendorName(repositoryInfo.getVendorName());
+ if (repositoryInfo.getExtendedFeatures() != null) {
+ List<Feature> features = new ArrayList<Feature>();
+ for (CmisExtensionFeatureType feature :
repositoryInfo.getExtendedFeatures()) {
+ features.add(convert(feature));
+ }
+ result.setFeatures(features);
+ }
// handle extensions
convertExtension(repositoryInfo, result);
@@ -322,13 +332,6 @@ public final class Converter {
result.setSupportsUnfiling(capabilities.isCapabilityUnfiling());
result.setSupportsVersionSpecificFiling(capabilities.isCapabilityVersionSpecificFiling());
result.setNewTypeSettableAttributes(convert(capabilities.getCapabilitySettableAttributesForNewTypes()));
- if (capabilities.getExtendedFeatures() != null) {
- List<Feature> features = new ArrayList<Feature>();
- for (CmisExtensionFeatureType feature :
capabilities.getExtendedFeatures()) {
- features.add(convert(feature));
- }
- result.setFeatures(features);
- }
// handle extensions
convertExtension(capabilities, result);
@@ -381,6 +384,14 @@ public final class Converter {
result.setVersionLabel(feature.getVersionLabel());
result.setDescription(feature.getDescription());
+ if (feature.getFeatureData() != null) {
+ List<FeatureKeyValuePair> data = new
ArrayList<FeatureKeyValuePair>();
+ result.setData(data);
+ for (CmisExtensionFeatureKeyValuePair fd :
feature.getFeatureData()) {
+ data.add(new FeatureKeyValuePairImpl(fd.getKey(),
fd.getValue()));
+ }
+ }
+
// handle extensions
convertExtension(feature, result);
@@ -463,6 +474,12 @@ public final class Converter {
}
}
+ if (repositoryInfo.getFeatures() != null) {
+ for (Feature feature : repositoryInfo.getFeatures()) {
+ result.getExtendedFeatures().add(convert(feature));
+ }
+ }
+
// handle extensions
convertExtension(repositoryInfo, result);
@@ -495,11 +512,6 @@ public final class Converter {
result.setCapabilityUnfiling(capabilities.isUnfilingSupported());
result.setCapabilityVersionSpecificFiling(capabilities.isVersionSpecificFilingSupported());
result.setCapabilitySettableAttributesForNewTypes(convert(capabilities.getNewTypeSettableAttributes()));
- if (capabilities.getFeatures() != null) {
- for (Feature feature : capabilities.getFeatures()) {
- result.getExtendedFeatures().add(convert(feature));
- }
- }
// handle extensions
convertExtension(capabilities, result);
@@ -552,6 +564,15 @@ public final class Converter {
result.setVersionLabel(feature.getVersionLabel());
result.setDescription(feature.getDescription());
+ if (feature.getData() != null) {
+ for (FeatureKeyValuePair fd : feature.getData()) {
+ CmisExtensionFeatureKeyValuePair kvp = new
CmisExtensionFeatureKeyValuePair();
+ kvp.setKey(fd.getKey());
+ kvp.setValue(fd.getValue());
+ result.getFeatureData().add(kvp);
+ }
+ }
+
// handle extensions
convertExtension(feature, result);
@@ -660,7 +681,7 @@ public final class Converter {
result.setLocalNamespace(typeDefinition.getLocalNamespace());
result.setParentTypeId(typeDefinition.getParentId());
result.setQueryName(typeDefinition.getQueryName());
- result.setTypeMutability(convert(TypeMutability.class,
typeDefinition.getTypeMutability()));
+ result.setTypeMutability(convert(typeDefinition.getTypeMutability()));
for (CmisPropertyDefinitionType propertyDefinition :
typeDefinition.getPropertyDefinition()) {
result.addPropertyDefinition(convert(propertyDefinition));
@@ -672,6 +693,24 @@ public final class Converter {
return result;
}
+ public static TypeMutabilityCapabilities convert(
+
org.apache.chemistry.opencmis.commons.impl.jaxb.TypeMutabilityCapabilities
typeMutabilityCapabilities) {
+ if (typeMutabilityCapabilities == null) {
+ return null;
+ }
+
+ TypeMutabilityCapabilitiesImpl result = new
TypeMutabilityCapabilitiesImpl();
+
+ result.setSupportsCreate(typeMutabilityCapabilities.isCreate());
+ result.setSupportsUpdate(typeMutabilityCapabilities.isUpdate());
+ result.setSupportsDelete(typeMutabilityCapabilities.isDelete());
+
+ // handle extensions
+ convertExtension(typeMutabilityCapabilities, result);
+
+ return result;
+ }
+
/**
* Converts a property definition object.
*/
@@ -870,7 +909,7 @@ public final class Converter {
result.setParentId(typeDefinition.getParentTypeId());
result.setQueryable(convertBoolean(typeDefinition.isQueryable(),
false));
result.setQueryName(typeDefinition.getQueryName());
- result.setTypeMutability(convert(EnumCapabilityTypeMutability.class,
typeDefinition.getTypeMutability()));
+ result.setTypeMutability(convert(typeDefinition.getTypeMutability()));
if (typeDefinition.getPropertyDefinitions() != null) {
for (PropertyDefinition<?> propDef :
typeDefinition.getPropertyDefinitions().values()) {
@@ -884,6 +923,24 @@ public final class Converter {
return result;
}
+ public static
org.apache.chemistry.opencmis.commons.impl.jaxb.TypeMutabilityCapabilities
convert(
+ TypeMutabilityCapabilities typeMutabilityCapabilities) {
+ if (typeMutabilityCapabilities == null) {
+ return null;
+ }
+
+
org.apache.chemistry.opencmis.commons.impl.jaxb.TypeMutabilityCapabilities
result = new
org.apache.chemistry.opencmis.commons.impl.jaxb.TypeMutabilityCapabilities();
+
+ result.setCreate(typeMutabilityCapabilities.supportsCreate());
+ result.setUpdate(typeMutabilityCapabilities.supportsUpdate());
+ result.setDelete(typeMutabilityCapabilities.supportsDelete());
+
+ // handle extensions
+ convertExtension(typeMutabilityCapabilities, result);
+
+ return result;
+ }
+
/**
* Converts a property definition object.
*/
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
Tue Jan 25 11:27:34 2011
@@ -23,8 +23,8 @@ import java.util.Map;
import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
+import
org.apache.chemistry.opencmis.commons.definitions.TypeMutabilityCapabilities;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
-import org.apache.chemistry.opencmis.commons.enums.TypeMutability;
/**
* Abstract type definition data implementation.
@@ -51,7 +51,7 @@ public abstract class AbstractTypeDefini
private Boolean fIsFulltextIndexed;
private Boolean fIsControllableACL;
private Boolean fIsControllablePolicy;
- private TypeMutability typeMutability;
+ private TypeMutabilityCapabilities typeMutability;
private Map<String, PropertyDefinition<?>> fPropertyDefinitions;
public void initialize(TypeDefinition typeDefinition) {
@@ -282,11 +282,11 @@ public abstract class AbstractTypeDefini
fIsControllablePolicy = isControllablePolicy;
}
- public TypeMutability getTypeMutability() {
+ public TypeMutabilityCapabilities getTypeMutability() {
return typeMutability;
}
- public void setTypeMutability(TypeMutability typeMutability) {
+ public void setTypeMutability(TypeMutabilityCapabilities typeMutability) {
this.typeMutability = typeMutability;
}
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java
Tue Jan 25 11:27:34 2011
@@ -18,7 +18,10 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
+import java.util.List;
+
import org.apache.chemistry.opencmis.commons.data.Feature;
+import org.apache.chemistry.opencmis.commons.data.FeatureKeyValuePair;
public class FeatureImpl extends AbstractExtensionData implements Feature {
@@ -29,6 +32,7 @@ public class FeatureImpl extends Abstrac
private String commonName;
private String versionLabel;
private String description;
+ private List<FeatureKeyValuePair> data;
public String getId() {
return id;
@@ -69,4 +73,12 @@ public class FeatureImpl extends Abstrac
public void setDescription(String description) {
this.description = description;
}
+
+ public List<FeatureKeyValuePair> getData() {
+ return data;
+ }
+
+ public void setData(List<FeatureKeyValuePair> data) {
+ this.data = data;
+ }
}
Added:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureKeyValuePairImpl.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureKeyValuePairImpl.java?rev=1063230&view=auto
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureKeyValuePairImpl.java
(added)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureKeyValuePairImpl.java
Tue Jan 25 11:27:34 2011
@@ -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.chemistry.opencmis.commons.impl.dataobjects;
+
+import org.apache.chemistry.opencmis.commons.data.FeatureKeyValuePair;
+
+public class FeatureKeyValuePairImpl implements FeatureKeyValuePair {
+
+ private String key;
+ private String value;
+
+ public FeatureKeyValuePairImpl() {
+ }
+
+ public FeatureKeyValuePairImpl(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key)
+ {
+ this.key = key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
Propchange:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureKeyValuePairImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
Tue Jan 25 11:27:34 2011
@@ -18,9 +18,6 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import java.util.List;
-
-import org.apache.chemistry.opencmis.commons.data.Feature;
import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
import org.apache.chemistry.opencmis.commons.data.RepositoryCapabilities;
import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
@@ -52,7 +49,6 @@ public class RepositoryCapabilitiesImpl
private Boolean fSupportsMultifiling;
private Boolean fSupportsUnfiling;
private Boolean fSupportsVersionSpecificFiling;
- private List<Feature> features;
private NewTypeSettableAttributes newTypeSettableAttributes;
/**
@@ -258,14 +254,6 @@ public class RepositoryCapabilitiesImpl
fSupportsVersionSpecificFiling = supportsVersionSpecificFiling;
}
- public List<Feature> getFeatures() {
- return features;
- }
-
- public void setFeatures(List<Feature> features) {
- this.features = features;
- }
-
public NewTypeSettableAttributes getNewTypeSettableAttributes() {
return newTypeSettableAttributes;
}
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
Tue Jan 25 11:27:34 2011
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
import java.util.List;
import org.apache.chemistry.opencmis.commons.data.AclCapabilities;
+import org.apache.chemistry.opencmis.commons.data.Feature;
import org.apache.chemistry.opencmis.commons.data.RepositoryCapabilities;
import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
@@ -48,6 +49,7 @@ public class RepositoryInfoImpl extends
private String vendorName;
private String productName;
private String productVersion;
+ private List<Feature> features;
/**
* Constructor.
@@ -72,6 +74,7 @@ public class RepositoryInfoImpl extends
vendorName = data.getVendorName();
productName = data.getProductName();
productVersion = data.getProductVersion();
+ features = data.getFeatures();
}
public String getId() {
@@ -202,6 +205,14 @@ public class RepositoryInfoImpl extends
this.productVersion = productVersion;
}
+ public List<Feature> getFeatures() {
+ return features;
+ }
+
+ public void setFeatures(List<Feature> features) {
+ this.features = features;
+ }
+
@Override
public String toString() {
return "Repository Info [id=" + id + ", name=" + name + ",
description=" + description + ", capabilities="
@@ -212,5 +223,4 @@ public class RepositoryInfoImpl extends
+ productVersion + ", root folder id=" + rootFolderId + ",
thin client URI=" + thinClientUri
+ ", version supported=" + versionSupported + "]" +
super.toString();
}
-
}
Added:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeMutabilityCapabilitiesImpl.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeMutabilityCapabilitiesImpl.java?rev=1063230&view=auto
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeMutabilityCapabilitiesImpl.java
(added)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeMutabilityCapabilitiesImpl.java
Tue Jan 25 11:27:34 2011
@@ -0,0 +1,54 @@
+/*
+ * 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.commons.impl.dataobjects;
+
+import
org.apache.chemistry.opencmis.commons.definitions.TypeMutabilityCapabilities;
+
+public class TypeMutabilityCapabilitiesImpl extends AbstractExtensionData
implements TypeMutabilityCapabilities {
+
+ private static final long serialVersionUID = 1L;
+
+ private boolean create;
+ private boolean update;
+ private boolean delete;
+
+ public boolean supportsCreate() {
+ return create;
+ }
+
+ public void setSupportsCreate(boolean create) {
+ this.create = create;
+ }
+
+ public boolean supportsUpdate() {
+ return update;
+ }
+
+ public void setSupportsUpdate(boolean update) {
+ this.update = update;
+ }
+
+ public boolean supportsDelete() {
+ return delete;
+ }
+
+ public void setSupportsDelete(boolean delete) {
+ this.delete = delete;
+ }
+}
Propchange:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeMutabilityCapabilitiesImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd?rev=1063230&r1=1063229&r2=1063230&view=diff
==============================================================================
---
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
(original)
+++
incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
Tue Jan 25 11:27:34 2011
@@ -786,7 +786,7 @@
</xs:element>
<!-- for type mutability (optional) -->
- <xs:element name="typeMutability"
type="cmis:enumCapabilityTypeMutability"
+ <xs:element name="typeMutability"
type="cmis:typeMutabilityCapabilities"
minOccurs="0" maxOccurs="1" />
<!-- flags -->
@@ -962,6 +962,10 @@
</xs:annotation>
</xs:element>
+ <xs:element name="extendedFeatures"
+ type="cmis:cmisExtensionFeatureType"
maxOccurs="unbounded" minOccurs="0">
+ </xs:element>
+
<xs:any namespace="##other" processContents="lax"
minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
@@ -1009,10 +1013,6 @@
type="cmis:cmisNewTypeSettableAttributes"
maxOccurs="1" minOccurs="0">
</xs:element>
- <xs:element name="extendedFeatures"
- type="cmis:cmisExtensionFeatureType"
maxOccurs="unbounded" minOccurs="0">
- </xs:element>
-
<!-- extension -->
<xs:any namespace="##other" processContents="skip"
minOccurs="0"
maxOccurs="unbounded" />
@@ -1275,13 +1275,14 @@
<!-- new types for type mutability here -->
- <xs:simpleType name="enumCapabilityTypeMutability">
- <xs:restriction base="xs:string">
- <xs:enumeration value="none" />
- <xs:enumeration value="createonly" />
- <xs:enumeration value="readwrite" />
- </xs:restriction>
- </xs:simpleType>
+
+ <xs:complexType name="typeMutabilityCapabilities">
+ <xs:sequence>
+ <xs:element name="create" type="xs:boolean"/>
+ <xs:element name="update" type="xs:boolean"/>
+ <xs:element name="delete" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="cmisCreateablePropertiesListType">
<xs:sequence maxOccurs="unbounded" minOccurs="0">
@@ -1325,6 +1326,13 @@
<!-- new types for feature extensions here -->
+ <xs:complexType name="cmisExtensionFeatureKeyValuePair">
+ <xs:sequence>
+ <xs:element minOccurs="1" maxOccurs="1" name="key"
type="xs:string" />
+ <xs:element minOccurs="1" maxOccurs="1" name="value"
type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+
<xs:complexType name="cmisExtensionFeatureType">
<xs:sequence>
<!-- id is the only mandatory field - typically will be a URN-->
@@ -1336,6 +1344,7 @@
<!-- optional version label-->
<xs:element minOccurs="0" maxOccurs="1" name="versionLabel"
type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="description"
type="xs:string" />
+ <xs:element name="featureData"
type="cmis:cmisExtensionFeatureKeyValuePair" minOccurs="0"
maxOccurs="unbounded" />
<xs:any processContents="lax" namespace="##other" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>