From c6836a640e607ff8b3e7c18d4c84f1f8e74f6639 Mon Sep 17 00:00:00 2001 From: tosmers Date: Sun, 22 Feb 2015 18:35:51 +0000 Subject: [PATCH] [UPDATE] Commit error... git-svn-id: https://svn.libreccm.org/ccm/trunk@3262 8810af33-2d31-482b-a856-94f89814c4df --- .../util/ExternalLinkGlobalizedMsg.java | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/util/ExternalLinkGlobalizedMsg.java diff --git a/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/util/ExternalLinkGlobalizedMsg.java b/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/util/ExternalLinkGlobalizedMsg.java new file mode 100644 index 000000000..cf876352c --- /dev/null +++ b/ccm-cms-types-externallink/src/com/arsdigita/cms/contenttypes/util/ExternalLinkGlobalizedMsg.java @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2013 University of Bremen. 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.camden.cms.contenttypes.util; + +import com.arsdigita.globalization.Globalized; +import com.arsdigita.globalization.GlobalizedMessage; + +/** + * Compilation of methods to simplify the handling of globalizing keys. + * Basically it adds the name of package's resource bundle files to the + * globalize methods and forwards to GlobalizedMessage, shortening the + * method invocation in the various application classes. + * + * @author pb + */ +public class EFormGlobalizedMsg implements Globalized { + + /** Name of Java resource files to handle CMS's globalisation. */ + final public static String BUNDLE_NAME = + "com.arsdigita.camden.cms.contenttypes.EFormResources"; + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getTitle() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.title", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getLocation() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.location", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getDescription() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.description", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getName() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.name", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message based on its key and using + * the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage get(String key) { + + return new GlobalizedMessage(key, BUNDLE_NAME); + + } + + +}