How to manage content with custom models
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2010 03:49 AM
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2010 09:51 AM
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>
