cancel
Showing results for 
Search instead for 
Did you mean: 

Add 'special' properties

maraki
Champ in-the-making
Champ in-the-making
Hello!
I need to add some properties in my repository..

I created a new content and aspects according to the following tuttorials:
http://wiki.alfresco.com/wiki/Data_Dictionary_Guide
http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata
and added some properties..

My difficulty is here..I want to add some more properties but I want them to be depended on the kind of the file that is added.
For example if it is a pdf file, the user should be able to add a summary of the pdf, or
if it is a jpg file the user should be able to add resolution (something that will not have any point in the case of a pdf file).

I couldn t find how alfresco is recognize the kind of the file.. and if/how properties of a file can be changed/added.
Have you got any idea of how this can be done???
5 REPLIES 5

jbarmash
Champ in-the-making
Champ in-the-making
What you are basically asking is ability to map the different mime types to content types.  I don't believe we have this capability at this point.

You can achieve this effect through space rules, however.  There are conditions that allow you to pick out specific mime types, and an action that allows you to "downcast" a type - called "specialise the type of an item".  Then any time a pdf comes into a space, it will downcast it into the type you want with the extra properties. 

Yet another way to do this would be to create a content policy that monitors when you are adding a content of a certain mime type, and adds an aspect with the extra properties you'd like to add.

maraki
Champ in-the-making
Champ in-the-making
Thank you for your information.

Could you suggest me a tuttorial, an example, or something like this of how the above could be done?

jbarmash
Champ in-the-making
Champ in-the-making
Play around with space rules.  When you create a space and go to properties of it, there is a section that allows you to create rules. 

Check out the Tutorial included with all the installations - it's at Company Home \ Data Dictionary \ Guest Home.  page 17.

maraki
Champ in-the-making
Champ in-the-making
Thank you for your speedy response jbarmash!
It works  Smiley Very Happy

saconni
Champ in-the-making
Champ in-the-making
I did some aproach that is being polished…

Alfresco have the posiblity to execute JScript on some events, like 'onContentUpdate' or 'onCreateNode'

you can check the document properties (ie: file extension) in the JScript and specialize the document if you like…

i don't have the reference that I used right now… but you can search for 'policyRegistration' that is the class that let you intercept those events…