@Override
    protected void executeImpl(CommandLine cmd) {
        try {
            List<PropertyDefinition> defintions =
                new PropertyDefinitionListBuilder().addMillDb()
                                                   .addManifestExpirationDate()
                                                   .build();
            PropertyVerifier verifier = new PropertyVerifier(defintions);
            verifier.verify(System.getProperties());
            String time = System.getProperty(ConfigConstants.MANIFEST_EXPIRATION_TIME);
            Date expirationDate;
            expirationDate = parseExpirationDate(time);

            ApplicationContext context = new AnnotationConfigApplicationContext("org.duracloud.mill");
            log.info("spring context initialized.");
            ManifestStore store = context.getBean(ManifestStore.class);
            log.info("beginning purge of deleted items");

            long deleted = 0l;
            long total = 0l;
            while ((deleted = store.purgeDeletedItemsBefore(expirationDate)) > 0) {
                total += deleted;
                log.info("Deleted {} items that were flagged as deleted before {}",
                         deleted,
                         expirationDate);
            }

            log.info("Purge completed: Deleted a grand total of {} items that were flagged as deleted before {}",
                     total,
                     expirationDate);

        } catch (Exception e) {
            log.error(e.getMessage(), e);
        } finally {
            log.info("exiting...");
        }
    }
@ Override protected void executeImpl ( CommandLine cmd ) { try { List < PropertyDefinition > defintions = new PropertyDefinitionListBuilder ( ) . addMillDb ( ) . addManifestExpirationDate ( ) . build ( ) ; PropertyVerifier verifier = new PropertyVerifier ( defintions ) ; verifier . verify ( System . getProperties ( ) ) ; String time = System . getProperty ( ConfigConstants . MANIFEST_EXPIRATION_TIME ) ; Date expirationDate ; expirationDate = parseExpirationDate ( time ) ; ApplicationContext context = new AnnotationConfigApplicationContext ( "org.duracloud.mill" ) ; log . info ( "spring context initialized." ) ; ManifestStore store = context . getBean ( ManifestStore . class ) ; log . info ( "beginning purge of deleted items" ) ; long deleted = 0l ; long total = 0l ; while ( ( deleted = store . purgeDeletedItemsBefore ( expirationDate ) ) > 0 ) { total += deleted ; log . info ( "Deleted {} items that were flagged as deleted before {}" , deleted , expirationDate ) ; } log . info ( "Purge completed: Deleted a grand total of {} items that were flagged as deleted before {}" , total , expirationDate ) ; } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; } finally { log . info ( "exiting..." ) ; } }
/*
(non-Javadoc)

@see
org.duracloud.mill.util.DriverSupport#executeImpl(org.apache.commons.
cli.CommandLine)