From 1af42506ca92652d4a7f4df998e478b424fb5586 Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 9 Jul 2014 17:14:07 +0000 Subject: [PATCH] Enhancments for the localisation of the content center. git-svn-id: https://svn.libreccm.org/ccm/trunk@2745 8810af33-2d31-482b-a856-94f89814c4df --- .../ui/SiteProxyPropertyForm.java | 2 +- ...tSubordinateOrgaUnitAddFormCustomizer.java | 12 +- ...itSubordinateOrgaUnitsTableCustomizer.java | 20 +-- ...UnitSuperiorOrgaUnitAddFormCustomizer.java | 12 +- ...aUnitSuperiorOrgaUnitsTableCustomizer.java | 20 +-- ...zationalUnitSubordinateOrgaUnitsTable.java | 4 +- ...anizationalUnitSuperiorOrgaUnitsTable.java | 4 +- .../ui/SciPublicationsPersonsPersonForm.java | 40 +++-- .../ui/ArticleInJournalPropertyForm.java | 6 - .../ui/PublicationAuthorsTable.java | 22 ++- .../contenttypes/ui/ReviewPropertyForm.java | 1 - .../ui/SciDepartmentProjectsStep.java | 93 +++++------ .../ui/SciDepartmentSubDepartmentsStep.java | 119 +++++++------- .../ui/SciDepartmentSuperDepartmentsStep.java | 99 +++++------- .../ui/SciProjectDepartmentsStep.java | 105 ++++++------ .../ui/SciDepartmentInstitutesStep.java | 125 +++++++------- .../ui/SciInstituteDepartmentsStep.java | 117 +++++++------- .../ui/SciInstituteProjectsStep.java | 115 +++++++------ .../ui/SciProjectInstitutesStep.java | 116 ++++++------- .../SciProjectInvolvedOrganizationsStep.java | 152 +++++++++--------- .../ui/SciProjectSubProjectsStep.java | 107 ++++++------ .../ui/SciProjectSuperProjectsStep.java | 85 +++++----- 22 files changed, 687 insertions(+), 689 deletions(-) diff --git a/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/ui/SiteProxyPropertyForm.java b/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/ui/SiteProxyPropertyForm.java index dcda33941..143f9e03c 100755 --- a/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/ui/SiteProxyPropertyForm.java +++ b/ccm-cms-types-siteproxy/src/com/arsdigita/cms/contenttypes/ui/SiteProxyPropertyForm.java @@ -58,9 +58,9 @@ public class SiteProxyPropertyForm extends BasicPageForm super.addWidgets(); ParameterModel urlParam = new StringParameter("url"); + m_url = new TextField(urlParam); m_url.setLabel(SiteProxyGlobalizationUtil .globalize("cms.contenttypes.ui.siteproxy.url")); - m_url = new TextField(urlParam); m_url.setSize(40); add(m_url); } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer.java index c491f5811..6dcd35b74 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer.java @@ -1,5 +1,7 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.globalization.GlobalizedMessage; + /** * Implementations of this class are used to customize an instance of * {@link GenericOrganizationalUnitSubordinateOrgaUnitAddForm}. Methods ending @@ -18,7 +20,7 @@ public interface GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer { * * @return Label for the item search widget of the add from. */ - String getSelectSubordinateOrgaUnitLabel(); + GlobalizedMessage getSelectSubordinateOrgaUnitLabel(); /** * @@ -40,27 +42,27 @@ public interface GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer { * @return Message to show if the save button has been hit without selecting * an item. */ - String getNothingSelectedMessage(); + GlobalizedMessage getNothingSelectedMessage(); /** * * @return Message to show if the selected item has no suitable language * variant. */ - String getNoSuitableLanguageVariantMessage(); + GlobalizedMessage getNoSuitableLanguageVariantMessage(); /** * * @return Message to show if the selected item is the same as the current * item. */ - String getAddingToItselfMessage(); + GlobalizedMessage getAddingToItselfMessage(); /** * * @return Message to show if the selected item has already been added * as a subordinate organizational unit. */ - String getAlreadyAddedMessage(); + GlobalizedMessage getAlreadyAddedMessage(); } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer.java index 588679edc..0943f24fc 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer.java @@ -19,6 +19,8 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.globalization.GlobalizedMessage; + /** * Implementations of this class are used to customize an instance of * {@link GenericOrganizationalUnitSubordinateOrgaUnitTable}. Methods ending @@ -35,58 +37,58 @@ public interface GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer { /** * @return The label used instead of an empty table. */ - String getEmptyViewLabel(); + GlobalizedMessage getEmptyViewLabel(); /** * * @return Label for the column heading of the first column which shows * the titles of the subordinate organizational units. */ - String getNameColumnLabel(); + GlobalizedMessage getNameColumnLabel(); /** * @return The column heading for the second column which displays delete * links for the associations. */ - String getDeleteColumnLabel(); + GlobalizedMessage getDeleteColumnLabel(); /** * * @return Column heading for the column containing the {@code Up} links * for sorting the subordinate organizational units. */ - String getUpColumnLabel(); + GlobalizedMessage getUpColumnLabel(); /** * * @return Column heading for the column containing the {@code Down} links * for sorting the subordinate organizational units. */ - String getDownColumnLabel(); + GlobalizedMessage getDownColumnLabel(); /** * * @return Label for the delete links. */ - String getDeleteLabel(); + GlobalizedMessage getDeleteLabel(); /** * * @return Label for the up links */ - String getUpLabel(); + GlobalizedMessage getUpLabel(); /** * * @return Label for the down links */ - String getDownLabel(); + GlobalizedMessage getDownLabel(); /** * * @return Text for the confirmation message when deleting an association. */ - String getConfirmRemoveLabel(); + GlobalizedMessage getConfirmRemoveLabel(); /** * diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer.java index ccdcfc892..84c468070 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer.java @@ -1,5 +1,7 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.globalization.GlobalizedMessage; + /** * * @author Jens Pelzetter @@ -11,7 +13,7 @@ public interface GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer { * * @return Label for the item search widget of the add from. */ - String getSelectSuperiorOrgaUnitLabel(); + GlobalizedMessage getSelectSuperiorOrgaUnitLabel(); /** * @@ -33,27 +35,27 @@ public interface GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer { * @return Message to show if the save button has been hit without selecting * an item. */ - String getNothingSelectedMessage(); + GlobalizedMessage getNothingSelectedMessage(); /** * * @return Message to show if the selected item has no suitable language * variant. */ - String getNoSuitableLanguageVariantMessage(); + GlobalizedMessage getNoSuitableLanguageVariantMessage(); /** * * @return Message to show if the selected item is the same as the current * item. */ - String getAddingToItselfMessage(); + GlobalizedMessage getAddingToItselfMessage(); /** * * @return Message to show if the selected item has already been added * as a superior organizational unit. */ - String getAlreadyAddedMessage(); + GlobalizedMessage getAlreadyAddedMessage(); } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer.java index 6cf5d1b20..3aafdb68c 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer.java @@ -1,5 +1,7 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.globalization.GlobalizedMessage; + /** * * @author Jens Pelzetter @@ -10,58 +12,58 @@ public interface GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer { /** * @return The label used instead of an empty table. */ - String getEmptyViewLabel(); + GlobalizedMessage getEmptyViewLabel(); /** * * @return Label for the column heading of the first column which shows * the titles of the superior organizational units. */ - String getNameColumnLabel(); + GlobalizedMessage getNameColumnLabel(); /** * @return The column heading for the second column which displays delete * links for the associations. */ - String getDeleteColumnLabel(); + GlobalizedMessage getDeleteColumnLabel(); /** * * @return Column heading for the column containing the {@code Up} links * for sorting the superior organizational units. */ - String getUpColumnLabel(); + GlobalizedMessage getUpColumnLabel(); /** * * @return Column heading for the column containing the {@code Down} links * for sorting the superior organizational units. */ - String getDownColumnLabel(); + GlobalizedMessage getDownColumnLabel(); /** * * @return Label for the delete links. */ - String getDeleteLabel(); + GlobalizedMessage getDeleteLabel(); /** * * @return Label for the up links */ - String getUpLabel(); + GlobalizedMessage getUpLabel(); /** * * @return Label for the down links */ - String getDownLabel(); + GlobalizedMessage getDownLabel(); /** * * @return Text for the confirmation message when deleting an association. */ - String getConfirmRemoveLabel(); + GlobalizedMessage getConfirmRemoveLabel(); /** * diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSubordinateOrgaUnitsTable.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSubordinateOrgaUnitsTable.java index 88ddc4727..6ff8294aa 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSubordinateOrgaUnitsTable.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSubordinateOrgaUnitsTable.java @@ -282,7 +282,7 @@ public class GenericOrganizationalUnitSubordinateOrgaUnitsTable return label; } else { final ControlLink link = - new ControlLink(customizer.getUpLabel()); + new ControlLink(new Label(customizer.getUpLabel())); return link; } } @@ -324,7 +324,7 @@ public class GenericOrganizationalUnitSubordinateOrgaUnitsTable return label; } else { final ControlLink link = - new ControlLink(customizer.getDownLabel()); + new ControlLink(new Label(customizer.getDownLabel())); return link; } } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSuperiorOrgaUnitsTable.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSuperiorOrgaUnitsTable.java index 5abc76b7f..e804d1df2 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSuperiorOrgaUnitsTable.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitSuperiorOrgaUnitsTable.java @@ -264,7 +264,7 @@ public class GenericOrganizationalUnitSuperiorOrgaUnitsTable extends Table { return label; } else { final ControlLink link = - new ControlLink(customizer.getUpLabel()); + new ControlLink(new Label(customizer.getUpLabel())); return link; } } @@ -294,7 +294,7 @@ public class GenericOrganizationalUnitSuperiorOrgaUnitsTable extends Table { return label; } else { final ControlLink link = - new ControlLink(customizer.getDownLabel()); + new ControlLink(new Label(customizer.getDownLabel())); return link; } } diff --git a/ccm-sci-assets-publicationspersons/src/com/arsdigita/cms/contentassets/ui/SciPublicationsPersonsPersonForm.java b/ccm-sci-assets-publicationspersons/src/com/arsdigita/cms/contentassets/ui/SciPublicationsPersonsPersonForm.java index 24e9cc487..e9e0a9a8a 100644 --- a/ccm-sci-assets-publicationspersons/src/com/arsdigita/cms/contentassets/ui/SciPublicationsPersonsPersonForm.java +++ b/ccm-sci-assets-publicationspersons/src/com/arsdigita/cms/contentassets/ui/SciPublicationsPersonsPersonForm.java @@ -23,6 +23,8 @@ import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormSectionEvent; +import com.arsdigita.bebop.event.PrintEvent; +import com.arsdigita.bebop.event.PrintListener; import com.arsdigita.bebop.form.Option; import com.arsdigita.bebop.form.SingleSelect; import com.arsdigita.bebop.parameters.NotNullValidationListener; @@ -40,6 +42,8 @@ import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.toolbox.GlobalisationUtil; +import com.arsdigita.util.UncheckedWrapperException; +import java.util.TooManyListenersException; /** * @@ -65,8 +69,8 @@ public class SciPublicationsPersonsPersonForm extends BasicItemForm { final GlobalisationUtil globalisationUtil = new SciPublicationsPersonsGlobalisationUtil(); - // add(new Label(globalisationUtil.globalize( - // "com.arsdigita.cms.contentassets.publicationspersons.select_person"))); + // add(new Label(globalisationUtil.globalize( + // "com.arsdigita.cms.contentassets.publicationspersons.select_person"))); itemSearch = new ItemSearchWidget( ITEM_SEARCH, ContentType.findByAssociatedObjectType(GenericPerson.class.getName())); @@ -75,20 +79,34 @@ public class SciPublicationsPersonsPersonForm extends BasicItemForm { itemSearch.setDisableCreatePane(true); add(itemSearch); - // add(new Label(globalisationUtil.globalize( - // "com.arsdigita.cms.contentassets.publicationspersons.select_person_relation"))); + // add(new Label(globalisationUtil.globalize( + // "com.arsdigita.cms.contentassets.publicationspersons.select_person_relation"))); final ParameterModel relationParam = new StringParameter(RELATION); final SingleSelect relationSelect = new SingleSelect(relationParam); relationSelect.addValidationListener(new NotNullValidationListener()); relationSelect.addOption(new Option("", new Label(ContenttypesGlobalizationUtil.globalize( "cms.ui.select_one")))); - final RelationAttributeCollection relations = new RelationAttributeCollection( - SciPublicationsPersonsService.RELATION_ATTRIBUTE); - relations.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().getLanguage()); - while (relations.next()) { - RelationAttribute relation; - relation = relations.getRelationAttribute(); - relationSelect.addOption(new Option(relation.getKey(), relation.getName())); + try { + relationSelect.addPrintListener(new PrintListener() { + + @Override + public void prepare(final PrintEvent event) { + final SingleSelect target = (SingleSelect) event.getTarget(); + final RelationAttributeCollection relations = new RelationAttributeCollection( + SciPublicationsPersonsService.RELATION_ATTRIBUTE); + relations.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale() + .getLanguage()); + while (relations.next()) { + RelationAttribute relation; + relation = relations.getRelationAttribute(); + target.addOption(new Option(relation.getKey(), relation.getName())); + } + + } + + }); + } catch (TooManyListenersException ex) { + throw new UncheckedWrapperException(ex); } relationSelect.setLabel(globalisationUtil.globalize( "com.arsdigita.cms.contentassets.publicationspersons.select_person_relation")); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java index e72d1941b..9ea50a9b1 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertyForm.java @@ -53,7 +53,6 @@ public class ArticleInJournalPropertyForm private static final String REVIEWED = "reviewed"; private ArticleInJournalPropertiesStep m_step; public static final String ID = "ArticleInJournalEdit"; - private Label reviewedLabel; private CheckboxGroup reviewed; public ArticleInJournalPropertyForm(ItemSelectionModel itemModel) { @@ -112,7 +111,6 @@ public class ArticleInJournalPropertyForm "publications.ui.articleinjournal.publicationDate")); add(pubDate); - add(reviewedLabel); reviewed = new CheckboxGroup("reviewedGroup"); reviewed.addOption(new Option(REVIEWED, "")); reviewed.setLabel(PublicationGlobalizationUtil.globalize( @@ -120,10 +118,6 @@ public class ArticleInJournalPropertyForm add(reviewed); } - protected final Label getReviewedLabel() { - return reviewedLabel; - } - protected final CheckboxGroup getReviewed() { return reviewed; } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java index b56292e35..37b3921d5 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java @@ -239,6 +239,8 @@ public class PublicationAuthorsTable ex); if (value instanceof GlobalizedMessage) { return new Label((GlobalizedMessage) value); + } else if(value instanceof Label) { + return (Component) value; } else { return new Label(value.toString()); } @@ -246,12 +248,30 @@ public class PublicationAuthorsTable ContentSection section = author.getContentSection();//CMS.getContext().getContentSection(); ItemResolver resolver = section.getItemResolver(); - Link link = + Link link; + if (value instanceof GlobalizedMessage) { + link = + new Link(new Label((GlobalizedMessage) value), + resolver.generateItemURL(state, + author, + section, + author.getVersion())); + } else if(value instanceof Label) { + link = + new Link((Label) value, + resolver.generateItemURL(state, + author, + section, + author.getVersion())); + } else { + link = new Link(value.toString(), resolver.generateItemURL(state, author, section, author.getVersion())); + } + return link; } else { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertyForm.java index 892ee7122..4716e8b09 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertyForm.java @@ -71,7 +71,6 @@ public class ReviewPropertyForm super.init(fse); final PageState state = fse.getPageState(); - getReviewedLabel().setVisible(state, false); getReviewed().setVisible(state, false); // FormData data = fse.getFormData(); diff --git a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsStep.java b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsStep.java index fad41465b..d02b2e00b 100644 --- a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsStep.java +++ b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsStep.java @@ -23,6 +23,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * Authoring step for editing the associations between a SciDepartment and SciProject items. @@ -51,9 +52,9 @@ public class SciDepartmentProjectsStep extends SimpleEditStep { new GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer() { @Override - public String getSelectSubordinateOrgaUnitLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.select").localize(); + public GlobalizedMessage getSelectSubordinateOrgaUnitLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.select"); } @Override @@ -67,31 +68,27 @@ public class SciDepartmentProjectsStep extends SimpleEditStep { } @Override - public String getNothingSelectedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.select.nothing"); } @Override - public String getNoSuitableLanguageVariantMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.no_suitable_language_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.no_suitable_language_variant"); } @Override - public String getAddingToItselfMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.adding_to_itself"); } @Override - public String getAlreadyAddedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.already_added"); } }); add(ADD_PROJECT_SHEET_NAME, @@ -105,53 +102,49 @@ public class SciDepartmentProjectsStep extends SimpleEditStep { itemModel, new GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.empty_view").localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.empty_view"); } - public String getNameColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.columns.name"). - localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.columns.delete"). - localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.columns.up").localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.columns.up"); } - public String getDownColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.columns.down"). - localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.columns.down"); } - public String getDeleteLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.delete"); } - public String getUpLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.up"); } - public String getDownLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.down"); } - public String getConfirmRemoveLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.projects.delete.confirm"). - localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.projects.delete.confirm"); } public String getAssocType() { diff --git a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsStep.java b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsStep.java index 6e3fbdcb8..964628350 100644 --- a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsStep.java +++ b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsStep.java @@ -24,17 +24,17 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * Authoring step for editing the associations to sub departments of a SciDepartment. - * - * @author Jens Pelzetter + * + * @author Jens Pelzetter * @version $Id$ */ public class SciDepartmentSubDepartmentsStep extends SimpleEditStep { - private final String ADD_SUBDEPARTMENT_SHEET_NAME = - "SciDepartmentAddSubDepartment"; + private final String ADD_SUBDEPARTMENT_SHEET_NAME = "SciDepartmentAddSubDepartment"; public final static String ASSOC_TYPE = "DepartmentOf"; public SciDepartmentSubDepartmentsStep(final ItemSelectionModel itemModel, @@ -47,15 +47,14 @@ public class SciDepartmentSubDepartmentsStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addSubDepartmentSheet = - new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( + final BasicItemForm addSubDepartmentSheet + = new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( itemModel, new GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer() { - public String getSelectSubordinateOrgaUnitLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartment.select"). - localize(); + public GlobalizedMessage getSelectSubordinateOrgaUnitLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartment.select"); } public String getSubordinateOrgaUnitType() { @@ -66,103 +65,95 @@ public class SciDepartmentSubDepartmentsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartment.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartment.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartment.no_suitable_languge_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartment.no_suitable_languge_variant"); } - public String getAddingToItselfMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartment.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartment.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartment.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartment.already_added"); } + }); add(ADD_SUBDEPARTMENT_SHEET_NAME, SciDepartmentGlobalizationUtil.globalize( "scidepartment.ui.subdepartment.add"), - new WorkflowLockedComponentAccess(addSubDepartmentSheet,itemModel), + new WorkflowLockedComponentAccess(addSubDepartmentSheet, itemModel), addSubDepartmentSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSubordinateOrgaUnitsTable subDepartmentTable = - new GenericOrganizationalUnitSubordinateOrgaUnitsTable( + final GenericOrganizationalUnitSubordinateOrgaUnitsTable subDepartmentTable + = new GenericOrganizationalUnitSubordinateOrgaUnitsTable( itemModel, new GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.empty_view"). - localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.empty_view"); } - public String getNameColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.columns.name"). - localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.columns.delete"). - localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.columns.up"). - localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.columns.up"); } - public String getDownColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.columns.down"). - localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.columns.down"); } - public String getDeleteLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.delete"). - localize(); + public GlobalizedMessage getDeleteLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.delete"); } - public String getUpLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.up"); } - public String getDownLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.down"); } - public String getConfirmRemoveLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.subdepartments.delete.confirm"). - localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.subdepartments.delete.confirm"); } public String getAssocType() { return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciDepartmentBundle"; } + }); setDisplayComponent(subDepartmentTable); } + } diff --git a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSuperDepartmentsStep.java b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSuperDepartmentsStep.java index 4e4cb43ac..2605b6944 100644 --- a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSuperDepartmentsStep.java +++ b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSuperDepartmentsStep.java @@ -24,6 +24,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * Step for editing the association the the superior organisational unit. @@ -52,10 +53,9 @@ public class SciDepartmentSuperDepartmentsStep extends SimpleEditStep { itemModel, new GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer() { - public String getSelectSuperiorOrgaUnitLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartment.select"). - localize(); + public GlobalizedMessage getSelectSuperiorOrgaUnitLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartment.select"); } public String getSuperiorOrgaUnitType() { @@ -66,28 +66,24 @@ public class SciDepartmentSuperDepartmentsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartment.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartment.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartment.no_suitable_language_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartment.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartment.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartment.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartment.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartment.already_added"); } }); add(ADD_SUPER_DEPARTMENT_SHEET_NAME, @@ -101,58 +97,49 @@ public class SciDepartmentSuperDepartmentsStep extends SimpleEditStep { itemModel, new GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.empty_view"). - localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.empty_view"); } - public String getNameColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.columns.name"). - localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.columns.delete"). - localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.columns.up"). - localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.columns.up"); } - public String getDownColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.columns.down"). - localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.columns.down"); } - public String getDeleteLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.delete"). - localize(); + public GlobalizedMessage getDeleteLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.delete"); } - public String getUpLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.up"). - localize(); + public GlobalizedMessage getUpLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.up"); } - public String getDownLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.down"). - localize(); + public GlobalizedMessage getDownLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.down"); } - public String getConfirmRemoveLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "scidepartment.ui.superdepartments.delete.confirm"). - localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "scidepartment.ui.superdepartments.delete.confirm"); } public String getAssocType() { diff --git a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciProjectDepartmentsStep.java b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciProjectDepartmentsStep.java index 32d13462d..c5e0a8f93 100644 --- a/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciProjectDepartmentsStep.java +++ b/ccm-sci-types-department/src/com/arsdigita/cms/contenttypes/ui/SciProjectDepartmentsStep.java @@ -24,17 +24,17 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * Authoring step for editing the associations between a department and its projects. - * - * @author Jens Pelzetter + * + * @author Jens Pelzetter * @version $Id$ */ public class SciProjectDepartmentsStep extends SimpleEditStep { - private final static String ADD_DEPARTMENT_SHEET_NAME = - "SciProjectAddDepartment"; + private final static String ADD_DEPARTMENT_SHEET_NAME = "SciProjectAddDepartment"; public final static String ASSOC_TYPE = "ProjectOf"; public SciProjectDepartmentsStep(final ItemSelectionModel itemModel, @@ -47,14 +47,14 @@ public class SciProjectDepartmentsStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addDepartmentSheet = - new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( + final BasicItemForm addDepartmentSheet + = new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( itemModel, new GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer() { - public String getSelectSuperiorOrgaUnitLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.department.select").localize(); + public GlobalizedMessage getSelectSuperiorOrgaUnitLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.department.select"); } public String getSuperiorOrgaUnitType() { @@ -65,25 +65,26 @@ public class SciProjectDepartmentsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.department.select.nothing").localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.department.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.department.no_suitable_language_variant").localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.department.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.department.adding_to_itself").localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.department.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.department.already_added").localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.department.already_added"); } + }); add(ADD_DEPARTMENT_SHEET_NAME, @@ -92,65 +93,67 @@ public class SciProjectDepartmentsStep extends SimpleEditStep { new WorkflowLockedComponentAccess(addDepartmentSheet, itemModel), addDepartmentSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSuperiorOrgaUnitsTable departmentsTable = - new GenericOrganizationalUnitSuperiorOrgaUnitsTable( + final GenericOrganizationalUnitSuperiorOrgaUnitsTable departmentsTable + = new GenericOrganizationalUnitSuperiorOrgaUnitsTable( itemModel, new GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.empty_view").localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.empty_view"); } - public String getNameColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.columns.name").localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.columns.delete").localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.columns.up").localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.columns.up"); } - public String getDownColumnLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.columns.down").localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.columns.down"); } - public String getDeleteLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.delete"); } - public String getUpLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.up"); } - public String getDownLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.down"); } - public String getConfirmRemoveLabel() { - return (String) SciDepartmentGlobalizationUtil.globalize( - "sciproject.ui.departments.delete.confirm").localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciDepartmentGlobalizationUtil.globalize( + "sciproject.ui.departments.delete.confirm"); } public String getAssocType() { return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciDepartmentBundle"; } + }); setDisplayComponent(departmentsTable); } + } diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java index 97d672b49..673542d47 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentInstitutesStep.java @@ -7,21 +7,21 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** - * Authoring step for associating departments to an institute - * This step is attached by the {@link SciInstituteInitializer} only if - * the ccm-sci-types-department module has been installed and the config - * parameter {@code com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step} - * is set to true. - * - * @author Jens Pelzetter + * Authoring step for associating departments to an institute This step is attached by the + * {@link SciInstituteInitializer} only if the ccm-sci-types-department module has been installed + * and the config parameter + * {@code com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step} is set to + * true. + * + * @author Jens Pelzetter * @version $Id$ */ public class SciDepartmentInstitutesStep extends SimpleEditStep { - private final static String ADD_INSTITUTE_SHEET_NAME = - "SciDepartmentAddInstitute"; + private final static String ADD_INSTITUTE_SHEET_NAME = "SciDepartmentAddInstitute"; public static final String ASSOC_TYPE = "DepartmentOf"; public SciDepartmentInstitutesStep(final ItemSelectionModel itemModel, @@ -34,14 +34,14 @@ public class SciDepartmentInstitutesStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addInstituteSheet = - new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( + final BasicItemForm addInstituteSheet + = new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( itemModel, new GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer() { - public String getSelectSuperiorOrgaUnitLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institute.select").localize(); + public GlobalizedMessage getSelectSuperiorOrgaUnitLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institute.select"); } public String getSuperiorOrgaUnitType() { @@ -52,29 +52,26 @@ public class SciDepartmentInstitutesStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institute.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institute.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institute.no_suitable_language_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institute.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institute.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institute.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institute.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institute.already_added"); } + }); add(ADD_INSTITUTE_SHEET_NAME, @@ -83,71 +80,67 @@ public class SciDepartmentInstitutesStep extends SimpleEditStep { new WorkflowLockedComponentAccess(addInstituteSheet, itemModel), addInstituteSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSuperiorOrgaUnitsTable institutesTable = - new GenericOrganizationalUnitSuperiorOrgaUnitsTable( + final GenericOrganizationalUnitSuperiorOrgaUnitsTable institutesTable + = new GenericOrganizationalUnitSuperiorOrgaUnitsTable( itemModel, new GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.empty_view"). - localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.empty_view"); } - public String getNameColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.columns.name"). - localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.columns.delete"). - localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.columns.up"). - localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.columns.up"); } - public String getDownColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.columns.down"). - localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.columns.down"); } - public String getDeleteLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.delete"); } - public String getUpLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.up"); } - public String getDownLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.down"); } - public String getConfirmRemoveLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "scidepartment.ui.institutes.delete.confirm"). - localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciInstituteGlobalizationUtil.globalize( + "scidepartment.ui.institutes.delete.confirm"); } public String getAssocType() { return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciInstituteBundle"; } + }); setDisplayComponent(institutesTable); } + } diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java index 16e53ecfa..ec2a42970 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteDepartmentsStep.java @@ -5,13 +5,13 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** - * Authoring step for adding departments to an institute. This step is - * attached by the initializer if the ccm-sci-types-department module - * has been installed. - * - * @author Jens Pelzetter + * Authoring step for adding departments to an institute. This step is attached by the initializer + * if the ccm-sci-types-department module has been installed. + * + * @author Jens Pelzetter * @version $Id$ */ public class SciInstituteDepartmentsStep extends SimpleEditStep { @@ -29,14 +29,14 @@ public class SciInstituteDepartmentsStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addDepartmentSheet = - new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( + final BasicItemForm addDepartmentSheet + = new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( itemModel, new GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer() { - public String getSelectSubordinateOrgaUnitLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.select").localize(); + public GlobalizedMessage getSelectSubordinateOrgaUnitLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.select"); } public String getSubordinateOrgaUnitType() { @@ -47,29 +47,26 @@ public class SciInstituteDepartmentsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.no_suitable_language_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.already_added"); } + }); add(ADD_DEPARTMENT_SHEET_NAME, @@ -78,72 +75,68 @@ public class SciInstituteDepartmentsStep extends SimpleEditStep { new WorkflowLockedComponentAccess(addDepartmentSheet, itemModel), addDepartmentSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSubordinateOrgaUnitsTable departmentsTable = - new GenericOrganizationalUnitSubordinateOrgaUnitsTable( + final GenericOrganizationalUnitSubordinateOrgaUnitsTable departmentsTable + = new GenericOrganizationalUnitSubordinateOrgaUnitsTable( itemModel, new GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.empty_view"). - localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.empty_view"); } - public String getNameColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.columns.name"). - localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.columns.delete"). - localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.columns.up"). - localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.columns.up"); } - public String getDownColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.columns.down"). - localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.columns.down"); } - public String getDeleteLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.delete"); } - public String getUpLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.up"); } - public String getDownLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.down"); } - public String getConfirmRemoveLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.departments.delete.confirm"). - localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.departments.delete.confirm"); } public String getAssocType() { return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciDepartmentBundle"; } + }); setDisplayComponent(departmentsTable); } + } diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java index 93b70790d..6d194bf29 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciInstituteProjectsStep.java @@ -5,13 +5,13 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** - * Authoring step for adding projects to an institute. This step is - * attached by the initializer if the ccm-sci-types-project module has been - * installed. - * - * @author Jens Pelzetter + * Authoring step for adding projects to an institute. This step is attached by the initializer if + * the ccm-sci-types-project module has been installed. + * + * @author Jens Pelzetter * @version $Id$ */ public class SciInstituteProjectsStep extends SimpleEditStep { @@ -29,14 +29,14 @@ public class SciInstituteProjectsStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addProjectSheet = - new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( + final BasicItemForm addProjectSheet + = new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( itemModel, new GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer() { - public String getSelectSubordinateOrgaUnitLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.select").localize(); + public GlobalizedMessage getSelectSubordinateOrgaUnitLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.select"); } public String getSubordinateOrgaUnitType() { @@ -47,29 +47,26 @@ public class SciInstituteProjectsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.no_suitable_language_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.already_added"); } + }); add(ADD_INSTITUTE_SHEET_NAME, SciInstituteGlobalizationUtil.globalize( @@ -77,69 +74,67 @@ public class SciInstituteProjectsStep extends SimpleEditStep { new WorkflowLockedComponentAccess(addProjectSheet, itemModel), addProjectSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSubordinateOrgaUnitsTable projectsTable = - new GenericOrganizationalUnitSubordinateOrgaUnitsTable( + final GenericOrganizationalUnitSubordinateOrgaUnitsTable projectsTable + = new GenericOrganizationalUnitSubordinateOrgaUnitsTable( itemModel, new GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.empty_view").localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.empty_view"); } - public String getNameColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.columns.name"). - localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.columns.delete"). - localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.columns.up").localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.columns.up"); } - public String getDownColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.columns.down"). - localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.columns.down"); } - public String getDeleteLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.delete"); } - public String getUpLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.up"); } - public String getDownLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.down"); } - public String getConfirmRemoveLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciinstitute.ui.projects.delete.confirm"). - localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciinstitute.ui.projects.delete.confirm"); } public String getAssocType() { return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciProject"; } + }); setDisplayComponent(projectsTable); } + } diff --git a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java index 0bd1372b7..f02ad4c45 100644 --- a/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java +++ b/ccm-sci-types-institute/src/com/arsdigita/cms/contenttypes/ui/SciProjectInstitutesStep.java @@ -6,20 +6,20 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** - * Step for associating a project with institutes. Activated if the - * ccm-sci-types-project module is installed and the - * {@code com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step} - * is set to true. - * - * @author Jens Pelzetter + * Step for associating a project with institutes. Activated if the ccm-sci-types-project module is + * installed and the + * {@code com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step} is set to + * true. + * + * @author Jens Pelzetter * @version $Id$ */ public class SciProjectInstitutesStep extends SimpleEditStep { - private final static String ADD_INSTITUTE_SHEET_NAME = - "SciProjectAddInstitute"; + private final static String ADD_INSTITUTE_SHEET_NAME = "SciProjectAddInstitute"; public final static String ASSOC_TYPE = "ProjectOf"; public SciProjectInstitutesStep(final ItemSelectionModel itemModel, @@ -32,14 +32,14 @@ public class SciProjectInstitutesStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addInstitutesSheet = - new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( + final BasicItemForm addInstitutesSheet + = new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( itemModel, new GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer() { - public String getSelectSuperiorOrgaUnitLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.institute.select").localize(); + public GlobalizedMessage getSelectSuperiorOrgaUnitLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.institute.select"); } public String getSuperiorOrgaUnitType() { @@ -50,28 +50,26 @@ public class SciProjectInstitutesStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.institute.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.institute.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.institute.no_suitable_languge_variant").localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.institute.no_suitable_languge_variant"); } - public String getAddingToItselfMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.institute.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.institute.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.institute.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.institute.already_added"); } + }); add(ADD_INSTITUTE_SHEET_NAME, @@ -80,64 +78,66 @@ public class SciProjectInstitutesStep extends SimpleEditStep { new WorkflowLockedComponentAccess(addInstitutesSheet, itemModel), addInstitutesSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSuperiorOrgaUnitsTable institutesTable = - new GenericOrganizationalUnitSuperiorOrgaUnitsTable( + final GenericOrganizationalUnitSuperiorOrgaUnitsTable institutesTable + = new GenericOrganizationalUnitSuperiorOrgaUnitsTable( itemModel, new GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.empty_view").localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.empty_view"); } - public String getNameColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.columns.name").localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.columns.delete").localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.columns.up").localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.columns.up"); } - public String getDownColumnLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.columns.down").localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.columns.down"); } - public String getDeleteLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.delete"); } - public String getUpLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.up"); } - public String getDownLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.down"); } - public String getConfirmRemoveLabel() { - return (String) SciInstituteGlobalizationUtil.globalize( - "sciproject.ui.instituts.delete.confirm").localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciInstituteGlobalizationUtil.globalize( + "sciproject.ui.instituts.delete.confirm"); } public String getAssocType() { return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciInstitute"; } + }); setDisplayComponent(institutesTable); } + } diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectInvolvedOrganizationsStep.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectInvolvedOrganizationsStep.java index 142d06c32..e7e8bce9d 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectInvolvedOrganizationsStep.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectInvolvedOrganizationsStep.java @@ -10,130 +10,134 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * - * @author Jens Pelzetter + * @author Jens Pelzetter * @version $Id$ */ public class SciProjectInvolvedOrganizationsStep extends SimpleEditStep { - private final static String ADD_INVOLVED_ORGANIZATION_STEP = - "SciProjectAddInvolvedOrganization"; + private final static String ADD_INVOLVED_ORGANIZATION_STEP = "SciProjectAddInvolvedOrganization"; public final static String ASSOC_TYPE = "InvolvedOrganization"; public SciProjectInvolvedOrganizationsStep( - final ItemSelectionModel itemModel, - final AuthoringKitWizard parent) { + final ItemSelectionModel itemModel, + final AuthoringKitWizard parent) { this(itemModel, parent, null); } public SciProjectInvolvedOrganizationsStep( - final ItemSelectionModel itemModel, - final AuthoringKitWizard parent, - final String prefix) { + final ItemSelectionModel itemModel, + final AuthoringKitWizard parent, + final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addInvolvedOrgaSheet = - new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( + final BasicItemForm addInvolvedOrgaSheet + = new GenericOrganizationalUnitSuperiorOrgaUnitAddForm( itemModel, new GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer() { - public String getSelectSuperiorOrgaUnitLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.select").localize(); + public GlobalizedMessage getSelectSuperiorOrgaUnitLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.select"); } public String getSuperiorOrgaUnitType() { - return GenericOrganizationalUnit.class.getName(); + return GenericOrganizationalUnit.class.getName(); } public String getAssocType() { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.select.nothing").localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.no_suitable_language_variant").localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.adding_to_itself").localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.already_added").localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.already_added"); } + }); - add(ADD_INVOLVED_ORGANIZATION_STEP, + add(ADD_INVOLVED_ORGANIZATION_STEP, SciProjectGlobalizationUtil.globalize("sciproject.ui.involved_orgas.add"), new WorkflowLockedComponentAccess(addInvolvedOrgaSheet, itemModel), addInvolvedOrgaSheet.getSaveCancelSection().getCancelButton()); - - final GenericOrganizationalUnitSuperiorOrgaUnitsTable involvedTable = new GenericOrganizationalUnitSuperiorOrgaUnitsTable( + + final GenericOrganizationalUnitSuperiorOrgaUnitsTable involvedTable + = new GenericOrganizationalUnitSuperiorOrgaUnitsTable( itemModel, new GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.empty_view").localize(); - } + public GlobalizedMessage getEmptyViewLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.empty_view"); + } - public String getNameColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas..columns.name").localize(); - } + public GlobalizedMessage getNameColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas..columns.name"); + } - public String getDeleteColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.columns.delete").localize(); - } + public GlobalizedMessage getDeleteColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.columns.delete"); + } - public String getUpColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.columns.up").localize(); - } + public GlobalizedMessage getUpColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.columns.up"); + } - public String getDownColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.columns.down").localize(); - } + public GlobalizedMessage getDownColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.columns.down"); + } - public String getDeleteLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.delete").localize(); - } + public GlobalizedMessage getDeleteLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.delete"); + } - public String getUpLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.up").localize(); - } + public GlobalizedMessage getUpLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.up"); + } - public String getDownLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.down").localize(); - } + public GlobalizedMessage getDownLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.down"); + } - public String getConfirmRemoveLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.involved_orgas.delete.confirm").localize(); - } + public GlobalizedMessage getConfirmRemoveLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.involved_orgas.delete.confirm"); + } + + public String getAssocType() { + return ASSOC_TYPE; + } + + public String getContentType() { + return null; + } + + }); - public String getAssocType() { - return ASSOC_TYPE; - } - - public String getContentType() { - return null; - } - }); - setDisplayComponent(involvedTable); } + } diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsStep.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsStep.java index f3b336fa3..dca223d02 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsStep.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsStep.java @@ -6,10 +6,11 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * - * @author Jens Pelzetter + * @author Jens Pelzetter * @version $Id$ */ public class SciProjectSubProjectsStep extends SimpleEditStep { @@ -27,14 +28,14 @@ public class SciProjectSubProjectsStep extends SimpleEditStep { final String prefix) { super(itemModel, parent, prefix); - final BasicItemForm addSubProjectSheet = - new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( + final BasicItemForm addSubProjectSheet + = new GenericOrganizationalUnitSubordinateOrgaUnitAddForm( itemModel, new GenericOrgaUnitSubordinateOrgaUnitAddFormCustomizer() { - public String getSelectSubordinateOrgaUnitLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.select").localize(); + public GlobalizedMessage getSelectSubordinateOrgaUnitLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.select"); } public String getSubordinateOrgaUnitType() { @@ -45,29 +46,26 @@ public class SciProjectSubProjectsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.select.nothing"). - localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.no_suitable_language_variant"). - localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.adding_to_itself"). - localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.already_added"). - localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.already_added"); } + }); add(ADD_SUBPROJECT_SHEET_NAME, SciProjectGlobalizationUtil.globalize( @@ -75,67 +73,68 @@ public class SciProjectSubProjectsStep extends SimpleEditStep { new WorkflowLockedComponentAccess(addSubProjectSheet, itemModel), addSubProjectSheet.getSaveCancelSection().getCancelButton()); - final GenericOrganizationalUnitSubordinateOrgaUnitsTable subProjectsTable = - new GenericOrganizationalUnitSubordinateOrgaUnitsTable( + final GenericOrganizationalUnitSubordinateOrgaUnitsTable subProjectsTable + = new GenericOrganizationalUnitSubordinateOrgaUnitsTable( itemModel, new GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subprojects.empty_view").localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subprojects.empty_view"); } - public String getNameColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subprojects.columns.name").localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subprojects.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subprojects.colums.delete").localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subprojects.colums.delete"); } - public String getUpColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subprojects.columns.up").localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subprojects.columns.up"); } - public String getDownColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subprojects.columns.down").localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subprojects.columns.down"); } - public String getDeleteLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.delete"); } - public String getUpLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.order.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.order.up"); } - public String getDownLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.order.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.order.down"); } - public String getConfirmRemoveLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.subproject.remove.confirm").localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.subproject.remove.confirm"); } public String getAssocType() { - return ASSOC_TYPE; + return ASSOC_TYPE; } - + public String getContentType() { return "com.arsdigita.cms.contenttypes.SciProjectBundle"; } + }); setDisplayComponent(subProjectsTable); - } + } diff --git a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSuperProjectsStep.java b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSuperProjectsStep.java index 1055c5dbd..b3c215064 100644 --- a/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSuperProjectsStep.java +++ b/ccm-sci-types-project/src/com/arsdigita/cms/contenttypes/ui/SciProjectSuperProjectsStep.java @@ -6,6 +6,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.globalization.GlobalizedMessage; /** * @@ -32,9 +33,9 @@ public class SciProjectSuperProjectsStep extends SimpleEditStep { itemModel, new GenericOrgaUnitSuperiorOrgaUnitAddFormCustomizer() { - public String getSelectSuperiorOrgaUnitLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.select").localize(); + public GlobalizedMessage getSelectSuperiorOrgaUnitLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.select"); } public String getSuperiorOrgaUnitType() { @@ -45,24 +46,24 @@ public class SciProjectSuperProjectsStep extends SimpleEditStep { return ASSOC_TYPE; } - public String getNothingSelectedMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.select.nothing").localize(); + public GlobalizedMessage getNothingSelectedMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.select.nothing"); } - public String getNoSuitableLanguageVariantMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.no_suitable_language_variant").localize(); + public GlobalizedMessage getNoSuitableLanguageVariantMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.no_suitable_language_variant"); } - public String getAddingToItselfMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.adding_to_itself").localize(); + public GlobalizedMessage getAddingToItselfMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.adding_to_itself"); } - public String getAlreadyAddedMessage() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.already_added").localize(); + public GlobalizedMessage getAlreadyAddedMessage() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.already_added"); } }); add(ADD_SUPERPROJECT_SHEET_NAME, @@ -73,49 +74,49 @@ public class SciProjectSuperProjectsStep extends SimpleEditStep { final GenericOrganizationalUnitSuperiorOrgaUnitsTable superProjectsTable = new GenericOrganizationalUnitSuperiorOrgaUnitsTable( itemModel, new GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer() { - public String getEmptyViewLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superprojects.empty_view").localize(); + public GlobalizedMessage getEmptyViewLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superprojects.empty_view"); } - public String getNameColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superprojects.columns.name").localize(); + public GlobalizedMessage getNameColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superprojects.columns.name"); } - public String getDeleteColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superprojects.columns.delete").localize(); + public GlobalizedMessage getDeleteColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superprojects.columns.delete"); } - public String getUpColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superprojects.columns.up").localize(); + public GlobalizedMessage getUpColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superprojects.columns.up"); } - public String getDownColumnLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superprojects.columns.down").localize(); + public GlobalizedMessage getDownColumnLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superprojects.columns.down"); } - public String getDeleteLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.delete").localize(); + public GlobalizedMessage getDeleteLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.delete"); } - public String getUpLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.order.up").localize(); + public GlobalizedMessage getUpLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.order.up"); } - public String getDownLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.order.down").localize(); + public GlobalizedMessage getDownLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.order.down"); } - public String getConfirmRemoveLabel() { - return (String) SciProjectGlobalizationUtil.globalize( - "sciproject.ui.superproject.remove.confirm").localize(); + public GlobalizedMessage getConfirmRemoveLabel() { + return SciProjectGlobalizationUtil.globalize( + "sciproject.ui.superproject.remove.confirm"); } public String getAssocType() {