From b20e5c84432ba9e1aa876df7ea36c1985b587ab7 Mon Sep 17 00:00:00 2001 From: baka Date: Mon, 5 Dec 2016 16:47:11 +0000 Subject: [PATCH] Reverts last commit. Wrong file. git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4464 8810af33-2d31-482b-a856-94f89814c4df Former-commit-id: b8af49d30f49548af75b7fe6ea49e43f566d53ae --- .../ui/category/AddUseContextForm.java.off | 102 ------------------ ...oryForm.java.off => BaseCategoryForm.java} | 0 2 files changed, 102 deletions(-) delete mode 100755 ccm-cms/src/main/java/com/arsdigita/cms/ui/category/AddUseContextForm.java.off rename ccm-cms/src/main/java/com/arsdigita/cms/ui/category/{BaseCategoryForm.java.off => BaseCategoryForm.java} (100%) diff --git a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/AddUseContextForm.java.off b/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/AddUseContextForm.java.off deleted file mode 100755 index 0e467c42a..000000000 --- a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/AddUseContextForm.java.off +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2004 Red Hat Inc. All Rights Reserved. - * - * This library 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 2.1 of - * the License, or (at your option) any later version. - * - * This library 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 this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -package com.arsdigita.cms.ui.category; - -import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.SingleSelectionModel; -import com.arsdigita.bebop.event.FormProcessListener; -import com.arsdigita.bebop.event.FormSectionEvent; -import com.arsdigita.bebop.event.ParameterEvent; -import com.arsdigita.bebop.parameters.GlobalizedParameterListener; -import com.arsdigita.bebop.parameters.ParameterData; -import com.arsdigita.bebop.util.GlobalizationUtil; -import com.arsdigita.cms.CMS; -import com.arsdigita.cms.ui.BaseForm; -import com.arsdigita.kernel.KernelConfig; -import org.apache.log4j.Logger; -import org.libreccm.categorization.Category; -import org.libreccm.cdi.utils.CdiUtil; -import org.libreccm.configuration.ConfigurationManager; -import org.libreccm.l10n.LocalizedString; -import org.librecms.contentsection.ContentSection; -import org.librecms.contentsection.privileges.AdminPrivileges; - - -/** - * TODO Needs a description. - * - * @author Yannick Bülter - * @author Scott Seago - * @version $Id: AddUseContextForm.java 2090 2010-04-17 08:04:14Z pboy $ - */ -class AddUseContextForm extends BaseForm { - - private static final Logger s_log = Logger.getLogger(AddUseContextForm.class); - - private final SingleSelectionModel m_model; - - private final Name m_useContext; - private final Name m_rootName; - private final Description m_rootDescription; - - AddUseContextForm(final SingleSelectionModel model) { - super("useContext", gz("cms.ui.category.add_use_context")); - - m_model = model; - m_useContext = new Name("useContext", 200, true); - addField(gz("cms.ui.category.use_context"), m_useContext); - m_rootName = new Name("rootName", 200, true); - addField(gz("cms.ui.name"), m_rootName); - m_rootDescription = new Description("rootName", 200, true); - addField(gz("cms.ui.description"), m_rootDescription); - - addAction(new Finish()); - addAction(new Cancel()); - - addSecurityListener(AdminPrivileges.ADMINISTER_CATEGORIES); - - addProcessListener(new ProcessListener()); - } - - private class ProcessListener implements FormProcessListener { - public final void process(final FormSectionEvent e) - throws FormProcessException { - final PageState state = e.getPageState(); - - final CdiUtil cdiUtil = CdiUtil.createCdiUtil(); - final ConfigurationManager manager = cdiUtil.findBean(ConfigurationManager.class); - final KernelConfig config = manager.findConfiguration(KernelConfig.class); - - final String useContext = (String) m_useContext.getValue(state); - - final String rootName = (String) m_rootName.getValue(state); - final LocalizedString rootDescription = new LocalizedString(); - rootDescription.addValue(config.getDefaultLocale(), (String) m_rootDescription.getValue(state)); - - Category root = new Category(); - root.setName(rootName); - root.setDescription(rootDescription); - root.setAbstractCategory(true); - - final ContentSection section = - CMS.getContext().getContentSection(); - } - } -} diff --git a/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/BaseCategoryForm.java.off b/ccm-cms/src/main/java/com/arsdigita/cms/ui/category/BaseCategoryForm.java similarity index 100% rename from ccm-cms/src/main/java/com/arsdigita/cms/ui/category/BaseCategoryForm.java.off rename to ccm-cms/src/main/java/com/arsdigita/cms/ui/category/BaseCategoryForm.java