Details On Periodic Deleting and Purging of Folders in OpenKM

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
PSHREYASHOLLA
Senior Boarder
Senior Boarder
Posts: 53
Joined: Thu Dec 22, 2016 4:18 am

Details On Periodic Deleting and Purging of Folders in OpenKM

Post 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.

jllort
Moderator
Moderator
Posts: 11240
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

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

Post 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 )

PSHREYASHOLLA
Senior Boarder
Senior Boarder
Posts: 53
Joined: Thu Dec 22, 2016 4:18 am

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

Post 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

jllort
Moderator
Moderator
Posts: 11240
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

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

Post 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.

Post Reply