cancel
Showing results for 
Search instead for 
Did you mean: 

Submiting Files into Staging - Using Java API

tommorris
Champ in-the-making
Champ in-the-making
Hello All,

I'm using the Java API to automatically submit/promote items a particular user's sandbox into the staging sandbox.
This seems to be working well using  'org.alfresco.service.cmr.avmsync.AVMSyncService.compare' and 'AVMSyncService.update' etc.
Usefully, this not only promotes the difference between the two stores, but it also triggers a staging-snapshot and updates the Lucene search index.

Although the modified items were removed from the 'Modified Items' list in the personal sandbox, I was a little surprised that they still showed as locked when you browse that sandbox. Is this a defect? Or should I be manually calling some unlock service? http://wiki.alfresco.com/wiki/Content_Locking#Submit suggests it should be unlocking for me.

Many thanks,
Tom

PS: I'm using enterprise version 2.1.1
1 REPLY 1

tommorris
Champ in-the-making
Champ in-the-making
Not sure if I'm supposed to need to do this, but it did the unlocking I wanted:

this.getServiceRegistry().getAVMLockingService().removeStoreLocks(storeName);