Author: fmui
Date: Fri Feb 25 11:51:49 2011
New Revision: 1074482
URL: http://svn.apache.org/viewvc?rev=1074482&view=rev
Log:
CMIS 1.1 XSD updates
Added:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CreatablePropertyTypeList.java
(with props)
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CreatablePropertyTypeListImpl.java
(with props)
Modified:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
Added:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CreatablePropertyTypeList.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CreatablePropertyTypeList.java?rev=1074482&view=auto
==============================================================================
---
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CreatablePropertyTypeList.java
(added)
+++
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CreatablePropertyTypeList.java
Fri Feb 25 11:51:49 2011
@@ -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.chemistry.opencmis.commons.data;
+
+import java.util.List;
+
+import org.apache.chemistry.opencmis.commons.enums.PropertyType;
+
+public interface CreatablePropertyTypeList {
+
+ List<PropertyType> canCreate();
+}
Propchange:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/CreatablePropertyTypeList.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
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/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java?rev=1074482&r1=1074481&r2=1074482&view=diff
==============================================================================
---
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
(original)
+++
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
Fri Feb 25 11:51:49 2011
@@ -71,5 +71,7 @@ public interface RepositoryCapabilities
// Type Mutability
+ CreatablePropertyTypeList getCreatablePropertyTypeList();
+
NewTypeSettableAttributes getNewTypeSettableAttributes();
}
Modified:
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/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java?rev=1074482&r1=1074481&r2=1074482&view=diff
==============================================================================
---
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
(original)
+++
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
Fri Feb 25 11:51:49 2011
@@ -47,6 +47,7 @@ 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.data.ContentStream;
+import org.apache.chemistry.opencmis.commons.data.CreatablePropertyTypeList;
import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
import org.apache.chemistry.opencmis.commons.data.Feature;
@@ -121,6 +122,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.dataobjects.ChoiceImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.CmisExtensionElementImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl;
+import
org.apache.chemistry.opencmis.commons.impl.dataobjects.CreatablePropertyTypeListImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.ExtensionDataImpl;
import
org.apache.chemistry.opencmis.commons.impl.dataobjects.FailedToDeleteDataImpl;
@@ -178,6 +180,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.CmisCreatablePropertyTypeListType;
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;
@@ -218,6 +221,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDocumentDefinitionType;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeFolderDefinitionType;
+import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeMutabilityCapabilitiesType;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypePolicyDefinitionType;
import
org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeRelationshipDefinitionType;
import org.apache.chemistry.opencmis.commons.impl.jaxb.DeleteTreeResponse;
@@ -331,6 +335,7 @@ public final class Converter {
result.setSupportsMultifiling(capabilities.isCapabilityMultifiling());
result.setSupportsUnfiling(capabilities.isCapabilityUnfiling());
result.setSupportsVersionSpecificFiling(capabilities.isCapabilityVersionSpecificFiling());
+
result.setCreatablePropertyTypeList(convert(capabilities.getCapabilityCreatablePropertiesList()));
result.setNewTypeSettableAttributes(convert(capabilities.getCapabilitySettableAttributesForNewTypes()));
// handle extensions
@@ -339,6 +344,22 @@ public final class Converter {
return result;
}
+ public static CreatablePropertyTypeList
convert(CmisCreatablePropertyTypeListType creatablePropertyTypeList) {
+ if (creatablePropertyTypeList == null ||
creatablePropertyTypeList.getCanCreate().size() == 0) {
+ return null;
+ }
+
+ CreatablePropertyTypeListImpl result = new
CreatablePropertyTypeListImpl();
+ List<PropertyType> list = new ArrayList<PropertyType>();
+ result.setCanCreate(list);
+
+ for (EnumPropertyType pt : creatablePropertyTypeList.getCanCreate()) {
+ list.add(convert(PropertyType.class, pt));
+ }
+
+ return result;
+ }
+
/**
* Converts SettableAttributesForNewTypes.
*/
@@ -511,6 +532,7 @@ public final class Converter {
result.setCapabilityRenditions(convert(EnumCapabilityRendition.class,
capabilities.getRenditionsCapability()));
result.setCapabilityUnfiling(capabilities.isUnfilingSupported());
result.setCapabilityVersionSpecificFiling(capabilities.isVersionSpecificFilingSupported());
+
result.setCapabilityCreatablePropertiesList(convert(capabilities.getCreatablePropertyTypeList()));
result.setCapabilitySettableAttributesForNewTypes(convert(capabilities.getNewTypeSettableAttributes()));
// handle extensions
@@ -519,6 +541,21 @@ public final class Converter {
return result;
}
+ public static CmisCreatablePropertyTypeListType
convert(CreatablePropertyTypeList creatablePropertyTypeList) {
+ if (creatablePropertyTypeList == null ||
creatablePropertyTypeList.canCreate() == null
+ || creatablePropertyTypeList.canCreate().size() == 0) {
+ return null;
+ }
+
+ CmisCreatablePropertyTypeListType result = new
CmisCreatablePropertyTypeListType();
+
+ for (PropertyType pt : creatablePropertyTypeList.canCreate()) {
+ result.getCanCreate().add(convert(EnumPropertyType.class, pt));
+ }
+
+ return result;
+ }
+
/**
* Converts SettableAttributesForNewTypes.
*/
@@ -693,8 +730,7 @@ public final class Converter {
return result;
}
- public static TypeMutabilityCapabilities convert(
-
org.apache.chemistry.opencmis.commons.impl.jaxb.TypeMutabilityCapabilities
typeMutabilityCapabilities) {
+ public static TypeMutabilityCapabilities
convert(CmisTypeMutabilityCapabilitiesType typeMutabilityCapabilities) {
if (typeMutabilityCapabilities == null) {
return null;
}
@@ -923,13 +959,12 @@ public final class Converter {
return result;
}
- public static
org.apache.chemistry.opencmis.commons.impl.jaxb.TypeMutabilityCapabilities
convert(
- TypeMutabilityCapabilities typeMutabilityCapabilities) {
+ public static CmisTypeMutabilityCapabilitiesType
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();
+ CmisTypeMutabilityCapabilitiesType result = new
CmisTypeMutabilityCapabilitiesType();
result.setCreate(typeMutabilityCapabilities.supportsCreate());
result.setUpdate(typeMutabilityCapabilities.supportsUpdate());
Added:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CreatablePropertyTypeListImpl.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CreatablePropertyTypeListImpl.java?rev=1074482&view=auto
==============================================================================
---
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CreatablePropertyTypeListImpl.java
(added)
+++
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CreatablePropertyTypeListImpl.java
Fri Feb 25 11:51:49 2011
@@ -0,0 +1,37 @@
+/*
+ * 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 java.util.List;
+
+import org.apache.chemistry.opencmis.commons.data.CreatablePropertyTypeList;
+import org.apache.chemistry.opencmis.commons.enums.PropertyType;
+
+public class CreatablePropertyTypeListImpl implements
CreatablePropertyTypeList {
+
+ private List<PropertyType> propertyTypeList;
+
+ public void setCanCreate(List<PropertyType> list) {
+ this.propertyTypeList = list;
+ }
+
+ public List<PropertyType> canCreate() {
+ return propertyTypeList;
+ }
+}
Propchange:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/CreatablePropertyTypeListImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
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/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java?rev=1074482&r1=1074481&r2=1074482&view=diff
==============================================================================
---
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
(original)
+++
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
Fri Feb 25 11:51:49 2011
@@ -18,6 +18,7 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
+import org.apache.chemistry.opencmis.commons.data.CreatablePropertyTypeList;
import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
import org.apache.chemistry.opencmis.commons.data.RepositoryCapabilities;
import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
@@ -49,6 +50,7 @@ public class RepositoryCapabilitiesImpl
private Boolean fSupportsMultifiling;
private Boolean fSupportsUnfiling;
private Boolean fSupportsVersionSpecificFiling;
+ private CreatablePropertyTypeList creatablePropertyTypeList;
private NewTypeSettableAttributes newTypeSettableAttributes;
/**
@@ -254,6 +256,14 @@ public class RepositoryCapabilitiesImpl
fSupportsVersionSpecificFiling = supportsVersionSpecificFiling;
}
+ public CreatablePropertyTypeList getCreatablePropertyTypeList() {
+ return creatablePropertyTypeList;
+ }
+
+ public void setCreatablePropertyTypeList(CreatablePropertyTypeList
creatablePropertyTypeList) {
+ this.creatablePropertyTypeList = creatablePropertyTypeList;
+ }
+
public NewTypeSettableAttributes getNewTypeSettableAttributes() {
return newTypeSettableAttributes;
}
Modified:
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
URL:
http://svn.apache.org/viewvc/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd?rev=1074482&r1=1074481&r2=1074482&view=diff
==============================================================================
---
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
(original)
+++
chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
Fri Feb 25 11:51:49 2011
@@ -786,7 +786,7 @@
</xs:element>
<!-- for type mutability (optional) -->
- <xs:element name="typeMutability"
type="cmis:typeMutabilityCapabilities"
+ <xs:element name="typeMutability"
type="cmis:cmisTypeMutabilityCapabilitiesType"
minOccurs="0" maxOccurs="1" />
<!-- flags -->
@@ -1007,7 +1007,7 @@
<!-- type mutability related -->
<xs:element name="capabilityCreatablePropertiesList"
- type="cmis:cmisCreateablePropertiesListType"
maxOccurs="1" minOccurs="0">
+ type="cmis:cmisCreatablePropertyTypeListType"
maxOccurs="1" minOccurs="0">
</xs:element>
<xs:element
name="capabilitySettableAttributesForNewTypes"
type="cmis:cmisNewTypeSettableAttributes"
maxOccurs="1" minOccurs="0">
@@ -1276,15 +1276,17 @@
<!-- new types for type mutability here -->
- <xs:complexType name="typeMutabilityCapabilities">
+ <xs:complexType name="cmisTypeMutabilityCapabilitiesType">
<xs:sequence>
<xs:element name="create" type="xs:boolean"/>
<xs:element name="update" type="xs:boolean"/>
<xs:element name="delete" type="xs:boolean"/>
+ <xs:any namespace="##other" minOccurs="0"
maxOccurs="unbounded"
+ processContents="lax" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="cmisCreateablePropertiesListType">
+ <xs:complexType name="cmisCreatablePropertyTypeListType">
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="canCreate"
type="cmis:enumPropertyType">