cancel
Showing results for 
Search instead for 
Did you mean: 

How to update properties through CMIS

ArlindoViana
Champ on-the-rise
Champ on-the-rise

Hello guys, 

How can I update properties of several documents at once, for example using:

UPDATE cm: indexControl SET cm: isIndexed = true, cm: isContentIndexed = true WHERE cm: isIndexed = false AND cm: isContentIndexed = false AND cmis: objectTypeId = 'D: sij: documento'

sij:documento is a custom type on my data model.

Arlindo Viana - Alfresco Solutions Consultant
+55 81 997761629
5 REPLIES 5

dvuika
Star Collaborator
Star Collaborator

You probably need to raise this question in the Content Services forum.

kaynezhang
World-Class Innovator
World-Class Innovator

You can try to query all the objects that you are trying to change properties by queryObjects method of org.apache.chemistry.opencmis.client.api.Session an then call bulkUpdateProperties method of org.apache.chemistry.opencmis.client.api.Session

angelborroy
Community Manager Community Manager
Community Manager

CMIS is a standard that provides a subset of SQL-92 for discovering objects, but not for modifying them.

http://docs.oasis-open.org/cmis/CMIS/v1.1/os/CMIS-v1.1-os.html#x1-10500014

You need to use other approach like suggested above to update your Repository Nodes.

Hyland Developer Evangelist

ArlindoViana
Champ on-the-rise
Champ on-the-rise

solved with this tip from Apache Chemitry Samples: https://chemistry.apache.org/docs/cmis-samples/samples/update-objects/index.html

Many thanks for all.

Arlindo Viana - Alfresco Solutions Consultant
+55 81 997761629

EddieMay
World-Class Innovator
World-Class Innovator

Hi @ArlindoViana,

Glad you got a solution & thanks for the reference - really helpful to other users.

Best wishes, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!