mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
17667: Branch for SpringSurf integration - from HEAD r17665 17668: Fix to ensure included scripts files are not loaded from a cached classpath loader. 17670: Part 1 of SpringSurf integration - changes relating to spring-surf-core-1.0.0.CI-SNAPSHOT.jar 17674: Part 2 of SpringSurf integration - changes relating to spring-surf-core-configservice-1.0.0.CI-SNAPSHOT.jar git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17788 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
55 lines
1.6 KiB
Java
55 lines
1.6 KiB
Java
/*
|
|
* Copyright (C) 2005 Alfresco, Inc.
|
|
*
|
|
* Licensed under the Mozilla Public License version 1.1
|
|
* with a permitted attribution clause. You may obtain a
|
|
* copy of the License at
|
|
*
|
|
* http://www.alfresco.org/legal/license.txt
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
* either express or implied. See the License for the specific
|
|
* language governing permissions and limitations under the
|
|
* License.
|
|
*/
|
|
package org.alfresco.repo.node.index;
|
|
|
|
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
|
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;
|
|
}
|
|
|
|
}
|