AnsweredAssumed Answered

set default mimetype at custom content type

Question asked by michaelp on Nov 28, 2014
Latest reply on Dec 1, 2014 by afaust
Hi there,

For our custom document type (lets say
custom:type
we want to set a custom mimetype as default mimetype (lets say
application/custommimetype
if a document is created as
custom:type
. For this I tried to override the parent type's property
<default>application/custommimetype</default>
mimetype for both
cmis:contentStreamMimetype
(in case our parent type is
cmis:document
) and
cm:content.mimetype
(in case our parent type is
cm:content
.

For example:



   <imports>
      <!– Import Alfresco Dictionary Model Definition –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <!– Import Alfresco Content Domain Model Definition –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
      <!– Import Alfresco Repository System Model Definition –>
      <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
      <!– Import Alfresco Share Data List Model Definition –>
      <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl" />
      <!– Import Alfresco CMIS Model Definition –>
      <import uri="http://www.alfresco.org/model/cmis/1.0/cs01" prefix="cmis" />
   </imports>
   
   […]

      <type name="custom:type">
         <title>Custom Type</title>
         <parent>cm:content</parent> //or <parent>cmis:document</parent>
         <properties>
            <property name="custom:property">
               <title>Custom Property</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
               <multiple>false</multiple>
            </property>
         </properties>
         <overrides>
            <property name="cm:content.mimetype"> //or <property name="cmis:contentStreamMimeType">
               <mandatory>true</mandatory>
               <default>application/custommimetype</default>
            </property>
         </overrides>
      </type>


The errors are always something like "…mimtype… unknown!" "…cmis… unknown!" or "…cmis:… does not exist!" or "…mimetype… of cmis does not exist!" (no imports are missing)

I also tried to use the type mapping descriped here: https://wiki.alfresco.com/wiki/CMIS_Model_Mapping#Meta_Model_Mapping

Without any success on many attemps I have to ask now you specialists: is this even possible?

We want this so Workdesk later can handle documents of this custom mimetype in a special way.

Thanky you for all your answers!
Best regards,
Michael

Outcomes