This application is used to delete all assets out of a single folder, while ignoring any folders
- Retrieve list of all items in the folder
- Loop through all items, ignoring folders
- Delete each one, one at a time
The application is a single module maven Java standalone application.
- Checkout code and go to the root folder
- Execute
mvn clean package - All code should be compiled
The application uses two source files:
- Server configuration which has information about the server.
- Folder configuration which has information about the folder to delete assets from
Example:
<XML goes here>
- Field1: [required] Field 1 description
<XML goes here>
- Field1: [required] Field 1 description
Use the AEM HTTP Assets API to delete all assets within a single folder.
usage: java -jar delete-all-assets-from-single-folder-1.0.jar
-s <arg> file path for server configuration.
-f <arg> file path for folder configuration.
mvn clean package
cd delete-all-assets-from-single-folder/target/
java -jar delete-all-assets-from-single-folder-1.0.jar -s server.xml -f folder.xml
The logs will be stored on ./logs from where the jar was launched.