- * . - * Contains methods to simplify globalizing keys - *
- * - * @author yon@arsdigita.com - * @version $Revision: #7 $ $Date: 2004/08/17 $ - */ -public class GlobalizationUtilOld { - - /** Name of the Java class to handle CMS's globalisation. */ - //public static String s_bundleName = "com.arsdigita.cms.util.CMSResourceBundle"; - public static String s_bundleName = "com.arsdigita.cms.CMSResources"; - - /** - * This returns a globalized message using the package specific bundle, - * provided by method getBundleName() - */ - public static GlobalizedMessage globalize(String key) { - return new GlobalizedMessage(key, getBundleName()); - } - - /** - * Returns a globalized message object, using the package specific bundle, - * provided by method getBundleName(). Also takes in an Object[] of - * arguments to interpolate into the retrieved message using the - * MessageFormat class. - */ - public static GlobalizedMessage globalize(String key, Object[] args) { - return new GlobalizedMessage(key, getBundleName(), args); - } - - /** - * Returns the name of the package specific resource bundle. - * @return - */ - public static String getBundleName() { - return s_bundleName; - } - - /* - * Not a part of API. Otherwise it would need to be properly synchronized. - * Only meant be used to override resource keys in CMSResources - * by a custom application, in Initializer. - */ - public static void internalSetBundleName(String bundleName) { - s_bundleName = bundleName; - } - -} diff --git a/ccm-cms/src/main/resources/com/arsdigita/cms/util/LanguageUtil.java b/ccm-cms/src/main/resources/com/arsdigita/cms/util/LanguageUtil.java deleted file mode 100755 index b5b3632a5..000000000 --- a/ccm-cms/src/main/resources/com/arsdigita/cms/util/LanguageUtil.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (C) 2003-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.util; - -import com.arsdigita.cms.ContentBundle; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.globalization.GlobalizationHelper; -import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.util.Assert; -import com.arsdigita.util.Pair; - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; -import java.util.StringTokenizer; - -/** - * Utility methods for dealing with the multilingual items. - * - * @author Shashin Shinde (sshinde@redhat.com) - * @author Sören Bernstein- * <dispatcher-configuration> - * <url-mapping - * <url>my-page</url> - * OR <page-class>com.arsdigita.Page.class</page-class> - * <url-mapping - * </dispatcher-configuration> - *- */ -public class PageClassConfigHandler extends DefaultHandler { - - private Map m_map; - private Map m_rmap; - private StringBuffer m_buffer; - private String m_url; - private String m_className; - - /** - * @param map A map to configure (pages-> classes) - * @param rmap A map to configure (classes-> pages) - * - * @pre md.m_map != null - */ - public PageClassConfigHandler(Map map, Map rmap) { - m_map = map; - // reverse map - m_rmap = rmap; - m_buffer = new StringBuffer(); - } - - @Override - public void characters(char[] ch, int start, int len) { - for (int i = 0; i < len; i++) { - m_buffer.append(ch[start + i]); - } - } - - @Override - public void endElement(String uri, String localName, String qn) { - if ( qn.equals("url") ) { - m_url = m_buffer.toString().trim(); - } else if ( qn.equals("page-class") ) { - m_className = m_buffer.toString().trim(); - } else if ( qn.equals("url-mapping") ) { - m_map.put(m_url, m_className); - m_rmap.put(m_className, m_url); - } - m_buffer = new StringBuffer(); - } -} diff --git a/ccm-cms/src/main/resources/com/arsdigita/cms/util/SecurityConstants.java b/ccm-cms/src/main/resources/com/arsdigita/cms/util/SecurityConstants.java deleted file mode 100755 index dde69fd2c..000000000 --- a/ccm-cms/src/main/resources/com/arsdigita/cms/util/SecurityConstants.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2003-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.util; - - - -/** - *
Security class used for checking and granting privileges in - * CMS.
- * - * @author Michael Pih - * @version $Revision: #7 $ $DateTime: 2004/08/17 23:15:09 $ - * @version $Id: SecurityConstants.java 2090 2010-04-17 08:04:14Z pboy $ - */ -public interface SecurityConstants { - - // CMS Actions - public final static String STAFF_ADMIN = "staff_admin"; - public final static String WORKFLOW_ADMIN = "workflow_admin"; - public final static String CATEGORY_ADMIN = "category_admin"; - public final static String LIFECYCLE_ADMIN = "lifecycle_admin"; - public final static String CONTENT_TYPE_ADMIN = "content_type_admin"; - public final static String PUBLISH = "publish"; - public final static String NEW_ITEM = "new_item"; - public final static String PUBLIC_PAGES = "public_pages"; - public final static String PREVIEW_PAGES = "preview_pages"; - public final static String ADMIN_PAGES = "admin_pages"; - public final static String EDIT_ITEM = "edit_item"; - public final static String SCHEDULE_PUBLICATION = "schedule_publication"; - public final static String DELETE_ITEM = "delete_item"; - public final static String APPLY_WORKFLOW = "apply_workflow"; - public final static String CATEGORIZE_ITEMS = "categorize_items"; - public final static String DELETE_IMAGES = "delete_images"; - public final static String APPLY_ALTERNATE_WORKFLOWS = "apply_alternate_workflows"; - - // CMS Privileges - public final static String CMS_APPLY_ALTERNATE_WORKFLOWS = "cms_apply_alternate_workflows"; - public final static String CMS_CATEGORIZE_ITEMS = "cms_categorize_items"; - public final static String CMS_CATEGORY_ADMIN = "cms_category_admin"; - public final static String CMS_CONTENT_TYPE_ADMIN = "cms_content_type_admin"; - public final static String CMS_DELETE_ITEM = "cms_delete_item"; - public final static String CMS_EDIT_ITEM = "cms_edit_item"; - public final static String CMS_ITEM_ADMIN = "cms_item_admin"; - public final static String CMS_LIFECYCLE_ADMIN = "cms_lifecycle_admin"; - public final static String CMS_NEW_ITEM = "cms_new_item"; - public final static String CMS_PREVIEW_ITEM = "cms_preview_item"; - public final static String CMS_PUBLISH = "cms_publish"; - public final static String CMS_APPROVE_ITEM = "cms_approve_item"; - public final static String CMS_READ_ITEM = "cms_read_item"; - public final static String CMS_STAFF_ADMIN = "cms_staff_admin"; - public final static String CMS_WORKFLOW_ADMIN = "cms_workflow_admin"; -} diff --git a/ccm-cms/src/main/resources/com/arsdigita/cms/util/Util.java b/ccm-cms/src/main/resources/com/arsdigita/cms/util/Util.java deleted file mode 100755 index fd90026ce..000000000 --- a/ccm-cms/src/main/resources/com/arsdigita/cms/util/Util.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2003-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.util; - -import com.arsdigita.runtime.ConfigError; -import org.apache.oro.text.perl.Perl5Util; - -/** - * Utility functions for use by installer classes. - * - * @author Jon Orris (jorris@redhat.com) - * @version $Revision: #6 $ $DateTime: 2004/08/17 23:15:09 $ - */ - -public class Util { - public static void validateURLParameter(String name, String value) - throws ConfigError { - - final String pattern = "/[^A-Za-z_0-9\\-]+/"; - Perl5Util util = new Perl5Util(); - if ( util.match(pattern, value) ) { - throw new ConfigError - ("The \"" + name + "\" parameter must contain only " + - " alpha-numeric characters, underscores, and/or hyphens."); - } - } - -} diff --git a/ccm-cms/src/main/resources/org/librecms/CmsResources.properties b/ccm-cms/src/main/resources/org/librecms/CmsResources.properties index 1aacc9a4b..c4843e013 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsResources.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsResources.properties @@ -280,3 +280,4 @@ cms.ui.authoring.workflow=Select a workflow cms.ui.create=Create cms.contenttypes.ui.summary=Summary cms.contenttypes.ui.newsitem.date\ =Release date +cms.contenttypes.ui.event.start_date=Start date diff --git a/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties b/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties index fec8f7c7b..441c22b01 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsResources_de.properties @@ -278,3 +278,4 @@ cms.ui.authoring.workflow=Arbeitsablauf ausw\u00e4hlen cms.ui.create=Anlegen cms.contenttypes.ui.summary=Zusammenfassung cms.contenttypes.ui.newsitem.date\ =Erscheinungsdatum +cms.contenttypes.ui.event.start_date=Anfangsdatum diff --git a/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties b/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties index 0af3b51f4..faefa8ff6 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsResources_fr.properties @@ -237,3 +237,4 @@ cms.ui.authoring.workflow=Select a workflow cms.ui.create=Create cms.contenttypes.ui.summary=Summary cms.contenttypes.ui.newsitem.date\ =Release date +cms.contenttypes.ui.event.start_date=Start date