Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Forked from wingyplus/cleaner.js
Created February 6, 2019 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglascrp/8deaca0502e1e2f699320f411fef65d5 to your computer and use it in GitHub Desktop.
Save douglascrp/8deaca0502e1e2f699320f411fef65d5 to your computer and use it in GitHub Desktop.
Delete all file in archive store
importClass(Packages.org.springframework.web.context.ContextLoader);
importClass(Packages.org.alfresco.service.cmr.repository.StoreRef);
var ctx = ContextLoader.getCurrentWebApplicationContext();
var archiveService = ctx.getBean("nodeArchiveService");
archiveService.purgeAllArchivedNodes(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment