<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom content type with mimetype constraint in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308213#M261343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having trouble getting my head around this.&amp;nbsp; Is it possible to create a custom type which has constraints on the mimetype of the content. For example, a content type which can only have "application/pdf" as its content mimetype? I realize this can be accomplished at the application-level during content creation, but I am curious if the model could enforce this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any hints would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Carlos S. Zamudio&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Jun 2014 19:06:06 GMT</pubDate>
    <dc:creator>cszamudio</dc:creator>
    <dc:date>2014-06-08T19:06:06Z</dc:date>
    <item>
      <title>Custom content type with mimetype constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308213#M261343</link>
      <description>Hi,I'm having trouble getting my head around this.&amp;nbsp; Is it possible to create a custom type which has constraints on the mimetype of the content. For example, a content type which can only have "application/pdf" as its content mimetype? I realize this can be accomplished at the application-level duri</description>
      <pubDate>Sun, 08 Jun 2014 19:06:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308213#M261343</guid>
      <dc:creator>cszamudio</dc:creator>
      <dc:date>2014-06-08T19:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom content type with mimetype constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308214#M261344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'am afraid there is no such feature in model level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 08:05:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308214#M261344</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-06-09T08:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom content type with mimetype constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308215#M261345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Carlos,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it should be possible to add a constraint in the model, e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;type name="foo:bar"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;parent name="cm:content"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;overrides&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property cm:mimrtype&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;constraints&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;constraint type="REGEX"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="expression" value="application/pdf"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/c onstraint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/constraints&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/overrides&amp;gt;&lt;BR /&gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(not having my dev environment at hand – the syntax may be slightly incorrect, but you should get the idea)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT: mime type is typically something managed by the system, so you'll have to check whether this will provide you with what you need:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;ul&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;li&amp;gt;if mime type is not PDF, the system should not let you change type into your content type foo:bar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;li&amp;gt;if content type of the object is foo:bar, the system should not let you change the mime type to anything other than PDF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;li&amp;gt;there may be other cases that need consideration…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/ul&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 12:52:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308215#M261345</guid>
      <dc:creator>ipirat</dc:creator>
      <dc:date>2014-06-10T12:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom content type with mimetype constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308216#M261346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the suggestion. I tried something similar, but I'll experiment with different forms of the property name and if I find something that works, I'll post it. Cheers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 11:39:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308216#M261346</guid>
      <dc:creator>cszamudio</dc:creator>
      <dc:date>2014-06-11T11:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom content type with mimetype constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308217#M261347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think iPirat'solution will work,because:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"cm:mimetype" is not a property of "cm:cotent type" and the overrided logic will not work on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Correct me if I'm wrong&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 14:56:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-content-type-with-mimetype-constraint/m-p/308217#M261347</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-06-11T14:56:36Z</dc:date>
    </item>
  </channel>
</rss>

