Page 1 of 1

Details On Periodic Deleting and Purging of Folders in OpenKM

PostPosted:Thu Oct 08, 2020 6:56 am
by PSHREYASHOLLA
Hi,

We are using OpenKM Java SDK APIs and we are supporting both OpenKM Professional and Community version with our application.

Can you direct me how we can periodically delete and purge specific folders and its contents from both professional and Community versions?

Thanks And Regards,
Shreyas Holla P.

Re: Details On Periodic Deleting and Purging of Folders in OpenKM

PostPosted:Fri Oct 09, 2020 6:53 am
by jllort
In professional edition exist a configuration parameters what takes control on it ( ask for support in our customer website ). In community edition does not exist this parameters and should take control with a contrab task or in case of SDK https://docs.openkm.com/kcenter/view/sd ... purgeTrash ( this method purge the trash of the user, not all the trashes )

Re: Details On Periodic Deleting and Purging of Folders in OpenKM

PostPosted:Mon Oct 12, 2020 9:41 am
by PSHREYASHOLLA
Thanks for the response.

For professional I have raised a ticket and they have pointed me here https://docs.openkm.com/kcenter/view/ok ... eters.html.

So now for Community edition,
Correct me if I am wrong here, I understand

1) Delete will move all documents to trash,
2) Purge will remove the documents from repository permanently.

In this case our ask is,

1) How to delete all the contents of a specific folder periodically,
2) How to purge these folders later periodically

Re: Details On Periodic Deleting and Purging of Folders in OpenKM

PostPosted:Sat Oct 17, 2020 7:32 am
by jllort
To delete the contents into a folders, should first getChildren and then delete each node.
You have 3 getChildren based in node type:
https://docs.openkm.com/kcenter/view/ok ... etChildren
https://docs.openkm.com/kcenter/view/ok ... etChildren
https://docs.openkm.com/kcenter/view/ok ... etChildren

You have 3 delete based in node type:
https://docs.openkm.com/kcenter/view/ok ... tml#delete
etc...

You have 3 purge based in node type:
https://docs.openkm.com/kcenter/view/ok ... html#purge
etc..

About how to create a crontab task read https://docs.openkm.com/kcenter/view/ok ... b-job.html , I suggest using JAVA class either scripting.