/* * File : $Source: /alkacon/cvs/alkacon/com.alkacon.opencms.v8.registration/src/com/alkacon/opencms/v8/registration/CmsRegistrationModuleAction.java,v $ * Date : $Date: 2011/03/10 11:59:04 $ * Version: $Revision: 1.2 $ * * This file is part of the Alkacon OpenCms Add-On Module Package * * Copyright (c) 2007 Alkacon Software GmbH (http://www.alkacon.com) * * The Alkacon OpenCms Add-On Module Package 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 3 of the License, or * (at your option) any later version. * * The Alkacon OpenCms Add-On Module Package 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 the Alkacon OpenCms Add-On Module Package. * If not, see http://www.gnu.org/licenses/. * * For further information about Alkacon Software GmbH, please see the * company website: http://www.alkacon.com. * * For further information about OpenCms, please see the * project website: http://www.opencms.org. */ package com.alkacon.opencms.v8.registration; import org.opencms.configuration.CmsConfigurationManager; import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.module.A_CmsModuleAction; import org.opencms.module.CmsModule; /** * This class is used to get an admin cms object.<p> * * @author Michael Moossen * * @version $Revision: 1.2 $ * * @since 7.0.4 */ public class CmsRegistrationModuleAction extends A_CmsModuleAction { /** The admin cms context. */ private static CmsObject m_cms; /** * Returns the admin cms context.<p> * * @return the admin cms context */ public static CmsObject getAdminCms() { return m_cms; } /** * @see org.opencms.module.A_CmsModuleAction#initialize(org.opencms.file.CmsObject, org.opencms.configuration.CmsConfigurationManager, org.opencms.module.CmsModule) */ @Override public void initialize(CmsObject adminCms, CmsConfigurationManager configurationManager, CmsModule module) { super.initialize(adminCms, configurationManager, module); try { m_cms = OpenCms.initCmsObject(adminCms); } catch (CmsException e) { // initialization failed e.printStackTrace(); } } }