cancel
Showing results for 
Search instead for 
Did you mean: 

How/where are custom content properties 'assigned' to nodes?

p3d3r0s0
Champ in-the-making
Champ in-the-making
When a file is created in Alfresco, it first creates a node with default properties, name, description, etc..
Where do the bonus properties(ones created for custom content) get added to that node?
Is the node only associated through the database?

For example, i have a content named mycontent, with a property(just a string) named mystring.
I found the association in the DB on table alf_node and alf_node_properties and inside the latest there was the content of mystring.

My objective is to change that string with something i do automaticly. My problem is finding where i can change the data inside that string after the node is created successfully.

Hope anyone can help.

Regards,
Pedro

edit: i just noticed that description is added on the same page as my custom string "mystring".
does anyone know where (in java code(package)) that operation is done?

edit 2:actually this is done in the repository project in org.alfresc.repo.node.db in the propertiesAfter hashmap.
but where is mystring added?
2 REPLIES 2

gauchoproluanco
Champ in-the-making
Champ in-the-making
Hi Pedro,

We have extended the upload web script for uploading custom contents. In our js we have the next pieces of code:
var customNode = somePath.createNode(filename,"prefix-name:type-name");
//Set the cm:content properties
customNode.properties.content.write(content);
…/…
//Set the prefix-name:type-name properties
customNode.properties["type-name:property-name"] = fechainicio;
…/…

Hope it helps!

Luis

ps: we are looking for a lucene query for searching this contents by any of their properties, I would like, for example, to search all the nodes of these custom type that have a concrete text in one of their properties. Any idea? Thanks in advance!

gauchoproluanco
Champ in-the-making
Champ in-the-making
Hi everybody,

Finally we could get the byte[] from a document using this web-script url:

/service/api/node/content/workspace/SpacesStore/ + uuid 

uuid is the uuid of the document.

Hope it helps,

Luis
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.