Package org.apache.continuum.purge

Examples of org.apache.continuum.purge.ContinuumPurgeManager


        logger.info( ">>>>>>>>>>>>>>>>>>>>> Executing purge job (" + jobName + ")..." );

        Continuum continuum = (Continuum) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.CONTINUUM );

        ContinuumPurgeManager purgeManager = continuum.getPurgeManager();

        Schedule schedule = (Schedule) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.SCHEDULE );

        try
        {
            purgeManager.purge( schedule );
        }
        catch ( ContinuumPurgeManagerException e )
        {
            logger.error( "Error purging for job" + jobName + ".", e );
        }
View Full Code Here


    }

    public String doPurge()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();

        // check if repository is in use
        if ( taskQueueManager.isRepositoryInUse( repository.getId() ) )
        {
            addActionError( getText( "repository.error.purge.in.use",
                                     "Unable to purge repository because it is in use" ) );
        }

        if ( !hasActionErrors() )
        {
            // get default purge configuration for repository
            RepositoryPurgeConfiguration purgeConfig = purgeConfigService.getDefaultPurgeConfigurationForRepository(
                repository.getId() );

            if ( purgeConfig != null )
            {
                purgeManager.purgeRepository( purgeConfig );

                AuditLog event = new AuditLog( "Repository id=" + repository.getId(),
                                               AuditLogConstants.PURGE_LOCAL_REPOSITORY );
                event.setCategory( AuditLogConstants.LOCAL_REPOSITORY );
                event.setCurrentUser( getPrincipal() );
View Full Code Here

    }

    public String purge()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();

        if ( purgeConfigId > 0 )
        {
            purgeConfig = purgeConfigService.getPurgeConfiguration( purgeConfigId );

            if ( purgeConfig instanceof RepositoryPurgeConfiguration )
            {
                RepositoryPurgeConfiguration repoPurge = (RepositoryPurgeConfiguration) purgeConfig;

                // check if repository is in use
                if ( taskQueueManager.isRepositoryInUse( repoPurge.getRepository().getId() ) )
                {
                    message = "repository.error.purge.in.use";
                    return ERROR;
                }

                purgeManager.purgeRepository( repoPurge );
            }
            else
            {
                DirectoryPurgeConfiguration dirPurge = (DirectoryPurgeConfiguration) purgeConfig;
                purgeManager.purgeDirectory( dirPurge );
            }
        }

        return SUCCESS;
    }
View Full Code Here

    }
   
    public String doPurge()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();

        // check if repository is in use
        if ( taskQueueManager.isRepositoryInUse( repository.getId() ) )
        {
            addActionError( getText( "repository.error.purge.in.use", "Unable to purge repository because it is in use" ) );
        }
    
        if ( !hasActionErrors() )
        {
            // get default purge configuration for repository
            RepositoryPurgeConfiguration purgeConfig = purgeConfigService.getDefaultPurgeConfigurationForRepository( repository.getId() );
       
            if ( purgeConfig != null )
            {
                purgeManager.purgeRepository( purgeConfig );
            }
        }
        return SUCCESS;
    }
View Full Code Here

    }
   
    public String purge()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
       
        if ( purgeConfigId > 0 )
        {
            purgeConfig = purgeConfigService.getPurgeConfiguration( purgeConfigId );
           
            if ( purgeConfig instanceof RepositoryPurgeConfiguration )
            {
                RepositoryPurgeConfiguration repoPurge = (RepositoryPurgeConfiguration) purgeConfig;
               
                // check if repository is in use
                if ( taskQueueManager.isRepositoryInUse( repoPurge.getRepository().getId() ) )
                {
                    message = "repository.error.purge.in.use";
                    return ERROR;
                }
               
                purgeManager.purgeRepository( repoPurge );
            }
            else
            {
                DirectoryPurgeConfiguration dirPurge = (DirectoryPurgeConfiguration) purgeConfig;
                purgeManager.purgeDirectory( dirPurge );
            }
        }
       
        return SUCCESS;
    }
View Full Code Here

    }
   
    public String doPurge()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();

        // check if repository is in use
        if ( taskQueueManager.isRepositoryInUse( repository.getId() ) )
        {
            addActionError( getText( "repository.error.purge.in.use", "Unable to purge repository because it is in use" ) );
        }
    
        if ( !hasActionErrors() )
        {
            // get default purge configuration for repository
            RepositoryPurgeConfiguration purgeConfig = purgeConfigService.getDefaultPurgeConfigurationForRepository( repository.getId() );
       
            if ( purgeConfig != null )
            {
                purgeManager.purgeRepository( purgeConfig );

                AuditLog event = new AuditLog( "Repository id=" + repository.getId(), AuditLogConstants.PURGE_LOCAL_REPOSITORY );
                event.setCategory( AuditLogConstants.LOCAL_REPOSITORY );
                event.setCurrentUser( getPrincipal() );
                event.log();
View Full Code Here

    }

    public String purge()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();

        if ( purgeConfigId > 0 )
        {
            purgeConfig = purgeConfigService.getPurgeConfiguration( purgeConfigId );

            if ( purgeConfig instanceof RepositoryPurgeConfiguration )
            {
                RepositoryPurgeConfiguration repoPurge = (RepositoryPurgeConfiguration) purgeConfig;

                // check if repository is in use
                if ( taskQueueManager.isRepositoryInUse( repoPurge.getRepository().getId() ) )
                {
                    message = "repository.error.purge.in.use";
                    return ERROR;
                }

                purgeManager.purgeRepository( repoPurge );
            }
            else
            {
                DirectoryPurgeConfiguration dirPurge = (DirectoryPurgeConfiguration) purgeConfig;
                purgeManager.purgeDirectory( dirPurge );
            }
        }

        return SUCCESS;
    }
View Full Code Here

        logger.info( ">>>>>>>>>>>>>>>>>>>>> Executing purge job (" + jobName + ")..." );

        Continuum continuum = (Continuum) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.CONTINUUM );

        ContinuumPurgeManager purgeManager = continuum.getPurgeManager();
       
        Schedule schedule = (Schedule) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.SCHEDULE );

        try
        {
            purgeManager.purge( schedule );
        }
        catch ( ContinuumPurgeManagerException e )
        {
            logger.error( "Error purging for job" + jobName + ".", e );
        }
View Full Code Here

            createDefaultPurgeConfiguration();
        }
        else
        {
            // check if repository is in use
            ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
            if ( purgeManager.isRepositoryInUse( repository.getId() ) )
            {
                addActionError( "repository.error.save.in.use" );
                return ERROR;
            }
           
View Full Code Here

    }
   
    public String remove()
        throws Exception
    {
        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
        if ( purgeManager.isRepositoryInUse( repository.getId() ) )
        {
            message = "repository.error.remove.in.use";
            return ERROR;
        }
       
View Full Code Here

TOP

Related Classes of org.apache.continuum.purge.ContinuumPurgeManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.