protected void runSnapshotRemover(String repositoryId, int minSnapshotsToKeep, int removeOlderThanDays,
boolean removeIfReleaseExists)
throws Exception
{
ScheduledServicePropertyResource repositoryProp = new ScheduledServicePropertyResource();
repositoryProp.setKey("repositoryId");
repositoryProp.setValue(repositoryId);
ScheduledServicePropertyResource keepSnapshotsProp = new ScheduledServicePropertyResource();
keepSnapshotsProp.setKey("minSnapshotsToKeep");
keepSnapshotsProp.setValue(String.valueOf(minSnapshotsToKeep));
ScheduledServicePropertyResource ageProp = new ScheduledServicePropertyResource();
ageProp.setKey("removeOlderThanDays");
ageProp.setValue(String.valueOf(removeOlderThanDays));
ScheduledServicePropertyResource removeReleasedProp = new ScheduledServicePropertyResource();
removeReleasedProp.setKey("removeIfReleaseExists");
removeReleasedProp.setValue(String.valueOf(removeIfReleaseExists));
TaskScheduleUtil.runTask(SnapshotRemovalTaskDescriptor.ID, repositoryProp, keepSnapshotsProp, ageProp,
removeReleasedProp);
}