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 2013/07/29 00:27:43 UTC
svn commit: r1507864 [1/2] - in /chemistry/opencmis/trunk:
chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/
chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/ja...
Author: fmui
Date: Sun Jul 28 22:27:42 2013
New Revision: 1507864
URL: http://svn.apache.org/r1507864
Log:
added TypeDefintionFactory (incomplete)
Added:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableDocumentTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableFolderTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableItemTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePolicyTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyBooleanDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDateTimeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDecimalDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyHtmlDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIdDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIntegerDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyStringDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyUriDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableRelationshipTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableSecondaryTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ItemTypeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PolicyTypeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/SecondaryTypeDefinitionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableDocumentTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableDocumentTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableDocumentTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableDocumentTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -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.commons.definitions;
+
+import org.apache.chemistry.opencmis.commons.enums.ContentStreamAllowed;
+
+/**
+ * Mutable Document Type Definition.
+ *
+ * @cmis 1.0
+ */
+public interface MutableDocumentTypeDefinition extends DocumentTypeDefinition, MutableTypeDefinition {
+
+ void setContentStreamAllowed(ContentStreamAllowed contentStreamAllowed);
+
+ void setIsVersionable(Boolean isVersionable);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableFolderTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableFolderTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableFolderTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableFolderTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.definitions;
+
+/**
+ * Mutable Folder Type Definition.
+ *
+ * @cmis 1.0
+ */
+public interface MutableFolderTypeDefinition extends FolderTypeDefinition, MutableTypeDefinition {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableItemTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableItemTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableItemTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableItemTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.definitions;
+
+/**
+ * Mutable Item Type Definition.
+ *
+ * @cmis 1.1
+ */
+public interface MutableItemTypeDefinition extends ItemTypeDefinition, MutableTypeDefinition {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePolicyTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePolicyTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePolicyTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePolicyTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.definitions;
+
+/**
+ * Mutable Policy Type Definition.
+ *
+ * @cmis 1.0
+ */
+public interface MutablePolicyTypeDefinition extends PolicyTypeDefinition, MutableTypeDefinition {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyBooleanDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyBooleanDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyBooleanDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyBooleanDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface MutablePropertyBooleanDefinition extends PropertyBooleanDefinition, MutablePropertyDefinition<Boolean> {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDateTimeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDateTimeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDateTimeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDateTimeDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,29 @@
+/*
+ * 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 java.util.GregorianCalendar;
+
+import org.apache.chemistry.opencmis.commons.enums.DateTimeResolution;
+
+public interface MutablePropertyDateTimeDefinition extends PropertyDateTimeDefinition,
+ MutablePropertyDefinition<GregorianCalendar> {
+
+ void setDateTimeResolution(DateTimeResolution dateTimeResolution);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDecimalDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDecimalDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDecimalDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDecimalDefinition.java Sun Jul 28 22:27:42 2013
@@ -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.commons.definitions;
+
+import java.math.BigDecimal;
+
+import org.apache.chemistry.opencmis.commons.enums.DecimalPrecision;
+
+public interface MutablePropertyDecimalDefinition extends PropertyDecimalDefinition,
+ MutablePropertyDefinition<BigDecimal> {
+
+ void setMinValue(BigDecimal minValue);
+
+ void setMaxValue(BigDecimal maxValue);
+
+ void setPrecision(DecimalPrecision precision);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,65 @@
+/*
+ * 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 java.util.List;
+
+import org.apache.chemistry.opencmis.commons.enums.Cardinality;
+import org.apache.chemistry.opencmis.commons.enums.PropertyType;
+import org.apache.chemistry.opencmis.commons.enums.Updatability;
+
+/**
+ * Mutable base property definition interface.
+ *
+ * @cmis 1.0
+ */
+public interface MutablePropertyDefinition<T> extends PropertyDefinition<T> {
+
+ void setId(String id);
+
+ void setLocalName(String localName);
+
+ void setLocalNamespace(String localNamespace);
+
+ void setQueryName(String queryName);
+
+ void setDisplayName(String displayName);
+
+ void setDescription(String description);
+
+ void setPropertyType(PropertyType propertyType);
+
+ void setCardinality(Cardinality cardinality);
+
+ void setChoices(List<Choice<T>> choiceList);
+
+ void setDefaultValue(List<T> defaultValue);
+
+ void setUpdatability(Updatability updatability);
+
+ void setIsInherited(Boolean isInherited);
+
+ void setIsQueryable(Boolean isQueryable);
+
+ void setIsOrderable(Boolean isOrderable);
+
+ void setIsRequired(Boolean isRequired);
+
+ void setIsOpenChoice(Boolean isOpenChoice);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyHtmlDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyHtmlDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyHtmlDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyHtmlDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface MutablePropertyHtmlDefinition extends PropertyHtmlDefinition, MutablePropertyDefinition<String> {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIdDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIdDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIdDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIdDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface MutablePropertyIdDefinition extends PropertyIdDefinition, MutablePropertyDefinition<String> {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIntegerDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIntegerDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIntegerDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyIntegerDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,29 @@
+/*
+ * 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 java.math.BigInteger;
+
+public interface MutablePropertyIntegerDefinition extends PropertyIntegerDefinition,
+ MutablePropertyDefinition<BigInteger> {
+
+ void setMinValue(BigInteger minValue);
+
+ void setMaxValue(BigInteger maxValue);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyStringDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyStringDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyStringDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyStringDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,26 @@
+/*
+ * 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 java.math.BigInteger;
+
+public interface MutablePropertyStringDefinition extends PropertyStringDefinition, MutablePropertyDefinition<String> {
+
+ void setMaxLength(BigInteger maxLength);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyUriDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyUriDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyUriDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutablePropertyUriDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface MutablePropertyUriDefinition extends PropertyUriDefinition, MutablePropertyDefinition<String> {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableRelationshipTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableRelationshipTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableRelationshipTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableRelationshipTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -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.commons.definitions;
+
+import java.util.List;
+
+/**
+ * Mutable Relationship Type Definition.
+ *
+ * @cmis 1.0
+ */
+public interface MutableRelationshipTypeDefinition extends RelationshipTypeDefinition, MutableTypeDefinition {
+
+ void setAllowedSourceTypes(List<String> allowedSourceTypes);
+
+ void setAllowedTargetTypes(List<String> allowedTargetTypes);
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableSecondaryTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableSecondaryTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableSecondaryTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableSecondaryTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.definitions;
+
+/**
+ * Mutable Secondary Type Definition.
+ *
+ * @cmis 1.1
+ */
+public interface MutableSecondaryTypeDefinition extends SecondaryTypeDefinition, MutableTypeDefinition {
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableTypeDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableTypeDefinition.java?rev=1507864&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableTypeDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/MutableTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -0,0 +1,73 @@
+/*
+ * 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.enums.BaseTypeId;
+
+public interface MutableTypeDefinition extends TypeDefinition {
+
+ void setId(String id);
+
+ void setLocalName(String localName);
+
+ void setLocalNamespace(String localNamespace);
+
+ void setQueryName(String queryName);
+
+ void setDisplayName(String displayName);
+
+ void setDescription(String description);
+
+ void setBaseTypeId(BaseTypeId baseId);
+
+ void setParentTypeId(String parentId);
+
+ void setIsCreatable(Boolean isCreatable);
+
+ void setIsFileable(Boolean isFileable);
+
+ void setIsQueryable(Boolean isQueryable);
+
+ void setIsIncludedInSupertypeQuery(Boolean isIncludedInSupertypeQuery);
+
+ void setIsFulltextIndexed(Boolean isFulltextIndexed);
+
+ void setIsControllableAcl(Boolean isControllableACL);
+
+ void setIsControllablePolicy(Boolean isControllablePolicy);
+
+ void setTypeMutability(TypeMutability typeMutability);
+
+ // --- property definitions ---
+
+ /**
+ * Adds or replaces a property definition.
+ */
+ void addPropertyDefinition(PropertyDefinition<?> propertyDefinition);
+
+ /**
+ * Removes a property definition.
+ */
+ void removePropertyDefinition(String propertyId);
+
+ /**
+ * Removes all property definitions.
+ */
+ void removeAllPropertyDefinitions();
+}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java Sun Jul 28 22:27:42 2013
@@ -21,7 +21,7 @@ package org.apache.chemistry.opencmis.co
import java.util.List;
import org.apache.chemistry.opencmis.commons.definitions.Choice;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyDefinition;
import org.apache.chemistry.opencmis.commons.enums.Cardinality;
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
import org.apache.chemistry.opencmis.commons.enums.Updatability;
@@ -29,7 +29,8 @@ import org.apache.chemistry.opencmis.com
/**
* Abstract property definition data implementation.
*/
-public abstract class AbstractPropertyDefinition<T> extends AbstractExtensionData implements PropertyDefinition<T> {
+public abstract class AbstractPropertyDefinition<T> extends AbstractExtensionData implements
+ MutablePropertyDefinition<T> {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/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/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java Sun Jul 28 22:27:42 2013
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
import java.util.LinkedHashMap;
import java.util.Map;
+import org.apache.chemistry.opencmis.commons.definitions.MutableTypeDefinition;
import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.definitions.TypeMutability;
@@ -29,7 +30,7 @@ import org.apache.chemistry.opencmis.com
/**
* Abstract type definition data implementation.
*/
-public abstract class AbstractTypeDefinition extends AbstractExtensionData implements TypeDefinition, Cloneable {
+public abstract class AbstractTypeDefinition extends AbstractExtensionData implements MutableTypeDefinition, Cloneable {
private static final long serialVersionUID = 2L;
@@ -199,32 +200,40 @@ public abstract class AbstractTypeDefini
return propertyDefinitions;
}
- public void setPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
- if (propertyDefinitions == null) {
- this.propertyDefinitions = null;
- } else if (propertyDefinitions instanceof LinkedHashMap) {
- this.propertyDefinitions = (LinkedHashMap<String, PropertyDefinition<?>>) propertyDefinitions;
+ public void setPropertyDefinitions(Map<String, PropertyDefinition<?>> newPropertyDefinitions) {
+ if (newPropertyDefinitions == null) {
+ propertyDefinitions = null;
+ } else if (newPropertyDefinitions instanceof LinkedHashMap) {
+ propertyDefinitions = (LinkedHashMap<String, PropertyDefinition<?>>) newPropertyDefinitions;
} else {
- this.propertyDefinitions = new LinkedHashMap<String, PropertyDefinition<?>>(propertyDefinitions);
+ propertyDefinitions = new LinkedHashMap<String, PropertyDefinition<?>>(newPropertyDefinitions);
}
}
- /**
- * Adds a property definition.
- *
- * @param propertyDefinition
- * the property definition
- */
public void addPropertyDefinition(PropertyDefinition<?> propertyDefinition) {
if (propertyDefinition == null) {
return;
}
- if (this.propertyDefinitions == null) {
- this.propertyDefinitions = new LinkedHashMap<String, PropertyDefinition<?>>();
+ if (propertyDefinitions == null) {
+ propertyDefinitions = new LinkedHashMap<String, PropertyDefinition<?>>();
+ }
+
+ propertyDefinitions.put(propertyDefinition.getId(), propertyDefinition);
+ }
+
+ public void removePropertyDefinition(String propertyId) {
+ if (propertyId == null) {
+ return;
+ }
+
+ if (propertyDefinitions != null) {
+ propertyDefinitions.remove(propertyId);
}
+ }
- this.propertyDefinitions.put(propertyDefinition.getId(), propertyDefinition);
+ public void removeAllPropertyDefinitions() {
+ propertyDefinitions = null;
}
public TypeMutability getTypeMutability() {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,13 +18,13 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.DocumentTypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutableDocumentTypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.ContentStreamAllowed;
/**
* Document type definition.
*/
-public class DocumentTypeDefinitionImpl extends AbstractTypeDefinition implements DocumentTypeDefinition {
+public class DocumentTypeDefinitionImpl extends AbstractTypeDefinition implements MutableDocumentTypeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,12 +18,12 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.FolderTypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutableFolderTypeDefinition;
/**
* Folder type definition.
*/
-public class FolderTypeDefinitionImpl extends AbstractTypeDefinition implements FolderTypeDefinition {
+public class FolderTypeDefinitionImpl extends AbstractTypeDefinition implements MutableFolderTypeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ItemTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ItemTypeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ItemTypeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ItemTypeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,9 +18,12 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.ItemTypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutableItemTypeDefinition;
-public class ItemTypeDefinitionImpl extends AbstractTypeDefinition implements ItemTypeDefinition {
+/**
+ * Item type definition.
+ */
+public class ItemTypeDefinitionImpl extends AbstractTypeDefinition implements MutableItemTypeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PolicyTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PolicyTypeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PolicyTypeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PolicyTypeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,12 +18,12 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.PolicyTypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePolicyTypeDefinition;
/**
* Policy type definition.
*/
-public class PolicyTypeDefinitionImpl extends AbstractTypeDefinition implements PolicyTypeDefinition {
+public class PolicyTypeDefinitionImpl extends AbstractTypeDefinition implements MutablePolicyTypeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,13 +18,13 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyBooleanDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyBooleanDefinition;
/**
* Boolean property definition data implementation.
*/
public class PropertyBooleanDefinitionImpl extends AbstractPropertyDefinition<Boolean> implements
- PropertyBooleanDefinition {
+ MutablePropertyBooleanDefinition {
private static final long serialVersionUID = 1L;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -20,14 +20,14 @@ package org.apache.chemistry.opencmis.co
import java.util.GregorianCalendar;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyDateTimeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyDateTimeDefinition;
import org.apache.chemistry.opencmis.commons.enums.DateTimeResolution;
/**
* DateTime property definition data implementation.
*/
public class PropertyDateTimeDefinitionImpl extends AbstractPropertyDefinition<GregorianCalendar> implements
- PropertyDateTimeDefinition {
+ MutablePropertyDateTimeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -20,14 +20,14 @@ package org.apache.chemistry.opencmis.co
import java.math.BigDecimal;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyDecimalDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyDecimalDefinition;
import org.apache.chemistry.opencmis.commons.enums.DecimalPrecision;
/**
* Decimal property definition data implementation.
*/
public class PropertyDecimalDefinitionImpl extends AbstractPropertyDefinition<BigDecimal> implements
- PropertyDecimalDefinition {
+ MutablePropertyDecimalDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,12 +18,13 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyHtmlDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyHtmlDefinition;
/**
* HTML property definition data implementation.
*/
-public class PropertyHtmlDefinitionImpl extends AbstractPropertyDefinition<String> implements PropertyHtmlDefinition {
+public class PropertyHtmlDefinitionImpl extends AbstractPropertyDefinition<String> implements
+ MutablePropertyHtmlDefinition {
private static final long serialVersionUID = 1L;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,12 +18,12 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyIdDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyIdDefinition;
/**
* Id property definition data implementation.
*/
-public class PropertyIdDefinitionImpl extends AbstractPropertyDefinition<String> implements PropertyIdDefinition {
+public class PropertyIdDefinitionImpl extends AbstractPropertyDefinition<String> implements MutablePropertyIdDefinition {
private static final long serialVersionUID = 1L;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -20,13 +20,13 @@ package org.apache.chemistry.opencmis.co
import java.math.BigInteger;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyIntegerDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyIntegerDefinition;
/**
* Boolean property definition data implementation.
*/
public class PropertyIntegerDefinitionImpl extends AbstractPropertyDefinition<BigInteger> implements
- PropertyIntegerDefinition {
+ MutablePropertyIntegerDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -20,13 +20,13 @@ package org.apache.chemistry.opencmis.co
import java.math.BigInteger;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyStringDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyStringDefinition;
/**
* String property definition data implementation.
*/
public class PropertyStringDefinitionImpl extends AbstractPropertyDefinition<String> implements
- PropertyStringDefinition {
+ MutablePropertyStringDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,12 +18,13 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.PropertyUriDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutablePropertyUriDefinition;
/**
* URI property definition data implementation.
*/
-public class PropertyUriDefinitionImpl extends AbstractPropertyDefinition<String> implements PropertyUriDefinition {
+public class PropertyUriDefinitionImpl extends AbstractPropertyDefinition<String> implements
+ MutablePropertyUriDefinition {
private static final long serialVersionUID = 1L;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -21,12 +21,12 @@ package org.apache.chemistry.opencmis.co
import java.util.ArrayList;
import java.util.List;
-import org.apache.chemistry.opencmis.commons.definitions.RelationshipTypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutableRelationshipTypeDefinition;
/**
* Relationship type definition.
*/
-public class RelationshipTypeDefinitionImpl extends AbstractTypeDefinition implements RelationshipTypeDefinition {
+public class RelationshipTypeDefinitionImpl extends AbstractTypeDefinition implements MutableRelationshipTypeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/SecondaryTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/SecondaryTypeDefinitionImpl.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/SecondaryTypeDefinitionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/SecondaryTypeDefinitionImpl.java Sun Jul 28 22:27:42 2013
@@ -18,9 +18,9 @@
*/
package org.apache.chemistry.opencmis.commons.impl.dataobjects;
-import org.apache.chemistry.opencmis.commons.definitions.SecondaryTypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.MutableSecondaryTypeDefinition;
-public class SecondaryTypeDefinitionImpl extends AbstractTypeDefinition implements SecondaryTypeDefinition {
+public class SecondaryTypeDefinitionImpl extends AbstractTypeDefinition implements MutableSecondaryTypeDefinition {
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java?rev=1507864&r1=1507863&r2=1507864&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java Sun Jul 28 22:27:42 2013
@@ -24,39 +24,23 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.chemistry.opencmis.commons.PropertyIds;
+import org.apache.chemistry.opencmis.commons.definitions.MutableTypeDefinition;
import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
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.enums.BaseTypeId;
-import org.apache.chemistry.opencmis.commons.enums.Cardinality;
-import org.apache.chemistry.opencmis.commons.enums.ContentStreamAllowed;
-import org.apache.chemistry.opencmis.commons.enums.PropertyType;
-import org.apache.chemistry.opencmis.commons.enums.Updatability;
+import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
import org.apache.chemistry.opencmis.commons.impl.WSConverter;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractPropertyDefinition;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.ItemTypeDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PolicyTypeDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyBooleanDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyDateTimeDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyDecimalDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyHtmlDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyIdDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyIntegerDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyStringDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyUriDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.RelationshipTypeDefinitionImpl;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.SecondaryTypeDefinitionImpl;
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.TypeMutabilityImpl;
import org.apache.chemistry.opencmis.commons.server.CallContext;
+import org.apache.chemistry.opencmis.server.support.TypeDefinitionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -75,312 +59,53 @@ public class TypeManager {
private static final Logger LOG = LoggerFactory.getLogger(TypeManager.class);
+ private TypeDefinitionFactory tdf;
private Map<String, TypeDefinitionContainerImpl> types;
private List<TypeDefinitionContainer> typesList;
public TypeManager() {
- setup();
+ tdf = TypeDefinitionFactory.newInstance();
+ tdf.setDefaultNamespace(NAMESPACE);
+ tdf.setDefaultControllableAcl(false);
+ tdf.setDefaultControllablePolicy(false);
+ tdf.setDefaultQueryable(false);
+ tdf.setDefaultTypeMutability(tdf.createTypeMutability(false, false, false));
+
+ setup(CmisVersion.CMIS_1_1);
}
/**
* Creates the base types.
*/
- private void setup() {
+ private void setup(CmisVersion cmisVersion) {
types = new HashMap<String, TypeDefinitionContainerImpl>();
typesList = new ArrayList<TypeDefinitionContainer>();
- // type mutability
-
- TypeMutabilityImpl typeMutability = new TypeMutabilityImpl();
- typeMutability.setCanCreate(false);
- typeMutability.setCanUpdate(false);
- typeMutability.setCanDelete(false);
-
- // folder type
- FolderTypeDefinitionImpl folderType = new FolderTypeDefinitionImpl();
- folderType.setBaseTypeId(BaseTypeId.CMIS_FOLDER);
- folderType.setIsControllableAcl(false);
- folderType.setIsControllablePolicy(false);
- folderType.setIsCreatable(true);
- folderType.setDescription("Folder");
- folderType.setDisplayName("Folder");
- folderType.setIsFileable(true);
- folderType.setIsFulltextIndexed(false);
- folderType.setIsIncludedInSupertypeQuery(true);
- folderType.setLocalName("Folder");
- folderType.setLocalNamespace(NAMESPACE);
- folderType.setIsQueryable(false);
- folderType.setQueryName("cmis:folder");
- folderType.setId(FOLDER_TYPE_ID);
- folderType.setTypeMutability(typeMutability);
-
- addBasePropertyDefinitions(folderType);
- addFolderPropertyDefinitions(folderType);
-
- addTypeInteral(folderType);
-
- // document type
- DocumentTypeDefinitionImpl documentType = new DocumentTypeDefinitionImpl();
- documentType.setBaseTypeId(BaseTypeId.CMIS_DOCUMENT);
- documentType.setIsControllableAcl(false);
- documentType.setIsControllablePolicy(false);
- documentType.setIsCreatable(true);
- documentType.setDescription("Document");
- documentType.setDisplayName("Document");
- documentType.setIsFileable(true);
- documentType.setIsFulltextIndexed(false);
- documentType.setIsIncludedInSupertypeQuery(true);
- documentType.setLocalName("Document");
- documentType.setLocalNamespace(NAMESPACE);
- documentType.setIsQueryable(false);
- documentType.setQueryName("cmis:document");
- documentType.setId(DOCUMENT_TYPE_ID);
- documentType.setTypeMutability(typeMutability);
-
- documentType.setIsVersionable(false);
- documentType.setContentStreamAllowed(ContentStreamAllowed.ALLOWED);
-
- addBasePropertyDefinitions(documentType);
- addDocumentPropertyDefinitions(documentType);
-
- addTypeInteral(documentType);
-
- // relationship types
- RelationshipTypeDefinitionImpl relationshipType = new RelationshipTypeDefinitionImpl();
- relationshipType.setBaseTypeId(BaseTypeId.CMIS_RELATIONSHIP);
- relationshipType.setIsControllableAcl(false);
- relationshipType.setIsControllablePolicy(false);
- relationshipType.setIsCreatable(false);
- relationshipType.setDescription("Relationship");
- relationshipType.setDisplayName("Relationship");
- relationshipType.setIsFileable(false);
- relationshipType.setIsIncludedInSupertypeQuery(true);
- relationshipType.setLocalName("Relationship");
- relationshipType.setLocalNamespace(NAMESPACE);
- relationshipType.setIsQueryable(false);
- relationshipType.setQueryName("cmis:relationship");
- relationshipType.setId(RELATIONSHIP_TYPE_ID);
- relationshipType.setTypeMutability(typeMutability);
-
- addBasePropertyDefinitions(relationshipType);
-
- // not supported - don't expose it
- // addTypeInteral(relationshipType);
-
- // policy type
- PolicyTypeDefinitionImpl policyType = new PolicyTypeDefinitionImpl();
- policyType.setBaseTypeId(BaseTypeId.CMIS_POLICY);
- policyType.setIsControllableAcl(false);
- policyType.setIsControllablePolicy(false);
- policyType.setIsCreatable(false);
- policyType.setDescription("Policy");
- policyType.setDisplayName("Policy");
- policyType.setIsFileable(false);
- policyType.setIsIncludedInSupertypeQuery(true);
- policyType.setLocalName("Policy");
- policyType.setLocalNamespace(NAMESPACE);
- policyType.setIsQueryable(false);
- policyType.setQueryName("cmis:policy");
- policyType.setId(POLICY_TYPE_ID);
- policyType.setTypeMutability(typeMutability);
-
- addBasePropertyDefinitions(policyType);
-
- // not supported - don't expose it
- // addTypeInteral(policyType);
-
- // item type
- ItemTypeDefinitionImpl itemType = new ItemTypeDefinitionImpl();
- itemType.setBaseTypeId(BaseTypeId.CMIS_ITEM);
- itemType.setIsControllableAcl(false);
- itemType.setIsControllablePolicy(false);
- itemType.setIsCreatable(true);
- itemType.setDescription("Item");
- itemType.setDisplayName("Item");
- itemType.setIsFileable(true);
- itemType.setIsIncludedInSupertypeQuery(true);
- itemType.setLocalName("Item");
- itemType.setLocalNamespace(NAMESPACE);
- itemType.setIsQueryable(false);
- itemType.setQueryName("cmis:item");
- itemType.setId(ITEM_TYPE_ID);
- itemType.setTypeMutability(typeMutability);
-
- addBasePropertyDefinitions(itemType);
-
- // not supported - don't expose it
- // addTypeInteral(itemType);
-
- // secondary type
- SecondaryTypeDefinitionImpl secondaryType = new SecondaryTypeDefinitionImpl();
- secondaryType.setBaseTypeId(BaseTypeId.CMIS_ITEM);
- secondaryType.setIsControllableAcl(false);
- secondaryType.setIsControllablePolicy(false);
- secondaryType.setIsCreatable(true);
- secondaryType.setDescription("Secondary");
- secondaryType.setDisplayName("Secondary");
- secondaryType.setIsFileable(false);
- secondaryType.setIsIncludedInSupertypeQuery(true);
- secondaryType.setLocalName("Secondary");
- secondaryType.setLocalNamespace(NAMESPACE);
- secondaryType.setIsQueryable(false);
- secondaryType.setQueryName("cmis:secondary");
- secondaryType.setId(SECONDARY_TYPE_ID);
- secondaryType.setTypeMutability(typeMutability);
-
- addBasePropertyDefinitions(secondaryType);
-
- // not supported - don't expose it
- // addTypeInteral(secondaryType);
- }
-
- private static void addBasePropertyDefinitions(AbstractTypeDefinition type) {
- type.addPropertyDefinition(createPropDef(PropertyIds.BASE_TYPE_ID, "Base Type Id", "Base Type Id",
- PropertyType.ID, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.OBJECT_ID, "Object Id", "Object Id", PropertyType.ID,
- Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.OBJECT_TYPE_ID, "Type Id", "Type Id", PropertyType.ID,
- Cardinality.SINGLE, Updatability.ONCREATE, false, true));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.NAME, "Name", "Name", PropertyType.STRING,
- Cardinality.SINGLE, Updatability.READWRITE, false, true));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.DESCRIPTION, "Description", "Description",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CREATED_BY, "Created By", "Created By",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CREATION_DATE, "Creation Date", "Creation Date",
- PropertyType.DATETIME, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.LAST_MODIFIED_BY, "Last Modified By", "Last Modified By",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.LAST_MODIFICATION_DATE, "Last Modification Date",
- "Last Modification Date", PropertyType.DATETIME, Cardinality.SINGLE, Updatability.READONLY, false,
- false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CHANGE_TOKEN, "Change Token", "Change Token",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, "Secondary Type Ids",
- "Secondary Type Ids", PropertyType.ID, Cardinality.MULTI, Updatability.READONLY, false, false));
- }
-
- private static void addFolderPropertyDefinitions(FolderTypeDefinitionImpl type) {
- type.addPropertyDefinition(createPropDef(PropertyIds.PARENT_ID, "Parent Id", "Parent Id", PropertyType.ID,
- Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS,
- "Allowed Child Object Type Ids", "Allowed Child Object Type Ids", PropertyType.ID, Cardinality.MULTI,
- Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.PATH, "Path", "Path", PropertyType.STRING,
- Cardinality.SINGLE, Updatability.READONLY, false, false));
- }
-
- private static void addDocumentPropertyDefinitions(DocumentTypeDefinitionImpl type) {
- type.addPropertyDefinition(createPropDef(PropertyIds.IS_IMMUTABLE, "Is Immutable", "Is Immutable",
- PropertyType.BOOLEAN, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.IS_LATEST_VERSION, "Is Latest Version",
- "Is Latest Version", PropertyType.BOOLEAN, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.IS_MAJOR_VERSION, "Is Major Version", "Is Major Version",
- PropertyType.BOOLEAN, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.IS_LATEST_MAJOR_VERSION, "Is Latest Major Version",
- "Is Latest Major Version", PropertyType.BOOLEAN, Cardinality.SINGLE, Updatability.READONLY, false,
- false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.VERSION_LABEL, "Version Label", "Version Label",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, true));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.VERSION_SERIES_ID, "Version Series Id",
- "Version Series Id", PropertyType.ID, Cardinality.SINGLE, Updatability.READONLY, false, true));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT,
- "Is Verison Series Checked Out", "Is Verison Series Checked Out", PropertyType.BOOLEAN,
- Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.VERSION_SERIES_CHECKED_OUT_ID,
- "Version Series Checked Out Id", "Version Series Checked Out Id", PropertyType.ID, Cardinality.SINGLE,
- Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.VERSION_SERIES_CHECKED_OUT_BY,
- "Version Series Checked Out By", "Version Series Checked Out By", PropertyType.STRING,
- Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CHECKIN_COMMENT, "Checkin Comment", "Checkin Comment",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CONTENT_STREAM_LENGTH, "Content Stream Length",
- "Content Stream Length", PropertyType.INTEGER, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CONTENT_STREAM_MIME_TYPE, "MIME Type", "MIME Type",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CONTENT_STREAM_FILE_NAME, "Filename", "Filename",
- PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
-
- type.addPropertyDefinition(createPropDef(PropertyIds.CONTENT_STREAM_ID, "Content Stream Id",
- "Content Stream Id", PropertyType.ID, Cardinality.SINGLE, Updatability.READONLY, false, false));
- }
-
- /**
- * Creates a property definition object.
- */
- private static PropertyDefinition<?> createPropDef(String id, String displayName, String description,
- PropertyType datatype, Cardinality cardinality, Updatability updateability, boolean inherited,
- boolean required) {
- AbstractPropertyDefinition<?> result = null;
-
- switch (datatype) {
- case BOOLEAN:
- result = new PropertyBooleanDefinitionImpl();
- break;
- case DATETIME:
- result = new PropertyDateTimeDefinitionImpl();
- break;
- case DECIMAL:
- result = new PropertyDecimalDefinitionImpl();
- break;
- case HTML:
- result = new PropertyHtmlDefinitionImpl();
- break;
- case ID:
- result = new PropertyIdDefinitionImpl();
- break;
- case INTEGER:
- result = new PropertyIntegerDefinitionImpl();
- break;
- case STRING:
- result = new PropertyStringDefinitionImpl();
- break;
- case URI:
- result = new PropertyUriDefinitionImpl();
- break;
- default:
- throw new RuntimeException("Unknown datatype! Spec change?");
- }
-
- result.setId(id);
- result.setLocalName(id);
- result.setDisplayName(displayName);
- result.setDescription(description);
- result.setPropertyType(datatype);
- result.setCardinality(cardinality);
- result.setUpdatability(updateability);
- result.setIsInherited(inherited);
- result.setIsRequired(required);
- result.setIsQueryable(false);
- result.setIsOrderable(false);
- result.setQueryName(id);
-
- return result;
+ try {
+ // folder type
+ addTypeInteral(tdf.createBaseFolderTypeDefinition(cmisVersion));
+
+ // document type
+ addTypeInteral(tdf.createBaseDocumentTypeDefinition(cmisVersion));
+
+ // relationship types
+ // not supported - don't expose it
+ // addTypeInteral(tdf.createBaseRelationshipTypeDefinition(cmisVersion));
+
+ // policy type
+ // not supported - don't expose it
+ // addTypeInteral(tdf.createBasePolicyTypeDefinition(cmisVersion));
+
+ // item type
+ // not supported - don't expose it
+ // addTypeInteral(tdf.createBaseItemTypeDefinition(cmisVersion));
+
+ // secondary type
+ // not supported - don't expose it
+ // addTypeInteral(tdf.createBaseSecondaryTypeDefinition(cmisVersion));
+ } catch (Exception e) {
+ throw new CmisRuntimeException("Cannot set up type defintions!", e);
+ }
}
/**
@@ -430,7 +155,7 @@ public class TypeManager {
/**
* Adds a type to collection.
*/
- private void addTypeInteral(AbstractTypeDefinition type) {
+ private void addTypeInteral(MutableTypeDefinition type) {
if (type == null) {
return;
}