Derek Hulley f047c6baaf Merged DEV\EXTENSIONS to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4868 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4869 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4904 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4938 .
   Module management support
   Modularization of Records Management


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4956 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2007-01-29 14:43:37 +00:00

55 lines
1.5 KiB
Java

/*
* Copyright (C) 2007 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.module;
import org.alfresco.service.cmr.module.ModuleService;
import org.alfresco.util.AbstractLifecycleBean;
import org.alfresco.util.PropertyCheck;
import org.springframework.context.ApplicationEvent;
/**
* This component is responsible for ensuring that patches are applied
* at the appropriate time.
*
* @author Derek Hulley
*/
public class ModuleStarter extends AbstractLifecycleBean
{
private ModuleService moduleService;
/**
* @param moduleService the service that will do the actual work.
*/
public void setModuleService(ModuleService moduleService)
{
this.moduleService = moduleService;
}
@Override
protected void onBootstrap(ApplicationEvent event)
{
PropertyCheck.mandatory(this, "moduleService", moduleService);
moduleService.startModules();
}
@Override
protected void onShutdown(ApplicationEvent event)
{
// NOOP
}
}