diff --git a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderContentTypeBlockForm.java b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderContentTypeBlockForm.java index 280a8bb0f..cef802bcb 100755 --- a/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderContentTypeBlockForm.java +++ b/ccm-atoz/src/com/arsdigita/atoz/ui/admin/CategoryProviderContentTypeBlockForm.java @@ -87,7 +87,7 @@ public class CategoryProviderContentTypeBlockForm extends Form { while (ctc.next()) { ContentType contentType = ctc.getContentType(); optionGroup.addOption(new Option(contentType.getID() - .toString(), contentType.getLabel())); + .toString(), contentType.getName())); } } }); diff --git a/ccm-cms-assets-dublincore/src/com/arsdigita/cms/contentassets/ui/DublinCoreSummary.java b/ccm-cms-assets-dublincore/src/com/arsdigita/cms/contentassets/ui/DublinCoreSummary.java index 14adacd9c..f12661437 100755 --- a/ccm-cms-assets-dublincore/src/com/arsdigita/cms/contentassets/ui/DublinCoreSummary.java +++ b/ccm-cms-assets-dublincore/src/com/arsdigita/cms/contentassets/ui/DublinCoreSummary.java @@ -229,14 +229,14 @@ public class DublinCoreSummary extends ColumnPanel { m_rights.setLabel(dces.getRights(), state); } - m_documentType.setLabel(item.getContentType().getLabel(), state); + m_documentType.setLabel(item.getContentType().getName(), state); m_language.setLabel(item.getLanguage(), state); if (dces != null) { m_dateValid.setLabel(dces.getDate(), state); - // m_keywords.setLabel(dces.getKeywords(), state); will be Subject! + // m_keywords.setName(dces.getKeywords(), state); will be Subject! } super.generateXML(state, parent); diff --git a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources.properties b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources.properties index 2b31357bb..88a18d2ee 100644 --- a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources.properties +++ b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources.properties @@ -42,3 +42,5 @@ publicpersonalprofile.ui.misc=Miscellaneous publicpersonalprofile.ui.misc.edit=Edit miscellaneous publicpersonalprofile.ui.misc.title=Miscellaneous publicpersonalprofile.ui.no_nav_items=No navigation entries defined +#Fixed Key! Defined in class ContentTypes#getLabel() +cms.contenttypes.publicpersonalprofile.type_label=Public Personal Profile diff --git a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources_de.properties b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources_de.properties index 36278b380..06dd8e350 100644 --- a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources_de.properties +++ b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/PublicPersonalProfileResources_de.properties @@ -42,3 +42,5 @@ publicpersonalprofile.ui.misc=Sonstiges publicpersonalprofile.ui.misc.edit=Sonstiges bearbeiten publicpersonalprofile.ui.misc.title=Sonstiges publicpersonalprofile.ui.no_nav_items=Keine Navigationspunkte definiert +#Fixed Key! Defined in class ContentTypes#getLabel() +cms.contenttypes.publicpersonalprofile.type_label=\u00d6ffentliches Pers\u00f6nliches Profil diff --git a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/PublicPersonalProfileCreate.java b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/PublicPersonalProfileCreate.java index 3b3d50ff2..9b8f305c6 100644 --- a/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/PublicPersonalProfileCreate.java +++ b/ccm-cms-publicpersonalprofile/src/com/arsdigita/cms/contenttypes/ui/PublicPersonalProfileCreate.java @@ -86,7 +86,7 @@ public class PublicPersonalProfileCreate extends PageCreate { add(m_workflowSection, ColumnPanel.INSERT); add(new Label(GlobalizationUtil.globalize( "cms.ui.authoring.content_type"))); - add(new Label(type.getLabel())); // the title or name of the type + add(new Label(type.getName())); // the title or name of the type add(new Label(GlobalizationUtil.globalize("cms.ui.language.field"))); add(new LanguageWidget(LANGUAGE)); diff --git a/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources.properties b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources.properties new file mode 100644 index 000000000..6fef43fbf --- /dev/null +++ b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.address.type_label=Address diff --git a/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_de.properties b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_de.properties new file mode 100644 index 000000000..0487d02fd --- /dev/null +++ b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_de.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.address.type_label=Adresse diff --git a/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_en.properties b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_en.properties new file mode 100644 index 000000000..6fef43fbf --- /dev/null +++ b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_en.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.address.type_label=Address diff --git a/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_fr.properties b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_fr.properties new file mode 100644 index 000000000..6fef43fbf --- /dev/null +++ b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/AddressResources_fr.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.address.type_label=Address diff --git a/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources.properties b/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources.properties index dfbfce67c..2374210ab 100755 --- a/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources.properties +++ b/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources.properties @@ -8,3 +8,5 @@ cms.contenttypes.ui.agenda.attendees=Attendees: cms.contenttypes.ui.agenda.subject_items=Subject Items: cms.contenttypes.ui.agenda.contact_info=Contact Information: cms.contenttypes.ui.agenda.creation_date=Creation Date: +#Fixed, defined by class ContentType +cms.contenttypes.agenda.type_label=Agenda diff --git a/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources_de.properties b/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources_de.properties index e05e439d4..a90cf1945 100755 --- a/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources_de.properties +++ b/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/AgendaResources_de.properties @@ -8,3 +8,5 @@ cms.contenttypes.ui.agenda.attendees=Teilnehmer: cms.contenttypes.ui.agenda.subject_items=Themen: cms.contenttypes.ui.agenda.contact_info=Kontakt Information: cms.contenttypes.ui.agenda.creation_date=Erstellungsdatum: +#Fixed, defined by class ContentType +cms.contenttypes.agenda.type_label=Ablaufplan diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources.properties b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources.properties new file mode 100644 index 000000000..49f91980d --- /dev/null +++ b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.article.type_label=Article diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_de.properties b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_de.properties new file mode 100644 index 000000000..178a3270f --- /dev/null +++ b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_de.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.article.type_label=Artikel diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_en.properties b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_en.properties new file mode 100644 index 000000000..49f91980d --- /dev/null +++ b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_en.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.article.type_label=Article diff --git a/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_fr.properties b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_fr.properties new file mode 100644 index 000000000..98dab53b0 --- /dev/null +++ b/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ArticleResources_fr.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.article.type_label=Translate: Article diff --git a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources.properties b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources.properties index 4eeae5d9f..4751efe86 100755 --- a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources.properties +++ b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources.properties @@ -1 +1,2 @@ cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Bookmark diff --git a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_de.properties b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_de.properties index 4eeae5d9f..5e03a1558 100755 --- a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_de.properties +++ b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_de.properties @@ -1 +1,2 @@ cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Lesezeichen diff --git a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_en.properties b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_en.properties index 4eeae5d9f..4751efe86 100755 --- a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_en.properties +++ b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_en.properties @@ -1 +1,2 @@ cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Bookmark diff --git a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_fr.properties b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_fr.properties index 4eeae5d9f..4751efe86 100755 --- a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_fr.properties +++ b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/BookmarkResources_fr.properties @@ -1 +1,2 @@ cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Bookmark diff --git a/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources.properties b/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources.properties new file mode 100644 index 000000000..b0a8d2393 --- /dev/null +++ b/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources.properties @@ -0,0 +1,2 @@ +#Fixed key, defined in class ContentTypes +cms.contenttypes.contact.type_label=Contact diff --git a/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources_de.properties b/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources_de.properties new file mode 100644 index 000000000..3086eba11 --- /dev/null +++ b/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources_de.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.contact.type_label=Kontakt diff --git a/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources_fr.properties b/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources_fr.properties new file mode 100644 index 000000000..9c06247ae --- /dev/null +++ b/ccm-cms-types-contact/src/com/arsdigita/cms/contenttypes/ContactResources_fr.properties @@ -0,0 +1,5 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +cms.contenttypes.contact.type_label=Contact diff --git a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources.properties b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources.properties index ae40d83b0..267974974 100644 --- a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources.properties +++ b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources.properties @@ -75,3 +75,4 @@ cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Section to be delet cms.contenttypes.ui.decisiontree.options.delete_option_msg=Option to be deleted: "{0}" cms.contenttypes.ui.decisiontree.options.delete_button=Delete cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled +cms.contenttypes.decisiontree.type_label=Decision Tree diff --git a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_de.properties b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_de.properties index 89c6f9c34..6185b56c4 100644 --- a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_de.properties +++ b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_de.properties @@ -75,3 +75,4 @@ cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Zu l\u00f6schende S cms.contenttypes.ui.decisiontree.options.delete_option_msg=Zu l\u00f6schende Option: "{0}" cms.contenttypes.ui.decisiontree.options.delete_button=Entfernen cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled +cms.contenttypes.decisiontree.type_label=Entscheidungsbaum diff --git a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_en.properties b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_en.properties index 0e4bbd851..a3dd7ba52 100644 --- a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_en.properties +++ b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_en.properties @@ -75,3 +75,4 @@ cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Section to be delet cms.contenttypes.ui.decisiontree.options.delete_option_msg=Option to be deleted: "{0}" cms.contenttypes.ui.decisiontree.options.delete_button=Delete cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled +cms.contenttypes.decisiontree.type_label=Decision Tree diff --git a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_fr.properties b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_fr.properties index 0e4bbd851..a3dd7ba52 100644 --- a/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_fr.properties +++ b/ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_fr.properties @@ -75,3 +75,4 @@ cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Section to be delet cms.contenttypes.ui.decisiontree.options.delete_option_msg=Option to be deleted: "{0}" cms.contenttypes.ui.decisiontree.options.delete_button=Delete cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled +cms.contenttypes.decisiontree.type_label=Decision Tree diff --git a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources.properties b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources.properties index 074c5d058..b5de8b928 100755 --- a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources.properties +++ b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources.properties @@ -20,3 +20,5 @@ cms.contenttypes.ui.event.link_to_map=Link to Map cms.contenttypes.ui.event.cost=Cost: #Probably not used! cms.contenttypes.ui.event.there_are_no_events=There are no events. +cms.contenttypes.event.type_label=Event +cms.contenttypes.event_type_not_registered=Type not registered diff --git a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_de.properties b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_de.properties index 53a6bc9de..cc06c307a 100755 --- a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_de.properties +++ b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_de.properties @@ -21,3 +21,5 @@ cms.contenttypes.ui.event.event_type=Veranstaltungs-Typ: cms.contenttypes.ui.event.link_to_map=Link zur Karte cms.contenttypes.ui.event.cost=Kosten: cms.contenttypes.ui.event.there_are_no_events=Es sind keine Veranstaltungen vorhanden. +cms.contenttypes.event.type_label=Veranstaltung +cms.contenttypes.event_type_not_registered=Typ nicht registriert diff --git a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_fr.properties b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_fr.properties index 6b996efe3..6b198e62c 100755 --- a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_fr.properties +++ b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/EventResources_fr.properties @@ -22,3 +22,4 @@ cms.contenttypes.ui.event.event_type=Event Type: cms.contenttypes.ui.event.link_to_map=Link to Map cms.contenttypes.ui.event.cost=Cost: cms.contenttypes.ui.event.there_are_no_events=Il n'y a aucun \u00e9venement +cms.contenttypes.event.type_label=Event diff --git a/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml b/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml index 4ff0f8115..587f22ca2 100755 --- a/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml +++ b/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml @@ -11,12 +11,12 @@ objectType="com.arsdigita.cms.contenttypes.FAQItem" classname="com.arsdigita.cms.contenttypes.FAQItem"> - - --> + + createComponent="com.arsdigita.cms.contenttypes.ui.authoring.FAQItemCreate"> A Content Type defines the characteristics of a content @@ -60,6 +61,12 @@ import java.util.StringTokenizer; */ public class ContentType extends ACSObject { + /** Internal logger instance to faciliate debugging. Enable logging output + * by editing /WEB-INF/conf/log4j.properties int hte runtime environment + * and set com.arsdigita.cms.ui.authoring.NewItemForm=DEBUG by uncommenting + * or adding the line. */ + private static final Logger s_log = Logger.getLogger(ContentType.class); + public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.ContentType"; public static final String OBJECT_TYPE = "associatedObjectType"; @@ -153,29 +160,71 @@ public class ContentType extends ACSObject { public void setAssociatedObjectType(String objType) { set(OBJECT_TYPE, objType); } - - /** - * Fetches the label for the content type. - * - * @return The label - */ - public String getLabel() { - return (String) get(LABEL); - } - public GlobalizedMessage getTypeLabel() { - GlobalizedMessage label = null; + /** + * Fetches the label for the content type. The label is a globalized + * notation displayed to the user to identify the content type. As an + * example a content type named "Article" (as in getName()) will be + * displayed in an english environment as the label "Article", in + * German as "Artikel", etc. + * + * The label is retrieved from content type's resources. The message uses + * some convention to retrieve the message key and resource bundle. + * + * Client classes may overwrite the method to provide a label from a + * diffrent source. + * + * @return The (globalized) label. + */ + public GlobalizedMessage getLabel() { + + // We assume the name of the resource bundle is the same as the + // ObjectType "Resources" appended. + String objectTypeName = getAssociatedObjectType(); + if (s_log.isDebugEnabled()) { + s_log.debug( + "Object Type is " + objectTypeName ); + } + String bundleName = objectTypeName.concat("Resources"); + // We assume the name of the key is the same as the ObjectType + // minus the domain part ("com.arsdigita.") and staring with "cms" + // and ".type_label" appended + int keyBegin = objectTypeName.indexOf("cms"); + String labelKey = objectTypeName.substring(keyBegin) + .concat(".type_label") + .toLowerCase(); + + // Create the globalized label + GlobalizedMessage label = new GlobalizedMessage(labelKey, bundleName); return label; } /** - * Sets the label for this content type. + * Fetches the name for the content type. The name is a fixed String, which + * 'names' a content type and is not localizible. It is stored in the + * database and a symbolic name for the formal ID. It may contain any + * characters but is preferable an english term. Examples are "FAQ item" or + * "Article" or "Multipart Aricle". It has to be unique system-wide. * - * @param label The label + * @return The label */ - public void setLabel(String label) { - set(LABEL, label); + public String getName() { + return (String) get(LABEL); + } + + /** + * Sets the name for this content type. The name is a fixed String. + * @see getName() for additional details. + * + * The name is stored in the database. In the database this property is + * stored under 'label', when globliation was not an issue. + * The Method is primarly used in the initial loading step. + * + * @param name The label + */ + public void setName(String name) { + set(LABEL, name); } /** diff --git a/ccm-cms/src/com/arsdigita/cms/ContentTypeCollection.java b/ccm-cms/src/com/arsdigita/cms/ContentTypeCollection.java index 750429971..ce7343495 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentTypeCollection.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentTypeCollection.java @@ -38,6 +38,7 @@ public class ContentTypeCollection extends DomainCollection { /** * Constructor. * + * @param dataCollection */ public ContentTypeCollection(DataCollection dataCollection) { super(dataCollection); @@ -67,7 +68,9 @@ public class ContentTypeCollection extends DomainCollection { * Returns a DomainObject for the current position in * the collection. * + * @return */ + @Override public DomainObject getDomainObject() { return new ContentType(m_dataCollection.getDataObject()); } @@ -76,6 +79,7 @@ public class ContentTypeCollection extends DomainCollection { * Returns a LifecycleDefinition for the current position in * the collection. * + * @return */ public ContentType getContentType() { return (ContentType) getDomainObject(); @@ -84,6 +88,7 @@ public class ContentTypeCollection extends DomainCollection { /** * Reset this collection */ + @Override public void reset() { m_dataCollection.reset(); } diff --git a/ccm-cms/src/com/arsdigita/cms/ContentTypeWorkflowTemplate.java b/ccm-cms/src/com/arsdigita/cms/ContentTypeWorkflowTemplate.java index b890919bd..d16acbf10 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentTypeWorkflowTemplate.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentTypeWorkflowTemplate.java @@ -118,7 +118,7 @@ public class ContentTypeWorkflowTemplate extends DomainObject { (new OID(WorkflowTemplate.BASE_DATA_OBJECT_TYPE, id)); } catch (DataObjectNotFoundException e) { s_log.debug("There is no default workflow template for CT " + - type.getLabel() + + type.getName() + " in section " + section.getName()); return null; diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java index def8ffb46..40e25f076 100755 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContentTypeHelperImpl.java @@ -199,7 +199,7 @@ public class ContentTypeHelperImpl implements ContentTypeHelper { s_log.debug("making new content type"); m_type = ContentType.findByAssociatedObjectType(m_objectType); - m_type.setLabel(m_label); + m_type.setName(m_label); m_type.setDescription(m_description); m_type.save(); } catch (DataObjectNotFoundException e) { @@ -214,7 +214,7 @@ public class ContentTypeHelperImpl implements ContentTypeHelper { // you need to use labelKey, labelBundle, descriptionKey // and descriptionBundle m_type = new ContentType(); - m_type.setLabel(m_label); + m_type.setName(m_label); m_type.setDescription(m_description); m_type.setClassName(m_className); m_type.setAssociatedObjectType(m_objectType); diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddress.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddress.java index b5c2ff83e..35b90dc31 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddress.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddress.java @@ -21,7 +21,9 @@ package com.arsdigita.cms.contenttypes; import com.arsdigita.globalization.LocaleNegotiator; import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; import com.arsdigita.util.Assert; @@ -209,4 +211,5 @@ public class GenericAddress extends ContentPage { return countryNames; } + } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressCreate.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressCreate.java index 45b450c63..d3f13a25f 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressCreate.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressCreate.java @@ -15,8 +15,8 @@ import com.arsdigita.cms.ui.authoring.PageCreate; import java.util.Date; /** - * Special create step for GenericAddress, creating a {@link GenericAddressBundle} instead of a - * Content Bundle + * Special create step for GenericAddress, creating a {@link GenericAddressBundle} + * instead of a Content Bundle * * @author Jens Pelzetter * @version $Id$ diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonCreate.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonCreate.java index 951f46625..69ea30716 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonCreate.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonCreate.java @@ -63,7 +63,7 @@ public class GenericPersonCreate extends PageCreate { m_workflowSection = new ApplyWorkflowFormSection(type); add(m_workflowSection, ColumnPanel.INSERT); add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.content_type"))); - add(new Label(type.getLabel())); + add(new Label(type.getName())); //add(new Label(GlobalizationUtil.globalize("cms.ui.language.field"))); //add(new LanguageWidget(LANGUAGE)); final LanguageWidget languageWidget = new LanguageWidget(LANGUAGE); diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemDispatcher.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemDispatcher.java index d06b5d2ab..6a09ec388 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemDispatcher.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemDispatcher.java @@ -179,7 +179,7 @@ public class ContentItemDispatcher implements Dispatcher { s_log.debug("updating mapping for item " + item.getName() + " with ID " + item.getID() + " in section " + section.getName() + - " of type " + item.getContentType().getLabel() + + " of type " + item.getContentType().getName() + " to template " + sPath); } @@ -199,7 +199,7 @@ public class ContentItemDispatcher implements Dispatcher { ContentType type, Template t) { s_log.debug("updating cache for section " + section.getName() + - " and type " + type.getLabel()); + " and type " + type.getName()); //get all the items in the section ItemCollection items = section.getItems(); @@ -258,7 +258,7 @@ public class ContentItemDispatcher implements Dispatcher { s_log.debug("updating mapping for item " + item.getName() + " with ID " + item.getID() + " in section " + item.getContentSection().getName() + - " of type " + item.getContentType().getLabel() + + " of type " + item.getContentType().getName() + " to template " + sTemplatePath); cachePut(item.getID(), sTemplatePath); } diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java index 1a8bd2cb7..29e87838c 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java @@ -286,7 +286,7 @@ public class SimpleXMLGenerator implements XMLGenerator { final Element element = startElement(useContext, parent); final Element additionalAttrs = UDItemElement(useContext); - element.addAttribute("type", UDItem.getContentType().getLabel()); + element.addAttribute("type", UDItem.getContentType().getName()); element.addAttribute("id", UDItem.getID().toString()); element.addAttribute("name", UDItem.getName()); element.addAttribute("title", UDItem.getTitle()); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ContentItemNavbar.java b/ccm-cms/src/com/arsdigita/cms/ui/ContentItemNavbar.java index 2e1b734e2..fcfd849f4 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/ContentItemNavbar.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ContentItemNavbar.java @@ -82,7 +82,7 @@ public class ContentItemNavbar extends CMSContainer { element.addAttribute("sectionURL", section.getURL() + PageLocations.SECTION_PAGE + returnFolder); - element.addAttribute("type", type.getLabel()); + element.addAttribute("type", type.getName()); element.addAttribute("name", item.getDisplayName()); exportAttributes(element); parent.addContent(element); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ContentItemPage.java b/ccm-cms/src/com/arsdigita/cms/ui/ContentItemPage.java index d50485781..86ddd7d21 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/ContentItemPage.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ContentItemPage.java @@ -537,7 +537,7 @@ public class ContentItemPage extends CMSPage implements ActionListener { protected Element generateXMLHelper(PageState state, Document parent) { Element page = super.generateXMLHelper(state, parent); Element contenttype = page.newChildElement("bebop:contentType", BEBOP_XML_NS); - contenttype.setText(m_item.getContentItem(state).getContentType().getLabel()); + contenttype.setText(m_item.getContentItem(state).getContentType().getName()); return page; } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java b/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java index cfc411cca..e9609fd77 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/FlatItemList.java @@ -273,9 +273,11 @@ public class FlatItemList extends SegmentedPanel // ACSObject parent = currentFolder.getParent(); DataObject context = PermissionService.getContext(currentFolder); if (context == null) { - target.setLabel(GlobalizationUtil.globalize("cms.ui.restore_default_permissions")); + target.setLabel(GlobalizationUtil + .globalize("cms.ui.restore_default_permissions")); } else { - target.setLabel((String) GlobalizationUtil.globalize("cms.ui.use_custom_permissions").localize()); + target.setLabel(GlobalizationUtil + .globalize("cms.ui.use_custom_permissions")); } } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java b/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java index 916268812..012f8ac49 100644 --- a/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java @@ -302,7 +302,7 @@ public class ItemSearchFlatBrowsePane extends SimpleContainer { case 1: return getItemPath(currentItem); case 2: - return currentItem.getContentType().getLabel(); + return currentItem.getContentType().getName(); default: return null; } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/NewItemForm.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/NewItemForm.java index 1c225d498..350dc35c3 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/NewItemForm.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/NewItemForm.java @@ -65,7 +65,6 @@ public abstract class NewItemForm extends Form { * or adding the line. */ private static final Logger s_log = Logger.getLogger(NewItemForm.class); - public static String DP_TYPE_PREFIX = "com.arsdigita.dp."; private final SingleSelect m_typeWidget; private final Submit m_submit; private final Label m_emptyLabel; @@ -169,16 +168,9 @@ public abstract class NewItemForm extends Form { } if (list) { - //for dp content type label localization - //String t = type.getAssociatedObjectType(); - String cn = type.getClassName(); - String l = type.getLabel(); - if (cn.startsWith(DP_TYPE_PREFIX, 0)) { - o.addOption(new Option(type.getID().toString(), - new Label(GlobalizationUtil.globalize(l.replace(' ', '_'))))); - } else { - o.addOption(new Option(type.getID().toString(), type.getLabel())); - } + // o.addOption(new Option(type.getID().toString(), type.getName())); + o.addOption( new Option(type.getID().toString(), + new Label(type.getLabel())) ); } } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageCreate.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageCreate.java index 721201478..28e29795d 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageCreate.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageCreate.java @@ -105,7 +105,7 @@ public class PageCreate extends BasicPageForm add(m_workflowSection, ColumnPanel.INSERT); /* content type */ add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.content_type"))); - add(new Label(type.getLabel())); + add(new Label(type.getName())); /* language selection */ add(new Label(GlobalizationUtil.globalize("cms.ui.language.field"))); add(new LanguageWidget(LANGUAGE)); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageEditDynamic.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageEditDynamic.java index b50552f4a..5fb852002 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageEditDynamic.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/PageEditDynamic.java @@ -254,7 +254,7 @@ public class PageEditDynamic extends SecurityPropertyEditor { public PageEditDynamicForm(ItemSelectionModel itemModel){ //overrides the parent constructor otherwise the submit/cancel //will be located above the persistent widgets - super(m_originatingType.getLabel() + "PageEditDynamicForm", + super(m_originatingType.getName() + "PageEditDynamicForm", new ColumnPanel(3), itemModel); m_itemModel = itemModel; diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoringkit/KitPanel.java b/ccm-cms/src/com/arsdigita/cms/ui/authoringkit/KitPanel.java index 3b5827455..4856281b9 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/authoringkit/KitPanel.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/authoringkit/KitPanel.java @@ -230,7 +230,7 @@ public class KitPanel extends BoxPanel ContentType type = m_type.getContentType(s); t.setFontWeight(Label.BOLD); - t.setLabel(type.getLabel()); + t.setLabel(type.getName()); } }; diff --git a/ccm-cms/src/com/arsdigita/cms/ui/category/CategoryItemsBrowser.java b/ccm-cms/src/com/arsdigita/cms/ui/category/CategoryItemsBrowser.java index 2f690a0e2..00ac15e07 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/category/CategoryItemsBrowser.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/category/CategoryItemsBrowser.java @@ -189,7 +189,7 @@ public class CategoryItemsBrowser extends Grid { ContentType t = p.getContentType(); if(t != null) { - c = new Label(t.getLabel()); + c = new Label(t.getName()); } else { c = new Label(GlobalizationUtil.globalize("cms.ui.category.item")); } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/contentcenter/TasksPanel.java b/ccm-cms/src/com/arsdigita/cms/ui/contentcenter/TasksPanel.java index 4dd7fa6da..44f2f4a39 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/contentcenter/TasksPanel.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/contentcenter/TasksPanel.java @@ -189,7 +189,7 @@ public class TasksPanel extends CMSContainer { StringBuilder buf = new StringBuilder( GlobalizationUtil .globalize("cms.ui.create").localize() + " "); - buf.append(type.getLabel()); + buf.append(type.getName()); buf.append(" in "); buf.append(sec.getName()); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/search/ContentTypeFilterWidget.java b/ccm-cms/src/com/arsdigita/cms/ui/search/ContentTypeFilterWidget.java index 353e5d454..6165768b1 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/search/ContentTypeFilterWidget.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/search/ContentTypeFilterWidget.java @@ -170,7 +170,7 @@ public class ContentTypeFilterWidget extends FilterWidget { for (int i = 0; i < widgetTypes.length; i++) { Element type = Search.newElement("contentType"); type.addAttribute("name", widgetTypes[i].getAssociatedObjectType()); - type.addAttribute("title", widgetTypes[i].getLabel()); + type.addAttribute("title", widgetTypes[i].getName()); for (int j = 0; j < types.length; j++) { if (types[j].equals(widgetTypes[i].getAssociatedObjectType())) { diff --git a/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplates.java b/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplates.java index c888974aa..eaf788967 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplates.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplates.java @@ -368,7 +368,7 @@ public class CategoryTemplates extends CMSContainer { while (types.next()) { ContentType type = types.getContentType(); target.addOption(new Option(type.getID().toString(), - type.getLabel())); + type.getName())); } } }); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplatesListing.java b/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplatesListing.java index 7d4e6091a..decdc66ac 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplatesListing.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/templates/CategoryTemplatesListing.java @@ -114,7 +114,7 @@ public abstract class CategoryTemplatesListing extends TemplatesListing { int row, int column) { ContentType type = (ContentType)DomainObjectFactory.newInstance((DataObject)value); - return new Label(type.getLabel()); + return new Label(type.getName()); } } } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/AddContentItemElement.java b/ccm-cms/src/com/arsdigita/cms/ui/type/AddContentItemElement.java index a1c6b41d2..d58a7a0d1 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/AddContentItemElement.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/AddContentItemElement.java @@ -134,7 +134,7 @@ public class AddContentItemElement extends ElementAddForm { contentTypes.addOrder(ContentType.LABEL); while (contentTypes.next()) { ContentType type = contentTypes.getContentType(); - t.addOption(new Option(type.getID().toString(), type.getLabel())); + t.addOption(new Option(type.getID().toString(), type.getName())); } } } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/AddType.java b/ccm-cms/src/com/arsdigita/cms/ui/type/AddType.java index ba9973991..a24aa0303 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/AddType.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/AddType.java @@ -196,7 +196,7 @@ public class AddType extends CMSForm isNew = true; } - contentType.setLabel(label); + contentType.setName(label); contentType.setDescription(description); contentType.setAssociatedObjectType(objectType); contentType.setClassName(className); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypeListModelBuilder.java b/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypeListModelBuilder.java index f3adc478c..a59070f52 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypeListModelBuilder.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypeListModelBuilder.java @@ -56,7 +56,7 @@ class ContentTypeListModelBuilder extends LockableImpl } public Object getElement() { - return m_types.getContentType().getLabel(); + return m_types.getContentType().getName(); } public String getKey() { diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypePropertyList.java b/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypePropertyList.java index 13f3ba453..352c033bb 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypePropertyList.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/ContentTypePropertyList.java @@ -60,7 +60,7 @@ class ContentTypePropertyList extends PropertyList { CMS.getContext().getContentSection(); props.add(new Property(gz("cms.ui.name"), - type.getLabel())); + type.getName())); props.add(new Property(gz("cms.ui.description"), type.getDescription())); props.add(new Property(gz("cms.ui.type.parent"), @@ -87,7 +87,7 @@ class ContentTypePropertyList extends PropertyList { } else { try { return ContentType.findByAssociatedObjectType - (parent.getQualifiedName()).getLabel(); + (parent.getQualifiedName()).getName(); } catch (DataObjectNotFoundException donfe) { return parent.getName(); } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java b/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java index e3df1d0f3..ee5f3363a 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java @@ -216,7 +216,7 @@ public class CreateType extends CMSForm boolean dupe = false; while (contentTypes.next() && dupe == false) { - if (contentTypes.getContentType().getLabel().compareTo(typeLabel) == 0) { + if (contentTypes.getContentType().getName().compareTo(typeLabel) == 0) { dupe = true; } } @@ -310,7 +310,7 @@ public class CreateType extends CMSForm isNew = true; } - contentType.setLabel(label); + contentType.setName(label); contentType.setDescription(description); contentType.setClassName(parentContentClassname); contentType.setAssociatedObjectType(dot.getObjectType().getQualifiedName()); @@ -413,12 +413,12 @@ public class CreateType extends CMSForm } } if (stepOrdering == 1) { - kit.createStep(type.getLabel() + " Basic Properties", + kit.createStep(type.getName() + " Basic Properties", type.getAssociatedObjectType(), "com.arsdigita.cms.ui.authoring.PageEditDynamic", new BigDecimal(stepOrdering)); } else { - kit.createStep(type.getLabel() + " Basic Properties", + kit.createStep(type.getName() + " Basic Properties", type.getAssociatedObjectType(), "com.arsdigita.cms.ui.authoring.SecondaryPageEditDynamic", new BigDecimal(stepOrdering)); @@ -457,7 +457,7 @@ public class CreateType extends CMSForm contentTypes.addOrder(ContentType.LABEL); while (contentTypes.next()) { ContentType type = contentTypes.getContentType(); - Label label = new Label(type.getLabel()); + Label label = new Label(type.getName()); if (type.isHidden()) { label.setFontWeight(Label.ITALIC); } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/EditType.java b/ccm-cms/src/com/arsdigita/cms/ui/type/EditType.java index 54f807e31..411cc72f9 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/EditType.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/EditType.java @@ -174,7 +174,7 @@ public class EditType extends CMSForm ContentType type = getContentType(state); BigDecimal id = type.getID(); - String label = type.getLabel(); + String label = type.getName(); String description = type.getDescription(); data.put(m_id.getName(), id); @@ -238,7 +238,7 @@ public class EditType extends CMSForm "Failed to edit the content type: " + key + " " + e.getMessage(), e); } - type.setLabel(label); + type.setName(label); type.setDescription(description); type.save(); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/SelectType.java b/ccm-cms/src/com/arsdigita/cms/ui/type/SelectType.java index 38fed9aba..322c6f560 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/SelectType.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/SelectType.java @@ -104,7 +104,7 @@ public class SelectType extends CMSForm while (contentTypes.next()) { ContentType contentType = contentTypes.getContentType(); - Label label = new Label(contentType.getLabel()); + Label label = new Label(contentType.getName()); if (contentType.isHidden()) { label.setFontWeight(Label.ITALIC); } diff --git a/ccm-cms/src/com/arsdigita/cms/workflow/CMSTaskType.java b/ccm-cms/src/com/arsdigita/cms/workflow/CMSTaskType.java index 0978c4e60..681e85246 100755 --- a/ccm-cms/src/com/arsdigita/cms/workflow/CMSTaskType.java +++ b/ccm-cms/src/com/arsdigita/cms/workflow/CMSTaskType.java @@ -175,7 +175,7 @@ public class CMSTaskType extends DomainObject { try { while (generators.next()) { - s_log.debug("specific generator found for " + event + " event on task type " + getName() + " for content type " + item.getContentType().getLabel()); + s_log.debug("specific generator found for " + event + " event on task type " + getName() + " for content type " + item.getContentType().getName()); // generator class available for this specific event and this specific content type generator = ((TaskEventURLGenerator) DomainObjectFactory.newInstance(generators.getDataObject())).getGenerator(); generators.close(); diff --git a/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java b/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java index cb57b2648..b54b94afa 100755 --- a/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java +++ b/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java @@ -44,7 +44,12 @@ import org.apache.log4j.Logger; */ public class GlobalizedMessage { - private static final Logger LOGGER = Logger.getLogger(GlobalizedMessage.class.getName()); + /** Internal logger instance to faciliate debugging. Enable logging output + * by editing /WEB-INF/conf/log4j.properties int hte runtime environment + * and set com.arsdigita.globalization.GlobalizedMessage=DEBUG + * by uncommenting or adding the line. */ + private static final Logger LOGGER = Logger.getLogger(GlobalizedMessage + .class.getName()); private String m_key = ""; private String m_bundleName = ""; private Object[] m_args = null; diff --git a/ccm-docmgr/src/com/arsdigita/cms/docmgr/DocFolderInitializer.java b/ccm-docmgr/src/com/arsdigita/cms/docmgr/DocFolderInitializer.java index 0fa8484cf..c7f804f43 100755 --- a/ccm-docmgr/src/com/arsdigita/cms/docmgr/DocFolderInitializer.java +++ b/ccm-docmgr/src/com/arsdigita/cms/docmgr/DocFolderInitializer.java @@ -21,7 +21,7 @@ public class DocFolderInitializer { ContentType type; type = new ContentType(); - type.setLabel( LABEL ); + type.setName( LABEL ); type.setDescription( DESCRIPTION ); type.setClassName( DocFolder.class.getName() ); type.setAssociatedObjectType( DocFolder.TYPE ); diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java index ab3d07bbe..bfde1d615 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java @@ -281,7 +281,7 @@ public class DublinCoreSummary extends ColumnPanel { m_rights.setLabel(dcItem.getRights(), state); } - m_documentType.setLabel(item.getContentType().getLabel(), state); + m_documentType.setLabel(item.getContentType().getName(), state); m_language.setLabel(item.getLanguage(), state); diff --git a/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ItemListPortletEditor.java b/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ItemListPortletEditor.java index 97330dfb9..8e35403e6 100755 --- a/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ItemListPortletEditor.java +++ b/ccm-navigation/src/com/arsdigita/navigation/ui/portlet/ItemListPortletEditor.java @@ -129,7 +129,7 @@ public class ItemListPortletEditor extends ObjectListPortletEditor { ContentType type = types.getContentType(); target.addOption(new Option(type.getAssociatedObjectType(), - type.getLabel())); + type.getName())); } } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublisherCreate.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublisherCreate.java index a8d3d1c3c..02e4e4ad4 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublisherCreate.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublisherCreate.java @@ -63,7 +63,7 @@ public class PublisherCreate extends PageCreate { add(m_workflowSection, ColumnPanel.INSERT); add(new Label(GlobalizationUtil.globalize( "cms.ui.authoring.content_type"))); - add(new Label(type.getLabel())); + add(new Label(type.getName())); add(new Label(GlobalizationUtil.globalize("cms.ui.language.field"))); add(new LanguageWidget(LANGUAGE)); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/SeriesVolumeAddForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/SeriesVolumeAddForm.java index e25fef20e..6d44bcc2a 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/SeriesVolumeAddForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/SeriesVolumeAddForm.java @@ -111,7 +111,7 @@ public class SeriesVolumeAddForm extends BasicItemForm { } itemSearch.setVisible(state, false); - //selectedVolumeLabel.setLabel(publication.getTitle()); + //selectedVolumeLabel.setName(publication.getTitle()); selectedVolumeLabel.setVisible(state, true); }