Class CleanupPreviousVersionsTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
de.hybris.platform.solrserver.ant.CleanupPreviousVersionsTask
- All Implemented Interfaces:
Cloneable
public class CleanupPreviousVersionsTask
extends org.apache.tools.ant.Task
Ant Task that based on current server/customization version identifies and removes previous ones.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteDirectory(File directory) protected voiddeleteEmptyVersionDirectory(File versionDirectory) protected voiddeleteObsoleteDirectory(File versionDirectory, File[] subDirectories, File subDir) voidexecute()protected File[]getPrunedCurrentVerions(String versionEntry) protected booleanisDirectoryEmpty(File file) protected booleanisUnusedVersionDirectory(ArrayList<String> currentVersions, File versionDirectory) voidsetCurrentVersion(String currentVersion) voidsetSearchDirectory(String searchDirectory) voidsetVersionType(String versionType) protected voidMethods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
CleanupPreviousVersionsTask
public CleanupPreviousVersionsTask()
-
-
Method Details
-
getCurrentVersion
-
setCurrentVersion
-
getSearchDirectory
-
setSearchDirectory
-
getVersionType
-
setVersionType
-
execute
public void execute()- Overrides:
executein classorg.apache.tools.ant.Task
-
isUnusedVersionDirectory
-
deleteObsoleteDirectory
-
deleteDirectory
-
deleteEmptyVersionDirectory
-
validateAttributes
protected void validateAttributes() -
getExistingVersionDirectories
-
isDirectoryEmpty
-
getPrunedCurrentVerions
-