mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7498: Deployment callback and event changes 7499: Build fix 7505: Fixed deployment script issue in IE 7525: Added sample job that will clean deployment attempts older than 180 days (by default) 7526: Typo compilation fix git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8383 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.repo.avm;
|
||||
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
/**
|
||||
* Job to periodically execute the deployment attempt cleaner.
|
||||
*
|
||||
* <p>
|
||||
* The following parameters are required:
|
||||
* <ul>
|
||||
* <li><b>deploymentAttemptCleaner</b>: The deployment attempt cleaner instance</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class AVMDeploymentAttemptCleanerJob implements Job
|
||||
{
|
||||
/**
|
||||
* Searches for old deployment attempts and removes them.
|
||||
*
|
||||
* @param context The job context
|
||||
*/
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException
|
||||
{
|
||||
// get the expired content processor bean from the job context
|
||||
AVMDeploymentAttemptCleaner cleaner =
|
||||
(AVMDeploymentAttemptCleaner)context.getJobDetail().getJobDataMap().get("deploymentAttemptCleaner");
|
||||
if (cleaner == null)
|
||||
{
|
||||
throw new JobExecutionException("Missing job data: deploymentAttemptCleaner");
|
||||
}
|
||||
|
||||
// execute the cleaner to do the actual work
|
||||
cleaner.execute();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user