mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-07 18:25:23 +00:00
93980: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 93846: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.1) 93733: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.5) 93616: MNT-5564: Reverse Merge V4.1-BUG-FIX (4.1.10) 93608: Reverse Merge V4.1-BUG-FIX (4.1.10) << Has been causing a build failure for a week >> 93213: Merged DEV to V4.1-BUG-FIX (4.1.10) 70268: MNT-5564: Share Lucene tool in admin console works incorrectly Backport changes from HEAD-QA to DEV: 53461: ALF-19108: Failed to switching SOLR search service to Lucene with AUTO or VALIDATE values of Index Recovery Mode -Make search admin console page display when SOLR is not running. 53463: ALF-19108: Failed to switching SOLR search service to Lucene with AUTO or VALIDATE values of Index Recovery Mode - Make sure cron trigger removes duplicate jobs. 54173: ALF-19108: Failed to switching SOLR search service to Lucene with AUTO or VALIDATE values of Index Recovery Mode - Fix for ALF-19330 Exceptions when switching from Solr to Lucene in repo Admin console - Fix for ALF-19108 Failed to switching SOLR search service to Lucene with AUTO or VALIDATE values of Index Recovery Mode git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95020 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
59 lines
1.8 KiB
Java
59 lines
1.8 KiB
Java
/*
|
|
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
|
*
|
|
* This file is part of Alfresco
|
|
*
|
|
* Alfresco is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Alfresco 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 Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
package org.alfresco.repo.node.index;
|
|
|
|
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
|
import org.alfresco.repo.admin.RepositoryState;
|
|
import org.apache.commons.logging.Log;
|
|
import org.apache.commons.logging.LogFactory;
|
|
import org.springframework.context.ApplicationEvent;
|
|
|
|
public class IndexRecoveryBootstrapBean extends AbstractLifecycleBean
|
|
{
|
|
protected final static Log log = LogFactory.getLog(IndexRecoveryBootstrapBean.class);
|
|
|
|
IndexRecovery indexRecoveryComponent;
|
|
|
|
@Override
|
|
protected void onBootstrap(ApplicationEvent event)
|
|
{
|
|
// reindex
|
|
|
|
log.info("Checking/Recovering indexes ...");
|
|
indexRecoveryComponent.reindex();
|
|
|
|
}
|
|
|
|
@Override
|
|
protected void onShutdown(ApplicationEvent event)
|
|
{
|
|
// Nothing to do
|
|
}
|
|
|
|
public IndexRecovery getIndexRecoveryComponent()
|
|
{
|
|
return indexRecoveryComponent;
|
|
}
|
|
|
|
public void setIndexRecoveryComponent(IndexRecovery indexRecoveryComponent)
|
|
{
|
|
this.indexRecoveryComponent = indexRecoveryComponent;
|
|
}
|
|
}
|