cancel
Showing results for 
Search instead for 
Did you mean: 

How to manage content with custom models

webraccoon
Champ in-the-making
Champ in-the-making
HI,

i try to adapt one of the SDK Webservice examples. I have a content and i'm able to store this in the repository via webservice -> ok.
But, this content is only ContentType "plain/text". What i prefer is to add to this content my own model.

How can i do that?
i tried to change new ContentFormat("plain/text", "UTF-8"); to new ContentFormat("invoice:doc", "UTF-8"); but of course this doesn't work.
I don't know which method i should take to add a custom model. Can anybody help please?

thanks
webraccoon
1 REPLY 1

erolozcan
Champ in-the-making
Champ in-the-making
You can do this adding your mime type to "$ALF_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/mimetype/mimetype-map.xml" file.  You can manually select your mimetype while adding/uploading your document or give it a unique extenesion name like idoc, idc do that automatically. Sample is below :


<alfresco-config area="mimetype-map">
   <config evaluator="string-compare" condition="Mimetype Map">
      <mimetypes>
         <mimetype mimetype="invoice/doc" display="Invoice Doc Type">
            <extension default="true">idoc</extension>
            <extension>idc</extension>
         </mimetype
       …
       …
      </mimetypes>
   </config>
</alfresco-config>