chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1058588 [1/2] - in /incubator/chemistry/opencmis-cmis11/trunk: chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/ chemistry-opencmis-client/chemistry-opencmis-clie...
Date Thu, 13 Jan 2011 14:47:40 GMT
Author: fmui
Date: Thu Jan 13 14:47:39 2011
New Revision: 1058588

URL: http://svn.apache.org/viewvc?rev=1058588&view=rev
Log:
implemented current CMIS 1.1 schema draft

Added:
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java   (with props)
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/NewTypeSettableAttributes.java   (with props)
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java   (with props)
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java   (with props)
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/NewTypeSettableAttributesImpl.java   (with props)
Modified:
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/RepositoryServiceImpl.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/RepositoryService.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Messaging.xsd
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService.java
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/RepositoryServiceImpl.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/RepositoryServiceImpl.java Thu Jan 13 14:47:39 2011
@@ -30,6 +30,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
 
 /**
@@ -174,4 +175,32 @@ public class RepositoryServiceImpl imple
             addToTypeCache(cache, repositoryId, container.getChildren());
         }
     }
+
+    public void createTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        CmisSpi spi = CmisBindingsHelper.getSPI(session);
+        spi.getRepositoryService().createTypeDefinition(repositoryId, type, extension);
+
+        if ((type != null) && (type.getValue() != null)) {
+            TypeDefinitionCache cache = CmisBindingsHelper.getTypeDefinitionCache(session);
+            cache.remove(repositoryId, type.getValue().getId());
+        }
+    }
+
+    public void updateTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        CmisSpi spi = CmisBindingsHelper.getSPI(session);
+        spi.getRepositoryService().updateTypeDefinition(repositoryId, type, extension);
+
+        if ((type != null) && (type.getValue() != null)) {
+            TypeDefinitionCache cache = CmisBindingsHelper.getTypeDefinitionCache(session);
+            cache.remove(repositoryId, type.getValue().getId());
+        }
+    }
+
+    public void deleteTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        CmisSpi spi = CmisBindingsHelper.getSPI(session);
+        spi.getRepositoryService().deleteTypeDefinition(repositoryId, typeId, extension);
+
+        TypeDefinitionCache cache = CmisBindingsHelper.getTypeDefinitionCache(session);
+        cache.remove(repositoryId, typeId);
+    }
 }

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java Thu Jan 13 14:47:39 2011
@@ -22,7 +22,6 @@ import static org.apache.chemistry.openc
 
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.Serializable;
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.HashMap;

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java Thu Jan 13 14:47:39 2011
@@ -36,6 +36,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisProperty;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertyString;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
 
 /**
  * Writes a CMIS Atom entry to an output stream.
@@ -49,6 +50,7 @@ public class AtomEntryWriter implements 
     private static final int BUFFER_SIZE = 64 * 1024;
 
     private CmisObjectType object;
+    private CmisTypeDefinitionType typeDef;
     private InputStream stream;
     private String mediaType;
 
@@ -77,6 +79,17 @@ public class AtomEntryWriter implements 
     }
 
     /**
+     * Constructor.
+     */
+    public AtomEntryWriter(CmisTypeDefinitionType typeDef) {
+        if (typeDef == null) {
+            throw new CmisInvalidArgumentException("Type defintion must not be null!");
+        }
+
+        this.typeDef = typeDef;
+    }
+
+    /**
      * Writes the entry to an output stream.
      */
     public void write(OutputStream out) throws Exception {
@@ -126,8 +139,13 @@ public class AtomEntryWriter implements 
             writer.writeEndElement();
         }
 
-        // object
-        JaxBHelper.marshal(JaxBHelper.CMIS_EXTRA_OBJECT_FACTORY.createObject(object), writer, true);
+        if (object != null) {
+            // object
+            JaxBHelper.marshal(JaxBHelper.CMIS_EXTRA_OBJECT_FACTORY.createObject(object), writer, true);
+        } else if (typeDef != null) {
+            // type definition
+            JaxBHelper.marshal(JaxBHelper.CMIS_EXTRA_OBJECT_FACTORY.createTypeDefinition(typeDef), writer, true);
+        }
 
         // end entry
         writer.writeEndElement();
@@ -143,13 +161,18 @@ public class AtomEntryWriter implements 
     private String getTitle() {
         String result = "";
 
-        for (CmisProperty property : object.getProperties().getProperty()) {
-            if (PropertyIds.NAME.equals(property.getPropertyDefinitionId()) && (property instanceof CmisPropertyString)) {
-                List<String> values = ((CmisPropertyString) property).getValue();
-                if (!values.isEmpty()) {
-                    return values.get(0);
+        if (object != null) {
+            for (CmisProperty property : object.getProperties().getProperty()) {
+                if (PropertyIds.NAME.equals(property.getPropertyDefinitionId())
+                        && (property instanceof CmisPropertyString)) {
+                    List<String> values = ((CmisPropertyString) property).getValue();
+                    if (!values.isEmpty()) {
+                        return values.get(0);
+                    }
                 }
             }
+        } else if (typeDef != null) {
+            return typeDef.getDisplayName();
         }
 
         return result;

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java Thu Jan 13 14:47:39 2011
@@ -20,9 +20,12 @@ package org.apache.chemistry.opencmis.cl
 
 import static org.apache.chemistry.opencmis.commons.impl.Converter.convert;
 
+import java.io.OutputStream;
 import java.math.BigInteger;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.chemistry.opencmis.client.bindings.spi.Session;
 import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement;
@@ -34,12 +37,15 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
 import org.apache.chemistry.opencmis.commons.impl.Constants;
 import org.apache.chemistry.opencmis.commons.impl.UrlBuilder;
 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.jaxb.CmisTypeDefinitionType;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
 
 /**
@@ -177,6 +183,133 @@ public class RepositoryServiceImpl exten
         return result;
     }
 
+    public void createTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        if ((type == null) || (type.getValue() == null)) {
+            throw new CmisInvalidArgumentException("Type definition must be set!");
+        }
+        if (type.getValue().getParentTypeId() == null) {
+            throw new CmisInvalidArgumentException("Parent type id must be set!");
+        }
+
+        // find the link
+        Map<String, Object> parameters = new HashMap<String, Object>();
+        parameters.put(Constants.PARAM_ID, type.getValue().getParentTypeId());
+
+        String link = loadTemplateLink(repositoryId, Constants.TEMPLATE_TYPE_BY_ID, parameters);
+        if (link == null) {
+            throw new CmisObjectNotFoundException("Unknown repository or parent type!");
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+
+        // set up type and writer
+        CmisTypeDefinitionType cmisTypeDef = convert(type.getValue());
+        final AtomEntryWriter entryWriter = new AtomEntryWriter(cmisTypeDef);
+
+        // post
+        HttpUtils.Response resp = post(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
+            public void write(OutputStream out) throws Exception {
+                entryWriter.write(out);
+            }
+        });
+
+        // read new type definition
+        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);
+        type.setValue(null);
+
+        // we expect a CMIS entry
+        if (entry.getId() == null) {
+            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
+        }
+
+        lockTypeLinks();
+        try {
+            // clean up cache
+            removeTypeLinks(repositoryId, entry.getId());
+
+            // walk through the entry
+            for (AtomElement element : entry.getElements()) {
+                if (element.getObject() instanceof AtomLink) {
+                    addTypeLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                } else if (element.getObject() instanceof CmisTypeDefinitionType) {
+                    type.setValue(convert((CmisTypeDefinitionType) element.getObject()));
+                }
+            }
+        } finally {
+            unlockTypeLinks();
+        }
+    }
+
+    public void updateTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        if ((type == null) || (type.getValue() == null)) {
+            throw new CmisInvalidArgumentException("Type definition must be set!");
+        }
+        if (type.getValue().getId() == null) {
+            throw new CmisInvalidArgumentException("Type id must be set!");
+        }
+
+        // find the link
+        Map<String, Object> parameters = new HashMap<String, Object>();
+        parameters.put(Constants.PARAM_ID, type.getValue().getId());
+
+        String link = loadTemplateLink(repositoryId, Constants.TEMPLATE_TYPE_BY_ID, parameters);
+        if (link == null) {
+            throw new CmisObjectNotFoundException("Unknown repository or type!");
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+
+        // set up type and writer
+        CmisTypeDefinitionType cmisTypeDef = convert(type.getValue());
+        final AtomEntryWriter entryWriter = new AtomEntryWriter(cmisTypeDef);
+
+        // post
+        HttpUtils.Response resp = put(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
+            public void write(OutputStream out) throws Exception {
+                entryWriter.write(out);
+            }
+        });
+
+        // read new type definition
+        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);
+        type.setValue(null);
+
+        // we expect a CMIS entry
+        if (entry.getId() == null) {
+            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
+        }
+
+        lockTypeLinks();
+        try {
+            // clean up cache
+            removeTypeLinks(repositoryId, entry.getId());
+
+            // walk through the entry
+            for (AtomElement element : entry.getElements()) {
+                if (element.getObject() instanceof AtomLink) {
+                    addTypeLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                } else if (element.getObject() instanceof CmisTypeDefinitionType) {
+                    type.setValue(convert((CmisTypeDefinitionType) element.getObject()));
+                }
+            }
+        } finally {
+            unlockTypeLinks();
+        }
+    }
+
+    public void deleteTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        Map<String, Object> parameters = new HashMap<String, Object>();
+        parameters.put(Constants.PARAM_ID, typeId);
+
+        String link = loadTemplateLink(repositoryId, Constants.TEMPLATE_TYPE_BY_ID, parameters);
+        if (link == null) {
+            throw new CmisObjectNotFoundException("Unknown repository!");
+        }
+
+        // delete
+        delete(new UrlBuilder(link));
+    }
+
     /**
      * Adds type descendants level recursively.
      */

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java Thu Jan 13 14:47:39 2011
@@ -1,4 +1,5 @@
 package org.apache.chemistry.opencmis.client.bindings.spi.local;
+
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,7 +21,6 @@ package org.apache.chemistry.opencmis.cl
  *
  */
 
-
 import java.math.BigInteger;
 import java.util.List;
 
@@ -32,6 +32,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
 import org.apache.chemistry.opencmis.commons.server.CmisService;
 import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
 
 /**
@@ -100,4 +101,33 @@ public class RepositoryServiceImpl exten
         }
     }
 
+    public void createTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            service.createTypeDefinition(repositoryId, type, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public void updateTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            service.updateTypeDefinition(repositoryId, type, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public void deleteTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            service.deleteTypeDefinition(repositoryId, typeId, extension);
+        } finally {
+            service.close();
+        }
+    }
 }

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java Thu Jan 13 14:47:39 2011
@@ -19,7 +19,9 @@
 package org.apache.chemistry.opencmis.client.bindings.spi.webservices;
 
 import static org.apache.chemistry.opencmis.commons.impl.Converter.convert;
+import static org.apache.chemistry.opencmis.commons.impl.Converter.convertExtensionHolder;
 import static org.apache.chemistry.opencmis.commons.impl.Converter.convertTypeContainerList;
+import static org.apache.chemistry.opencmis.commons.impl.Converter.setExtensionValues;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
@@ -33,9 +35,12 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisRepositoryEntryType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisRepositoryInfoType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.RepositoryServicePort;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
 
 /**
@@ -173,4 +178,64 @@ public class RepositoryServiceImpl exten
         }
     }
 
+    public void createTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            javax.xml.ws.Holder<CmisTypeDefinitionType> typeDefHolder = null;
+            if (type != null) {
+                typeDefHolder = new javax.xml.ws.Holder<CmisTypeDefinitionType>();
+                typeDefHolder.value = convert(type.getValue());
+            }
+
+            port.createTypeDefinition(repositoryId, typeDefHolder, convert(extension));
+
+            if (type != null) {
+                type.setValue(convert(typeDefHolder.value));
+            }
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    public void updateTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            javax.xml.ws.Holder<CmisTypeDefinitionType> typeDefHolder = null;
+            if (type != null) {
+                typeDefHolder = new javax.xml.ws.Holder<CmisTypeDefinitionType>();
+                typeDefHolder.value = convert(type.getValue());
+            }
+
+            port.updateTypeDefinition(repositoryId, typeDefHolder, convert(extension));
+
+            if (type != null) {
+                type.setValue(convert(typeDefHolder.value));
+            }
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    public void deleteTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.deleteTypeDefinition(repositoryId, typeId, portExtension);
+
+            setExtensionValues(portExtension, extension);
+
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
 }

Added: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java?rev=1058588&view=auto
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java (added)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java Thu Jan 13 14:47:39 2011
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.data;
+
+public interface Feature extends ExtensionsData {
+    
+    String getId();
+
+    String getUrl();
+
+    String getCommonName();
+
+    String getVersionLabel();
+
+    String getDescription();
+}

Propchange: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/Feature.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/NewTypeSettableAttributes.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/NewTypeSettableAttributes.java?rev=1058588&view=auto
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/NewTypeSettableAttributes.java (added)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/NewTypeSettableAttributes.java Thu Jan 13 14:47:39 2011
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.data;
+
+public interface NewTypeSettableAttributes extends ExtensionsData {
+
+    boolean canSetId();
+
+    boolean canSetLocalName();
+
+    boolean canSetLocalNamespace();
+
+    boolean canSetDisplayName();
+
+    boolean canSetQueryName();
+
+    boolean canSetDescription();
+
+    boolean canSetCreatable();
+
+    boolean canSetFileable();
+
+    boolean canSetQueryable();
+
+    boolean canSetFulltextIndexed();
+
+    boolean canSetIncludedInSupertypeQuery();
+
+    boolean canSetControllablePolicy();
+
+    boolean canSetControllableACL();
+}

Propchange: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/NewTypeSettableAttributes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/RepositoryCapabilities.java Thu Jan 13 14:47:39 2011
@@ -19,6 +19,7 @@
 package org.apache.chemistry.opencmis.commons.data;
 
 import java.io.Serializable;
+import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityChanges;
@@ -69,4 +70,11 @@ public interface RepositoryCapabilities 
 
     CapabilityAcl getAclCapability();
 
+    // Type Mutability
+
+    NewTypeSettableAttributes getNewTypeSettableAttributes();
+
+    // Feature
+
+    List<Feature> getFeatures();
 }

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/definitions/TypeDefinition.java Thu Jan 13 14:47:39 2011
@@ -23,6 +23,7 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.commons.enums.TypeMutability;
 
 /**
  * Base type definition interface.
@@ -152,6 +153,8 @@ public interface TypeDefinition extends 
      */
     Boolean isControllableAcl();
 
+    TypeMutability getTypeMutability();
+
     /**
      * Returns the property definitions of this type.
      * 

Added: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java?rev=1058588&view=auto
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java (added)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java Thu Jan 13 14:47:39 2011
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.enums;
+
+public enum TypeMutability {
+
+    NONE("none"), CREATEONLY("createonly"), READWRITE("readwrite");
+    private final String value;
+
+    TypeMutability(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static TypeMutability fromValue(String v) {
+        for (TypeMutability c : TypeMutability.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+}

Propchange: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/TypeMutability.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/RepositoryService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/RepositoryService.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/RepositoryService.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/RepositoryService.java Thu Jan 13 14:47:39 2011
@@ -113,4 +113,10 @@ public interface RepositoryService {
      *            typeId of an object type specified in the repository
      */
     TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension);
+
+    void createTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension);
+
+    void updateTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension);
+
+    void deleteTypeDefinition(String repositoryId, String typeId, ExtensionsData extension);
 }

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java Thu Jan 13 14:47:39 2011
@@ -49,6 +49,8 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.ContentStream;
 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
+import org.apache.chemistry.opencmis.commons.data.Feature;
+import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
 import org.apache.chemistry.opencmis.commons.data.ObjectData;
 import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
 import org.apache.chemistry.opencmis.commons.data.ObjectInFolderData;
@@ -103,6 +105,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.enums.DateTimeResolution;
 import org.apache.chemistry.opencmis.commons.enums.PropertyType;
 import org.apache.chemistry.opencmis.commons.enums.SupportedPermissions;
+import org.apache.chemistry.opencmis.commons.enums.TypeMutability;
 import org.apache.chemistry.opencmis.commons.enums.Updatability;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractPropertyData;
@@ -120,7 +123,9 @@ import org.apache.chemistry.opencmis.com
 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;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.FeatureImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.NewTypeSettableAttributesImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectInFolderContainerImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectInFolderDataImpl;
@@ -170,8 +175,10 @@ 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.CmisExtensionFeatureType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisListOfIdsType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisNewTypeSettableAttributes;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectInFolderContainerType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectInFolderListType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectInFolderType;
@@ -219,6 +226,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityJoin;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityQuery;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityRendition;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCapabilityTypeMutability;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumCardinality;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumContentStreamAllowed;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumDateTimeResolution;
@@ -313,6 +321,14 @@ public final class Converter {
         result.setSupportsMultifiling(capabilities.isCapabilityMultifiling());
         result.setSupportsUnfiling(capabilities.isCapabilityUnfiling());
         result.setSupportsVersionSpecificFiling(capabilities.isCapabilityVersionSpecificFiling());
+        result.setNewTypeSettableAttributes(convert(capabilities.getCapabilitySettableAttributesForNewTypes()));
+        if (capabilities.getExtendedFeatures() != null) {
+            List<Feature> features = new ArrayList<Feature>();
+            for (CmisExtensionFeatureType feature : capabilities.getExtendedFeatures()) {
+                features.add(convert(feature));
+            }
+            result.setFeatures(features);
+        }
 
         // handle extensions
         convertExtension(capabilities, result);
@@ -321,6 +337,57 @@ public final class Converter {
     }
 
     /**
+     * Converts SettableAttributesForNewTypes.
+     */
+    public static NewTypeSettableAttributes convert(CmisNewTypeSettableAttributes settableAttributes) {
+        if (settableAttributes == null) {
+            return null;
+        }
+
+        NewTypeSettableAttributesImpl result = new NewTypeSettableAttributesImpl();
+        result.setCanSetId(settableAttributes.isId());
+        result.setCanSetLocalName(settableAttributes.isLocalName());
+        result.setCanSetLocalNamespace(settableAttributes.isLocalNamespace());
+        result.setCanSetDisplayName(settableAttributes.isDisplayName());
+        result.setCanSetQueryName(settableAttributes.isQueryName());
+        result.setCanSetDescription(settableAttributes.isDescription());
+        result.setCanSetCreatable(settableAttributes.isCreatable());
+        result.setCanSetFileable(settableAttributes.isFileable());
+        result.setCanSetQueryable(settableAttributes.isQueryable());
+        result.setCanSetFulltextIndexed(settableAttributes.isFulltextIndexed());
+        result.setCanSetIncludedInSupertypeQuery(settableAttributes.isIncludedInSupertypeQuery());
+        result.setCanSetControllablePolicy(settableAttributes.isControllablePolicy());
+        result.setCanSetControllableACL(settableAttributes.isControllableACL());
+
+        // handle extensions
+        convertExtension(settableAttributes, result);
+
+        return result;
+    }
+
+    /**
+     * Converts a feature.
+     */
+    public static Feature convert(CmisExtensionFeatureType feature) {
+        if (feature == null) {
+            return null;
+        }
+
+        FeatureImpl result = new FeatureImpl();
+
+        result.setId(feature.getId());
+        result.setUrl(feature.getUrl());
+        result.setCommonName(feature.getCommonName());
+        result.setVersionLabel(feature.getVersionLabel());
+        result.setDescription(feature.getDescription());
+
+        // handle extensions
+        convertExtension(feature, result);
+
+        return result;
+    }
+
+    /**
      * Converts a ACL capability object.
      */
     public static AclCapabilities convert(CmisACLCapabilityType aclCapabilities) {
@@ -427,6 +494,12 @@ public final class Converter {
         result.setCapabilityRenditions(convert(EnumCapabilityRendition.class, capabilities.getRenditionsCapability()));
         result.setCapabilityUnfiling(capabilities.isUnfilingSupported());
         result.setCapabilityVersionSpecificFiling(capabilities.isVersionSpecificFilingSupported());
+        result.setCapabilitySettableAttributesForNewTypes(convert(capabilities.getNewTypeSettableAttributes()));
+        if (capabilities.getFeatures() != null) {
+            for (Feature feature : capabilities.getFeatures()) {
+                result.getExtendedFeatures().add(convert(feature));
+            }
+        }
 
         // handle extensions
         convertExtension(capabilities, result);
@@ -435,6 +508,57 @@ public final class Converter {
     }
 
     /**
+     * Converts SettableAttributesForNewTypes.
+     */
+    public static CmisNewTypeSettableAttributes convert(NewTypeSettableAttributes settableAttributes) {
+        if (settableAttributes == null) {
+            return null;
+        }
+
+        CmisNewTypeSettableAttributes result = new CmisNewTypeSettableAttributes();
+        result.setId(settableAttributes.canSetId());
+        result.setLocalName(settableAttributes.canSetLocalName());
+        result.setLocalNamespace(settableAttributes.canSetLocalNamespace());
+        result.setDisplayName(settableAttributes.canSetDisplayName());
+        result.setQueryName(settableAttributes.canSetQueryName());
+        result.setDescription(settableAttributes.canSetDescription());
+        result.setCreatable(settableAttributes.canSetCreatable());
+        result.setFileable(settableAttributes.canSetFileable());
+        result.setQueryable(settableAttributes.canSetQueryable());
+        result.setFulltextIndexed(settableAttributes.canSetFulltextIndexed());
+        result.setIncludedInSupertypeQuery(settableAttributes.canSetIncludedInSupertypeQuery());
+        result.setControllablePolicy(settableAttributes.canSetControllablePolicy());
+        result.setControllableACL(settableAttributes.canSetControllableACL());
+
+        // handle extensions
+        convertExtension(settableAttributes, result);
+
+        return result;
+    }
+
+    /**
+     * Converts a feature.
+     */
+    public static CmisExtensionFeatureType convert(Feature feature) {
+        if (feature == null) {
+            return null;
+        }
+
+        CmisExtensionFeatureType result = new CmisExtensionFeatureType();
+
+        result.setId(feature.getId());
+        result.setUrl(feature.getUrl());
+        result.setCommonName(feature.getCommonName());
+        result.setVersionLabel(feature.getVersionLabel());
+        result.setDescription(feature.getDescription());
+
+        // handle extensions
+        convertExtension(feature, result);
+
+        return result;
+    }
+
+    /**
      * Converts a ACL capability object.
      */
     public static CmisACLCapabilityType convert(AclCapabilities aclCapabilities) {
@@ -536,6 +660,7 @@ public final class Converter {
         result.setLocalNamespace(typeDefinition.getLocalNamespace());
         result.setParentTypeId(typeDefinition.getParentId());
         result.setQueryName(typeDefinition.getQueryName());
+        result.setTypeMutability(convert(TypeMutability.class, typeDefinition.getTypeMutability()));
 
         for (CmisPropertyDefinitionType propertyDefinition : typeDefinition.getPropertyDefinition()) {
             result.addPropertyDefinition(convert(propertyDefinition));
@@ -745,6 +870,7 @@ public final class Converter {
         result.setParentId(typeDefinition.getParentTypeId());
         result.setQueryable(convertBoolean(typeDefinition.isQueryable(), false));
         result.setQueryName(typeDefinition.getQueryName());
+        result.setTypeMutability(convert(EnumCapabilityTypeMutability.class, typeDefinition.getTypeMutability()));
 
         if (typeDefinition.getPropertyDefinitions() != null) {
             for (PropertyDefinition<?> propDef : typeDefinition.getPropertyDefinitions().values()) {

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java Thu Jan 13 14:47:39 2011
@@ -24,6 +24,7 @@ import java.util.Map;
 import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
+import org.apache.chemistry.opencmis.commons.enums.TypeMutability;
 
 /**
  * Abstract type definition data implementation.
@@ -50,6 +51,7 @@ public abstract class AbstractTypeDefini
     private Boolean fIsFulltextIndexed;
     private Boolean fIsControllableACL;
     private Boolean fIsControllablePolicy;
+    private TypeMutability typeMutability;
     private Map<String, PropertyDefinition<?>> fPropertyDefinitions;
 
     public void initialize(TypeDefinition typeDefinition) {
@@ -68,6 +70,7 @@ public abstract class AbstractTypeDefini
         setIsFulltextIndexed(typeDefinition.isFulltextIndexed());
         setIsControllableAcl(typeDefinition.isControllableAcl());
         setIsControllablePolicy(typeDefinition.isControllablePolicy());
+        setTypeMutability(typeDefinition.getTypeMutability());
         setPropertyDefinitions(typeDefinition.getPropertyDefinitions());
     }
 
@@ -279,6 +282,14 @@ public abstract class AbstractTypeDefini
         fIsControllablePolicy = isControllablePolicy;
     }
 
+    public TypeMutability getTypeMutability() {
+        return typeMutability;
+    }
+
+    public void setTypeMutability(TypeMutability typeMutability) {
+        this.typeMutability = typeMutability;
+    }
+
     /*
      * (non-Javadoc)
      * 

Added: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java?rev=1058588&view=auto
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java (added)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java Thu Jan 13 14:47:39 2011
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.impl.dataobjects;
+
+import org.apache.chemistry.opencmis.commons.data.Feature;
+
+public class FeatureImpl extends AbstractExtensionData implements Feature {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+    private String url;
+    private String commonName;
+    private String versionLabel;
+    private String description;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getCommonName() {
+        return commonName;
+    }
+
+    public void setCommonName(String commonName) {
+        this.commonName = commonName;
+    }
+
+    public String getVersionLabel() {
+        return versionLabel;
+    }
+
+    public void setVersionLabel(String versionLabel) {
+        this.versionLabel = versionLabel;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

Propchange: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/FeatureImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/NewTypeSettableAttributesImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/NewTypeSettableAttributesImpl.java?rev=1058588&view=auto
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/NewTypeSettableAttributesImpl.java (added)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/NewTypeSettableAttributesImpl.java Thu Jan 13 14:47:39 2011
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.impl.dataobjects;
+
+import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
+
+public class NewTypeSettableAttributesImpl extends AbstractExtensionData implements NewTypeSettableAttributes {
+
+    private static final long serialVersionUID = 1L;
+
+    private boolean id;
+    private boolean localName;
+    private boolean localNamespace;
+    private boolean displayName;
+    private boolean queryName;
+    private boolean description;
+    private boolean creatable;
+    private boolean fileable;
+    private boolean queryable;
+    private boolean fulltextIndexed;
+    private boolean includedInSupertypeQuery;
+    private boolean controllablePolicy;
+    private boolean controllableACL;
+
+    public boolean canSetId() {
+        return id;
+    }
+
+    public void setCanSetId(boolean id) {
+        this.id = id;
+    }
+
+    public boolean canSetLocalName() {
+        return localName;
+    }
+
+    public void setCanSetLocalName(boolean localName) {
+        this.localName = localName;
+    }
+
+    public boolean canSetLocalNamespace() {
+        return localNamespace;
+    }
+
+    public void setCanSetLocalNamespace(boolean localNamespace) {
+        this.localNamespace = localNamespace;
+    }
+
+    public boolean canSetDisplayName() {
+        return displayName;
+    }
+
+    public void setCanSetDisplayName(boolean displayName) {
+        this.displayName = displayName;
+    }
+
+    public boolean canSetQueryName() {
+        return queryName;
+    }
+
+    public void setCanSetQueryName(boolean queryName) {
+        this.queryName = queryName;
+    }
+
+    public boolean canSetDescription() {
+        return description;
+    }
+
+    public void setCanSetDescription(boolean description) {
+        this.description = description;
+    }
+
+    public boolean canSetCreatable() {
+        return creatable;
+    }
+
+    public void setCanSetCreatable(boolean creatable) {
+        this.creatable = creatable;
+    }
+
+    public boolean canSetFileable() {
+        return fileable;
+    }
+
+    public void setCanSetFileable(boolean fileable) {
+        this.fileable = fileable;
+    }
+
+    public boolean canSetQueryable() {
+        return queryable;
+    }
+
+    public void setCanSetQueryable(boolean queryable) {
+        this.queryable = queryable;
+    }
+
+    public boolean canSetFulltextIndexed() {
+        return fulltextIndexed;
+    }
+
+    public void setCanSetFulltextIndexed(boolean fulltextIndexed) {
+        this.fulltextIndexed = fulltextIndexed;
+    }
+
+    public boolean canSetIncludedInSupertypeQuery() {
+        return includedInSupertypeQuery;
+    }
+
+    public void setCanSetIncludedInSupertypeQuery(boolean includedInSupertypeQuery) {
+        this.includedInSupertypeQuery = includedInSupertypeQuery;
+    }
+
+    public boolean canSetControllablePolicy() {
+        return controllablePolicy;
+    }
+
+    public void setCanSetControllablePolicy(boolean controllablePolicy) {
+        this.controllablePolicy = controllablePolicy;
+    }
+
+    public boolean canSetControllableACL() {
+        return controllableACL;
+    }
+
+    public void setCanSetControllableACL(boolean controllableACL) {
+        this.controllableACL = controllableACL;
+    }
+}

Propchange: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/NewTypeSettableAttributesImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java Thu Jan 13 14:47:39 2011
@@ -18,6 +18,10 @@
  */
 package org.apache.chemistry.opencmis.commons.impl.dataobjects;
 
+import java.util.List;
+
+import org.apache.chemistry.opencmis.commons.data.Feature;
+import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
 import org.apache.chemistry.opencmis.commons.data.RepositoryCapabilities;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityChanges;
@@ -48,6 +52,8 @@ public class RepositoryCapabilitiesImpl 
     private Boolean fSupportsMultifiling;
     private Boolean fSupportsUnfiling;
     private Boolean fSupportsVersionSpecificFiling;
+    private List<Feature> features;
+    private NewTypeSettableAttributes newTypeSettableAttributes;
 
     /**
      * Constructor.
@@ -252,6 +258,22 @@ public class RepositoryCapabilitiesImpl 
         fSupportsVersionSpecificFiling = supportsVersionSpecificFiling;
     }
 
+    public List<Feature> getFeatures() {
+        return features;
+    }
+
+    public void setFeatures(List<Feature> features) {
+        this.features = features;
+    }
+
+    public NewTypeSettableAttributes getNewTypeSettableAttributes() {
+        return newTypeSettableAttributes;
+    }
+
+    public void setNewTypeSettableAttributes(NewTypeSettableAttributes newTypeSettableAttributes) {
+        this.newTypeSettableAttributes = newTypeSettableAttributes;
+    }
+
     /*
      * (non-Javadoc)
      * 

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java Thu Jan 13 14:47:39 2011
@@ -155,6 +155,18 @@ public abstract class AbstractCmisServic
      */
     public abstract TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension);
 
+    public void createTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        throw new CmisNotSupportedException("Not supported!");
+    }
+
+    public void updateTypeDefinition(String repositoryId, Holder<TypeDefinition> type, ExtensionsData extension) {
+        throw new CmisNotSupportedException("Not supported!");
+    }
+
+    public void deleteTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        throw new CmisNotSupportedException("Not supported!");
+    }
+
     // --- navigation service ---
 
     /**

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd Thu Jan 13 14:47:39 2011
@@ -1,18 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 	<!--
-		Licensed under the Apache License, Version 2.0 (the "License"); you
-		may not use this file except in compliance with the License. You may
-		obtain a copy of the License at
-
-		http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-		applicable law or agreed to in writing, software distributed under the
-		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-		CONDITIONS OF ANY KIND, either express or implied. See the License for
-		the specific language governing permissions and limitations under the
-		License.
+		$Revision: 169 $ $Date: 2010-01-25 10:34:39 -0800 (Mon, 25 Jan 2010) $
+		$Author: albertcbrown $ $HeadURL:
+		http://tools.oasis-open.org/version-control/svn/cmis/trunk/SchemaProject/schema/CMIS-Core.xsd
+		$
 	-->
-
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 	elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/ns/cmis/core/200908/"
 	xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml"
@@ -793,6 +785,10 @@
 				</xs:annotation>
 			</xs:element>
 
+			<!--  for type mutability (optional) -->
+			<xs:element name="typeMutability" type="cmis:enumCapabilityTypeMutability"
+				minOccurs="0" maxOccurs="1" />
+
 			<!-- flags -->
 			<xs:element name="creatable" type="xs:boolean" minOccurs="1"
 				maxOccurs="1" />
@@ -1004,6 +1000,18 @@
 				minOccurs="1" maxOccurs="1" />
 			<xs:element name="capabilityJoin" type="cmis:enumCapabilityJoin"
 				minOccurs="1" maxOccurs="1" />
+			
+			<!-- type mutability related -->
+			<xs:element name="capabilityCreatablePropertiesList"
+				type="cmis:cmisCreateablePropertiesListType" maxOccurs="1" minOccurs="0">
+			</xs:element>
+			<xs:element name="capabilitySettableAttributesForNewTypes"
+				type="cmis:cmisNewTypeSettableAttributes" maxOccurs="1" minOccurs="0">
+			</xs:element>
+
+			<xs:element name="extendedFeatures"
+				type="cmis:cmisExtensionFeatureType" maxOccurs="unbounded" minOccurs="0">
+			</xs:element>
 
 			<!-- extension -->
 			<xs:any namespace="##other" processContents="skip" minOccurs="0"
@@ -1264,5 +1272,73 @@
 			</xs:documentation>
 		</xs:annotation>
 	</xs:element>
+
+	<!-- new types for type mutability here -->
+
+	<xs:simpleType name="enumCapabilityTypeMutability">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="none" />
+			<xs:enumeration value="createonly" />
+			<xs:enumeration value="readwrite" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:complexType name="cmisCreateablePropertiesListType">
+		<xs:sequence maxOccurs="unbounded" minOccurs="0">
+			<xs:element name="canCreate"
+				type="cmis:enumPropertyType">
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	
+	<xs:complexType name="cmisNewTypeSettableAttributes">
+		<xs:sequence>
+			<xs:element name="id" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="localName" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="localNamespace" type="xs:boolean"
+				minOccurs="1" maxOccurs="1"/>
+			<xs:element name="displayName" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="queryName" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="description" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="creatable" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="fileable" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="queryable" type="xs:boolean" minOccurs="1"
+				maxOccurs="1" />
+			<xs:element name="fulltextIndexed" type="xs:boolean"
+				minOccurs="1" maxOccurs="1" />
+			<xs:element name="includedInSupertypeQuery" type="xs:boolean"
+				minOccurs="1" maxOccurs="1"/>
+			<xs:element name="controllablePolicy" type="xs:boolean"
+				minOccurs="1" maxOccurs="1" />
+			<xs:element name="controllableACL" type="xs:boolean"
+				minOccurs="1" maxOccurs="1" />
+		</xs:sequence>
+	</xs:complexType>
+
+	<!-- new types for feature extensions here -->
+
+	<xs:complexType name="cmisExtensionFeatureType">	
+	    <xs:sequence>
+		<!-- id is the only mandatory field - typically will be a URN-->
+		<xs:element minOccurs="1" maxOccurs="1" name="id" type="xs:anyURI" />
+		<!-- optional url for a site describing the extension -->
+		<xs:element minOccurs="0" maxOccurs="1" name="url" type="xs:anyURI" />
+		<!-- optional short name for standard i.e. FooStandard -->
+		<xs:element minOccurs="0" maxOccurs="1" name="commonName" type="xs:string" />
+		<!-- optional version label-->
+		<xs:element minOccurs="0" maxOccurs="1" name="versionLabel" type="xs:string" />
+		<xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string" />
+		<xs:any processContents="lax" namespace="##other" minOccurs="0" maxOccurs="unbounded" />
+	    </xs:sequence>
+	</xs:complexType> 
+
 </xs:schema>
-	<!-- EOF -->
\ No newline at end of file
+	<!-- EOF -->

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Messaging.xsd
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Messaging.xsd?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Messaging.xsd (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Messaging.xsd Thu Jan 13 14:47:39 2011
@@ -1,18 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 	<!--
-		Licensed under the Apache License, Version 2.0 (the "License"); you
-		may not use this file except in compliance with the License. You may
-		obtain a copy of the License at
-
-		http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-		applicable law or agreed to in writing, software distributed under the
-		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-		CONDITIONS OF ANY KIND, either express or implied. See the License for
-		the specific language governing permissions and limitations under the
-		License.
+		$Revision: 147 $
+		$Date: 2009-12-21 21:31:42 -0800 (Mon, 21 Dec 2009) $
+		$Author: albertcbrown $
+		$HeadURL: http://tools.oasis-open.org/version-control/svn/cmis/trunk/SchemaProject/schema/CMIS-Messaging.xsd $
 	-->
-
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 	targetNamespace="http://docs.oasis-open.org/ns/cmis/messaging/200908/"
 	xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
@@ -74,6 +66,8 @@
 		<xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
 	</xs:complexType>
 
+
+
 	<xs:complexType name="cmisTypeDefinitionListType">
 		<xs:sequence>
 			<xs:element name="types" type="cmis:cmisTypeDefinitionType"
@@ -352,6 +346,108 @@
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
+
+	<!-- createTypeDefinition Operation -->
+	<xs:element name="createTypeDefinition">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="repositoryId" type="xs:string"
+					minOccurs="1" maxOccurs="1" />
+				<xs:element name="type" type="cmis:cmisTypeDefinitionType"
+					minOccurs="1" maxOccurs="1" />
+				<xs:element name="extension" type="cmism:cmisExtensionType"
+					minOccurs="0" maxOccurs="1" nillable="true">
+					<xs:annotation>
+						<xs:documentation>
+							This is an extension element to hold any
+							repository or
+							vendor-specific extensions
+						</xs:documentation>
+					</xs:annotation>
+				</xs:element>
+
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="createTypeDefinitionResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="type" type="cmis:cmisTypeDefinitionType"
+					minOccurs="0" maxOccurs="1" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+	<!-- updateTypeDefinition Operation -->
+	<xs:element name="updateTypeDefinition">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="repositoryId" type="xs:string"
+					minOccurs="1" maxOccurs="1" />
+				<xs:element name="type" type="cmis:cmisTypeDefinitionType"
+					minOccurs="1" maxOccurs="1" />
+				<xs:element name="extension" type="cmism:cmisExtensionType"
+					minOccurs="0" maxOccurs="1" nillable="true">
+					<xs:annotation>
+						<xs:documentation>
+							This is an extension element to hold any
+							repository or
+							vendor-specific extensions
+						</xs:documentation>
+					</xs:annotation>
+				</xs:element>
+
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="updateTypeDefinitionResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="type" type="cmis:cmisTypeDefinitionType"
+					minOccurs="0" maxOccurs="1" />
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
+
+	<!-- deleteTypeDefinition Operation -->
+	<xs:element name="deleteTypeDefinition">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="repositoryId" type="xs:string"
+					minOccurs="1" maxOccurs="1" />
+				<xs:element name="TypeId" type="xs:string" minOccurs="1"
+					maxOccurs="1" />
+				<xs:element name="extension" type="cmism:cmisExtensionType"
+					minOccurs="0" maxOccurs="1" nillable="true">
+					<xs:annotation>
+						<xs:documentation>
+							This is an extension element to hold any
+							repository or
+							vendor-specific extensions
+						</xs:documentation>
+					</xs:annotation>
+				</xs:element>
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="deleteTypeDefinitionResponse">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="extension" type="cmism:cmisExtensionType"
+					minOccurs="0" maxOccurs="1" nillable="true">
+					<xs:annotation>
+						<xs:documentation>
+							This is an extension element to hold any
+							repository or
+							vendor-specific extensions
+						</xs:documentation>
+					</xs:annotation>
+				</xs:element>
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+
 	
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 	<!-- [Navigation Services] -->
@@ -2069,4 +2165,4 @@
 		</xs:complexType>
 	</xs:element>
 
-</xs:schema>
\ No newline at end of file
+</xs:schema>

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl Thu Jan 13 14:47:39 2011
@@ -1,18 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 	<!--
-		Licensed under the Apache License, Version 2.0 (the "License"); you
-		may not use this file except in compliance with the License. You may
-		obtain a copy of the License at
-
-		http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-		applicable law or agreed to in writing, software distributed under the
-		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-		CONDITIONS OF ANY KIND, either express or implied. See the License for
-		the specific language governing permissions and limitations under the
-		License.
+		$Revision: 65 $
+		$Date: 2009-08-30 08:18:30 -0700 (Sun, 30 Aug 2009) $
+		$Author: fmueller $
+		$HeadURL: http://tools.oasis-open.org/version-control/svn/cmis/trunk/SchemaProject/schema/CMISWS-Service.wsdl $
 	-->
-
 <definitions xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
 	xmlns:cmism="http://docs.oasis-open.org/ns/cmis/messaging/200908/"
 	xmlns:cmisw="http://docs.oasis-open.org/ns/cmis/ws/200908/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
@@ -266,6 +258,33 @@
 		<part name="parameters" element="cmism:getTypeDefinitionResponse" />
 	</message>
 
+	<!-- new for type mutability -->
+
+	<!-- new for type mutability - createType-->
+	<message name="createTypeDefinitionRequest">
+		<part name="parameters" element="cmism:createTypeDefinition" />
+	</message>
+	<message name="createTypeDefinitionResponse">
+		<part name="parameters" element="cmism:createTypeDefinitionResponse" />
+	</message>
+
+	<!-- new for type mutability - updateType-->
+	<message name="updateTypeDefinitionRequest">
+		<part name="parameters" element="cmism:updateTypeDefinition" />
+	</message>
+	<message name="updateTypeDefinitionResponse">
+		<part name="parameters" element="cmism:updateTypeDefinitionResponse" />
+	</message>
+
+	<!-- new for type mutability - deleteType-->
+	<message name="deleteTypeDefinitionRequest">
+		<part name="parameters" element="cmism:deleteTypeDefinition" />
+	</message>
+	<message name="deleteTypeDefinitionResponse">
+		<part name="parameters" element="cmism:deleteTypeDefinitionResponse" />
+	</message>
+
+
 	<message name="checkOutRequest">
 		<part name="parameters" element="cmism:checkOut" />
 	</message>
@@ -505,6 +524,23 @@
 			<output message="cmisw:getTypeDefinitionResponse" />
 			<fault message="cmisw:cmisException" name="cmisException" />
 		</operation>
+		<!-- new for type mutability -->
+	 	<operation name="createTypeDefinition">
+			<input message="cmisw:createTypeDefinitionRequest" />
+			<output message="cmisw:createTypeDefinitionResponse" />
+			<fault message="cmisw:cmisException" name="cmisException" />
+		</operation>
+	 	<operation name="updateTypeDefinition">
+			<input message="cmisw:updateTypeDefinitionRequest" />
+			<output message="cmisw:updateTypeDefinitionResponse" />
+			<fault message="cmisw:cmisException" name="cmisException" />
+		</operation>
+	 	<operation name="deleteTypeDefinition">
+			<input message="cmisw:deleteTypeDefinitionRequest" />
+			<output message="cmisw:deleteTypeDefinitionResponse" />
+			<fault message="cmisw:cmisException" name="cmisException" />
+		</operation>
+
 	</portType>
 	<portType name="VersioningServicePort">
 		<operation name="checkOut">
@@ -1011,6 +1047,47 @@
 				<soap:fault name="cmisException" use="literal" />
 			</fault>
 		</operation>
+
+		<!-- type muteability related -->
+		<operation name="createTypeDefinition">
+			<soap:operation soapAction="" />
+			<input>
+				<soap:body use="literal" />
+			</input>
+			<output>
+				<soap:body use="literal" />
+			</output>
+			<fault name="cmisException">
+				<soap:fault name="cmisException" use="literal" />
+			</fault>
+		</operation>
+
+		<operation name="updateTypeDefinition">
+			<soap:operation soapAction="" />
+			<input>
+				<soap:body use="literal" />
+			</input>
+			<output>
+				<soap:body use="literal" />
+			</output>
+			<fault name="cmisException">
+				<soap:fault name="cmisException" use="literal" />
+			</fault>
+		</operation>
+
+		<operation name="deleteTypeDefinition">
+			<soap:operation soapAction="" />
+			<input>
+				<soap:body use="literal" />
+			</input>
+			<output>
+				<soap:body use="literal" />
+			</output>
+			<fault name="cmisException">
+				<soap:fault name="cmisException" use="literal" />
+			</fault>
+		</operation>
+
 	</binding>
 	<binding name="VersioningServicePortBinding" type="cmisw:VersioningServicePort">
 		<soap:binding style="document"
@@ -1170,4 +1247,4 @@
 		</port>
 	</service>
 
-</definitions>
\ No newline at end of file
+</definitions>

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java?rev=1058588&r1=1058587&r2=1058588&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java (original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java Thu Jan 13 14:47:39 2011
@@ -45,6 +45,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.PropertyData;
 import org.apache.chemistry.opencmis.commons.data.PropertyId;
 import org.apache.chemistry.opencmis.commons.data.PropertyString;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
 import org.apache.chemistry.opencmis.commons.impl.Base64;
@@ -55,6 +56,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertiesImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyStringImpl;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
 
 /**
  * Parser for Atom Entries.
@@ -64,6 +66,7 @@ public class AtomEntryParser {
     private final static String TAG_ENTRY = "entry";
     private final static String TAG_TITLE = "title";
     private final static String TAG_OBJECT = "object";
+    private final static String TAG_TYPE = "type";
     private final static String TAG_CONTENT = "content";
     private final static String TAG_BASE64 = "base64";
     private final static String TAG_MEDIATYPE = "mediatype";
@@ -74,6 +77,7 @@ public class AtomEntryParser {
     protected boolean ignoreAtomContentSrc;
 
     private ObjectData object;
+    private TypeDefinition typeDef;
     private ContentStreamImpl atomContentStream;
     private ContentStreamImpl cmisContentStream;
 
@@ -98,6 +102,10 @@ public class AtomEntryParser {
         this.ignoreAtomContentSrc = ignoreAtomContentSrc;
     }
 
+    public TypeDefinition getTypeDefinition() {
+        return typeDef;
+    }
+
     /**
      * Returns the object.
      */
@@ -213,6 +221,8 @@ public class AtomEntryParser {
                 if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
                     if (TAG_OBJECT.equals(name.getLocalPart())) {
                         parseObject(parser);
+                    } else if (TAG_TYPE.equals(name.getLocalPart())) {
+                        parseType(parser);
                     } else if (TAG_CONTENT.equals(name.getLocalPart())) {
                         parseCmisContent(parser);
                     } else {
@@ -258,6 +268,18 @@ public class AtomEntryParser {
     }
 
     /**
+     * Parses a CMIS Type.
+     */
+    private void parseType(XMLStreamReader parser) throws Exception {
+        Unmarshaller u = JaxBHelper.createUnmarshaller();
+        JAXBElement<CmisTypeDefinitionType> jaxbObject = u.unmarshal(parser, CmisTypeDefinitionType.class);
+
+        if (jaxbObject != null) {
+            typeDef = Converter.convert(jaxbObject.getValue());
+        }
+    }
+
+    /**
      * Extract the content stream.
      */
     private void parseAtomContent(XMLStreamReader parser) throws Exception {



Mime
View raw message