cancel
Showing results for 
Search instead for 
Did you mean: 

What is where_id parameter on CMLAddAspect?

spilby
Confirmed Champ
Confirmed Champ
Hi,

I'm adding custom aspects throw java webservice client, doing something like this:


NamedValue[] customProps = new NamedValue[2];
customProps[0] = Utils.createNamedValue("{example}AAA", "111");
customProps[1] = Utils.createNamedValue("{example}BBB", "222");
CMLAddAspect addCustomAspect1 = new CMLAddAspect("{example}my_aspect1", customProps, null, "1");

NamedValue[] customProps2 = new NamedValue[1];
customProps2 [0] = Utils.createNamedValue("{example}CCC", "333");
CMLAddAspect addCustomAspect2 = new CMLAddAspect("{example}my_aspect2", customProps2 , null, "2");

cml.setAddAspect(new CMLAddAspect[] { addCustomAspect1 , addCustomAspect2 });


My question is… What means the last parameter of CMLAddAspect? The API say that is a String where_id. On examples I allways see null or "1". But if I add various aspects, I need to put "1" and "2" to specify what is what? Better always "1"? Or whats means?

Thanks a lot!
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
First, I would like to suggest to not use this API of Alfresco because this is the first remote API implemented in Alfresco and now it is deprecated and it is not supported anymore.

Anyway the where_id must be a UUID of the involved node and it is an optional arguments. This because you can use a Predicate of nodes without getting all the UUIDs for nodes. This API takes the advantage of using PATHs of nodes without querying the related UUID.

Hope this helps.

spilby
Confirmed Champ
Confirmed Champ
Ok, thanks Piergiorgio. If I understand ok, I can put "1" on this paremeter and it's no effect, the node is created with another unique uuid. Maybe putting null is the same. When I put "2" or "3" por example it not works and return me an error.