From b760fd7c1c14001d16282a4ebe6e5426e5c53b4f Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 30 Sep 2010 14:00:10 +0000 Subject: [PATCH] =?UTF-8?q?-=20Verschiedene=20Optimierungen=20und=20Erg?= =?UTF-8?q?=C3=A4nzungen=20im=20Publikationsmodul=20-=20Neues=20Modul=20mi?= =?UTF-8?q?t=20Contenttypen=20f=C3=BCr=20wissenschaftliche=20Einrichtungen?= =?UTF-8?q?=20(noch=20nicht=20fertiggestellt)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@543 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms-types-department/application.xml | 3 +- .../ui/DepartmentProjectAddForm.java | 26 -- .../ui/DepartmentProjectPropertiesStep.java | 49 --- .../ui/DepartmentPropertiesStep.java | 5 +- .../com/arsdigita/content-types/Project.pdl | 8 - .../arsdigita/cms/contenttypes/Project.java | 36 -- ...enericOrganizationalUnitPersonAddForm.java | 15 +- .../cms/installer/ContentCenterSetup.java | 1 + .../permissions/PrivilegeDescriptor.java | 116 +++---- .../ArticleInCollectedVolume.pdl | 2 +- .../content-types/ArticleInJournal.pdl | 3 +- .../content-types/CollectedVolume.pdl | 5 - .../com/arsdigita/content-types/Expertise.pdl | 1 - .../content-types/GreyLiterature.pdl | 3 +- .../arsdigita/content-types/InProceedings.pdl | 10 +- .../content-types/InternetArticle.pdl | 1 - .../com/arsdigita/content-types/Monograph.pdl | 5 - .../arsdigita/content-types/Proceedings.pdl | 50 +++ .../PublicationWithPublisher.pdl | 5 +- .../com/arsdigita/content-types/Review.pdl | 13 +- .../cms/contenttypes/Proceedings.xml | 30 ++ .../cms/contenttypes/Proceedings.xml | 20 ++ .../src/ccm-sci-publications.load | 3 + .../ArticleInCollectedVolume.java | 13 +- .../ArticleInCollectedVolumeCollection.java | 2 +- .../cms/contenttypes/ArticleInJournal.java | 9 - .../cms/contenttypes/CollectedVolume.java | 40 +-- .../arsdigita/cms/contenttypes/Expertise.java | 11 +- .../cms/contenttypes/GreyLiterature.java | 12 +- .../cms/contenttypes/InProceedings.java | 84 +---- .../contenttypes/InProceedingsCollection.java | 153 +++++++++ .../cms/contenttypes/InternetArticle.java | 9 - .../arsdigita/cms/contenttypes/Monograph.java | 39 +-- .../cms/contenttypes/Proceedings.java | 138 ++++++++ .../contenttypes/ProceedingsInitializer.java | 30 ++ .../cms/contenttypes/ProceedingsLoader.java | 19 ++ .../PublicationWithPublisher.java | 42 ++- .../arsdigita/cms/contenttypes/Review.java | 76 +---- ...rticleInCollectedVolumePropertiesStep.java | 27 +- .../ArticleInCollectedVolumePropertyForm.java | 2 +- .../ui/ArticleInJournalPropertiesStep.java | 41 ++- .../ui/ArticleInJournalPropertyForm.java | 15 +- .../ui/CollectedVolumeArticlesTable.java | 6 +- .../ui/CollectedVolumePropertiesStep.java | 21 +- .../ui/CollectedVolumePropertyForm.java | 57 ---- .../ui/ExpertisePropertiesStep.java | 29 +- .../ui/ExpertisePropertyForm.java | 15 +- .../ui/GreyLiteraturePropertiesStep.java | 24 +- .../ui/GreyLiteraturePropertyForm.java | 15 +- .../ui/InProceedingsPropertiesStep.java | 23 +- .../ui/InProceedingsPropertyForm.java | 110 +----- .../ui/InternetArticlePropertiesStep.java | 39 +++ .../ui/InternetArticlePropertyForm.java | 15 +- .../ui/MonographPropertiesStep.java | 19 +- .../ui/MonographPropertyForm.java | 51 +-- .../ui/ProceedingsPapersAddForm.java | 68 ++++ .../ui/ProceedingsPapersStep.java | 41 +++ .../ui/ProceedingsPapersTable.java | 319 ++++++++++++++++++ .../ui/ProceedingsPropertiesStep.java | 90 +++++ .../ui/ProceedingsPropertyForm.java | 136 ++++++++ ...ublicationWithPublisherPropertiesStep.java | 20 ++ .../PublicationWithPublisherPropertyForm.java | 52 ++- .../contenttypes/ui/ReviewPropertiesStep.java | 14 +- .../contenttypes/ui/ReviewPropertyForm.java | 83 +---- .../ui/UnPublishedPropertiesStep.java | 31 +- .../ui/WorkingPaperPropertiesStep.java | 12 +- .../cms/contenttypes/Proceedings.xsl | 19 ++ ccm-sci-types-organization/application.xml | 24 ++ .../arsdigita/content-types/SciDepartment.pdl | 10 + .../content-types/SciOrganization.pdl | 10 + .../arsdigita/content-types/SciProject.pdl | 14 + .../postgres-create.sql | 4 + .../cms/contenttypes/SciDepartment.xml | 31 ++ .../cms/contenttypes/SciOrganization.pdl | 31 ++ .../arsdigita/cms/contenttypes/SciProject.xml | 31 ++ .../cms/contenttypes/SciDepartment.xml | 20 ++ .../cms/contenttypes/SciOrganization.xml | 20 ++ .../arsdigita/cms/contenttypes/SciProject.xml | 20 ++ .../src/ccm-sci-types-organization.config | 4 + .../src/ccm-sci-types-organization.load | 22 ++ .../cms/contenttypes/SciDepartment.java | 45 +++ .../SciDepartmentInitializer.java | 29 ++ .../cms/contenttypes/SciDepartmentLoader.java | 17 + .../cms/contenttypes/SciOrganization.java | 45 +++ .../SciOrganizationInitializer.java | 31 ++ .../contenttypes/SciOrganizationLoader.java | 17 + .../cms/contenttypes/SciProject.java | 74 ++++ .../contenttypes/SciProjectInitializer.java | 12 +- .../cms/contenttypes/SciProjectLoader.java | 4 +- .../ui/SciProjectPropertiesStep.java | 6 +- .../ui/SciProjectSubprojectAddForm.java | 8 +- .../SciProjectSubprojectPropertiesStep.java | 12 +- ccm-sci-types-organization/src/empty.pdl.mf | 0 .../cms/contenttypes/SciDepartment.xsl | 19 ++ .../cms/contenttypes/SciOrganization.xsl | 19 ++ .../arsdigita/cms/contenttypes/SciProject.xsl | 19 ++ .../application.xml | 4 +- .../arsdigita/content-types/SciProject.pdl | 14 + .../postgres-create.sql | 0 .../arsdigita/cms/contenttypes/SciProject.xml | 14 +- .../arsdigita/cms/contenttypes/SciProject.xml | 2 +- .../src/ccm-sci-types-sciproject.config | 2 +- .../src/ccm-sci-types-sciproject.load | 8 +- .../arsdigita/cms/contenttypes/SciProject.xsl | 6 +- 104 files changed, 2194 insertions(+), 935 deletions(-) delete mode 100644 ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectAddForm.java delete mode 100644 ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectPropertiesStep.java delete mode 100644 ccm-cms-types-project/pdl/com/arsdigita/content-types/Project.pdl delete mode 100644 ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/Project.java create mode 100644 ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl create mode 100644 ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Proceedings.xml create mode 100644 ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedingsCollection.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsInitializer.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsLoader.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersAddForm.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersStep.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertiesStep.java create mode 100644 ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java create mode 100644 ccm-sci-publications/web/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl create mode 100644 ccm-sci-types-organization/application.xml create mode 100644 ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl create mode 100644 ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl create mode 100644 ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl create mode 100644 ccm-sci-types-organization/sql/ccm-sci-types-organization/postgres-create.sql create mode 100644 ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml create mode 100644 ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.pdl create mode 100644 ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml create mode 100644 ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml create mode 100644 ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml create mode 100644 ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml create mode 100644 ccm-sci-types-organization/src/ccm-sci-types-organization.config create mode 100644 ccm-sci-types-organization/src/ccm-sci-types-organization.load create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartment.java create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentInitializer.java create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganization.java create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationInitializer.java create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java create mode 100644 ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProject.java rename ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectInitializer.java => ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectInitializer.java (64%) rename ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectLoader.java => ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java (67%) rename ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectPropertiesStep.java => ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertiesStep.java (86%) rename ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectAddForm.java => ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectAddForm.java (59%) rename ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectPropertiesStep.java => ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectPropertiesStep.java (77%) create mode 100644 ccm-sci-types-organization/src/empty.pdl.mf create mode 100644 ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl create mode 100644 ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xsl create mode 100644 ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl rename {ccm-cms-types-project => ccm-sci-types-sciproject}/application.xml (90%) create mode 100644 ccm-sci-types-sciproject/pdl/com/arsdigita/content-types/SciProject.pdl rename {ccm-cms-types-project/sql/ccm-cms-types-project => ccm-sci-types-sciproject/sql/ccm-sci-types-sciproject}/postgres-create.sql (100%) rename ccm-cms-types-project/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Project.xml => ccm-sci-types-sciproject/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml (67%) rename ccm-cms-types-project/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Project.xml => ccm-sci-types-sciproject/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml (93%) rename ccm-cms-types-project/src/ccm-cms-types-project.config => ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.config (66%) rename ccm-cms-types-project/src/ccm-cms-types-project.load => ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.load (55%) rename ccm-cms-types-project/web/static/content-types/com/arsdigita/cms/contenttypes/Project.xsl => ccm-sci-types-sciproject/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl (76%) diff --git a/ccm-cms-types-department/application.xml b/ccm-cms-types-department/application.xml index f36608c3b..041345295 100644 --- a/ccm-cms-types-department/application.xml +++ b/ccm-cms-types-department/application.xml @@ -6,8 +6,7 @@ webapp="ROOT"> - - + diff --git a/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectAddForm.java b/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectAddForm.java deleted file mode 100644 index 38ef1838f..000000000 --- a/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectAddForm.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package com.arsdigita.cms.contenttypes.ui; - -import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.cms.contenttypes.Project; - -/** - * - * @author Jens Pelzetter - */ -public class DepartmentProjectAddForm - extends GenericOrganizationalUnitChildAddForm { - - public DepartmentProjectAddForm(ItemSelectionModel itemModel) { - super("ProjectAddForm", itemModel); - } - - @Override - protected String getChildDataObjectType() { - return Project.BASE_DATA_OBJECT_TYPE; - } -} diff --git a/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectPropertiesStep.java b/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectPropertiesStep.java deleted file mode 100644 index 65f4a6298..000000000 --- a/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentProjectPropertiesStep.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package com.arsdigita.cms.contenttypes.ui; - -import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; -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 org.apache.log4j.Logger; - -/** - * - * @author Jens Pelzetter - */ -public class DepartmentProjectPropertiesStep extends SimpleEditStep { - - private static final Logger s_log = - Logger.getLogger(DepartmentProjectPropertiesStep.class); - private static String ADD_CHILD_SHEET_NAME = "addProject"; - - public DepartmentProjectPropertiesStep( - ItemSelectionModel itemModel, - AuthoringKitWizard parent) { - this(itemModel, parent, null); - } - - public DepartmentProjectPropertiesStep( - ItemSelectionModel itemModel, - AuthoringKitWizard parent, - String prefix) { - super(itemModel, parent, prefix); - - BasicItemForm addChildSheet = new DepartmentProjectAddForm(itemModel); - add(ADD_CHILD_SHEET_NAME, - (String) ContenttypesGlobalizationUtil.globalize( - "cms.contenttypes.ui.department.add_project").localize(), - new WorkflowLockedComponentAccess(addChildSheet, itemModel), - addChildSheet.getSaveCancelSection().getCancelButton()); - - GenericOrganizationalUnitChildTable childrenTable = new GenericOrganizationalUnitChildTable( - itemModel); - setDisplayComponent(childrenTable); - } -} diff --git a/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentPropertiesStep.java b/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentPropertiesStep.java index 9f7daf1e5..4b8656168 100644 --- a/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentPropertiesStep.java +++ b/ccm-cms-types-department/src/com/arsdigita/cms/contenttypes/ui/DepartmentPropertiesStep.java @@ -27,10 +27,7 @@ public class DepartmentPropertiesStep "cms.contenttypes.ui.orgaunit.contact"); addStep(new DepartmentSubDepartmentPropertiesStep(itemModel, parent), - "cms.contenttypes.ui.orgaunit.subdepartments"); - addStep(new DepartmentProjectPropertiesStep(itemModel, - parent), - "cms.contenttypes.ui.orgaunit.projects"); + "cms.contenttypes.ui.orgaunit.subdepartments"); addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel, parent), "cms.contenttypes.ui.orgaunit.persons"); diff --git a/ccm-cms-types-project/pdl/com/arsdigita/content-types/Project.pdl b/ccm-cms-types-project/pdl/com/arsdigita/content-types/Project.pdl deleted file mode 100644 index 2f51074d1..000000000 --- a/ccm-cms-types-project/pdl/com/arsdigita/content-types/Project.pdl +++ /dev/null @@ -1,8 +0,0 @@ -model com.arsdigita.cms.contenttypes; - -import com.arsdigita.kernel.ACSObject; -import com.arsdigita.cms.*; - -object type Project extends GenericOrganizationalUnit { - reference key ( ct_projects.project_id ); -} diff --git a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/Project.java b/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/Project.java deleted file mode 100644 index ca23e7243..000000000 --- a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/Project.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.arsdigita.cms.contenttypes; - -import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.OID; -import java.math.BigDecimal; - -/** - * - * @author Jens Pelzetter - */ -public class Project extends GenericOrganizationalUnit{ - - public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Project"; - - public Project() { - super(BASE_DATA_OBJECT_TYPE); - } - - public Project(BigDecimal id ) throws DataObjectNotFoundException{ - this(new OID(BASE_DATA_OBJECT_TYPE, id)); - } - - public Project(OID oid) { - super(oid); - } - - public Project(DataObject obj) { - super(obj); - } - - public Project(String type) { - super(type); - } - -} diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java index fb4923fd6..7b95d2a2b 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java @@ -25,8 +25,7 @@ import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.SaveCancelSection; import com.arsdigita.bebop.event.FormSectionEvent; -import com.arsdigita.bebop.form.Option; -import com.arsdigita.bebop.form.SingleSelect; +import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.parameters.NotNullValidationListener; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; @@ -72,19 +71,17 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm { ParameterModel roleParam = new StringParameter( GenericOrganizationalUnitPersonCollection.PERSON_ROLE); - SingleSelect roleSelect = new SingleSelect(roleParam); + /*SingleSelect roleSelect = new SingleSelect(roleParam); roleSelect.addValidationListener(new NotNullValidationListener()); roleSelect.addOption( new Option("", new Label((String) ContenttypesGlobalizationUtil. globalize("cms.ui.select_one").localize()))); - roleSelect.addOption(new Option("Dummy", "Dummy")); - roleSelect.addOption(new Option("Boss", "Boss")); - roleSelect.addOption(new Option("Terrorist", "Terrorist")); - - add(roleSelect); - + add(roleSelect);*/ + TextField role = new TextField(roleParam); + role.addValidationListener(new NotNullValidationListener()); + add(role); } @Override diff --git a/ccm-cms/src/com/arsdigita/cms/installer/ContentCenterSetup.java b/ccm-cms/src/com/arsdigita/cms/installer/ContentCenterSetup.java index f4ff6c508..5247cae37 100755 --- a/ccm-cms/src/com/arsdigita/cms/installer/ContentCenterSetup.java +++ b/ccm-cms/src/com/arsdigita/cms/installer/ContentCenterSetup.java @@ -203,6 +203,7 @@ public final class ContentCenterSetup { try { while ( dq.next() ) { String privilege = (String) dq.get(PRIVILEGE); + s_log.warn(String.format("privilege = %s", privilege)); if ( PrivilegeDescriptor.get(privilege) == null ) { PrivilegeDescriptor.createPrivilege(privilege); } diff --git a/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java b/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java index b6655b8c2..0b17d85d5 100755 --- a/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java +++ b/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; +import org.apache.log4j.Logger; /** * Describes a privilege that can be granted or checked. @@ -46,78 +47,70 @@ public class PrivilegeDescriptor { private static final String WRITE_NAME = "write"; private static final String CREATE_NAME = "create"; private static final String DELETE_NAME = "delete"; - /** * The PrivilegeDescriptor corresponding to the primitive admin privilege */ - public static final PrivilegeDescriptor ADMIN = + public static final PrivilegeDescriptor ADMIN = new PrivilegeDescriptor(ADMIN_NAME); - /** * The PrivilegeDescriptor corresponding to the read and write privilege **/ public static final PrivilegeDescriptor EDIT = - new PrivilegeDescriptor(EDIT_NAME); - + new PrivilegeDescriptor(EDIT_NAME); /** * The PrivilegeDescriptor corresponding to the primitive read privilege */ public static final PrivilegeDescriptor READ = - new PrivilegeDescriptor(READ_NAME); - + new PrivilegeDescriptor(READ_NAME); /** * The PrivilegeDescriptor corresponding to the primitive write privilege */ public static final PrivilegeDescriptor WRITE = - new PrivilegeDescriptor(WRITE_NAME); - + new PrivilegeDescriptor(WRITE_NAME); /** * The PrivilegeDescriptor corresponding to the primitive create privilege */ public static final PrivilegeDescriptor CREATE = - new PrivilegeDescriptor(CREATE_NAME); - + new PrivilegeDescriptor(CREATE_NAME); /** * The PrivilegeDescriptor corresponding to the primitive delete privilege */ public static final PrivilegeDescriptor DELETE = - // new PrivilegeDescriptor(DELETE_NAME); - new PrivilegeDescriptor(DELETE_NAME); - + // new PrivilegeDescriptor(DELETE_NAME); + new PrivilegeDescriptor(DELETE_NAME); private String m_displayName; - private static Map s_privs = Collections.synchronizedMap(new HashMap()); - private String m_name; - private String m_columnName; - private Collection m_implyingPrivs; - + private static final Logger s_log = Logger.getLogger( + PrivilegeDescriptor.class); /** * Adds a privilege, identified by a name (string), to the system. * + * @param name + * @return * @exception PersistenceException when there is a persistence * error in saving the new privilege. * * @see #get(String) */ public static PrivilegeDescriptor createPrivilege(String name) - throws PersistenceException - { - if (get(name)!=null) { - throw new - IllegalArgumentException("Privilege " + name + " already exists"); + throws PersistenceException { + if (get(name) != null) { + throw new IllegalArgumentException("Privilege " + name + + " already exists"); } - DataObject priv = SessionManager.getSession() - .create("com.arsdigita.kernel.permissions.Privilege"); + DataObject priv = SessionManager.getSession().create( + "com.arsdigita.kernel.permissions.Privilege"); priv.set("privilege", name); priv.save(); addChildPrivilege(ADMIN_NAME, name); + s_log.warn(String.format("Creating privilege %s...", name)); // Constructor PrivilegeDescriptor is deprecated and should be // replace the class method get(name) - // PrivilegeDescriptor desc = new PrivilegeDescriptor(name); + //PrivilegeDescriptor desc = new PrivilegeDescriptor(name); PrivilegeDescriptor desc = get(name); put(desc); return desc; @@ -130,21 +123,21 @@ public class PrivilegeDescriptor { * @param privilegeName privilege name will include another privilege * @param childPrivilegeName privilege name is included by priv...Name. */ - public static void addChildPrivilege( String privilegeName, - String childPrivilegeName) { + public static void addChildPrivilege(String privilegeName, + String childPrivilegeName) { - DataOperation addOp = - SessionManager.getSession().retrieveDataOperation( - "com.arsdigita.kernel.permissions.addChildPrivilege"); - addOp.setParameter("privilege", privilegeName); - addOp.setParameter("childPrivilege", childPrivilegeName); - addOp.execute(); - synchronized (s_privs) { - s_privs.remove(privilegeName); - PrivilegeDescriptor priv = new PrivilegeDescriptor(privilegeName); - s_privs.put(privilegeName, priv); + DataOperation addOp = + SessionManager.getSession().retrieveDataOperation( + "com.arsdigita.kernel.permissions.addChildPrivilege"); + addOp.setParameter("privilege", privilegeName); + addOp.setParameter("childPrivilege", childPrivilegeName); + addOp.execute(); + synchronized (s_privs) { + s_privs.remove(privilegeName); + PrivilegeDescriptor priv = new PrivilegeDescriptor(privilegeName); + s_privs.put(privilegeName, priv); - } + } } /** @@ -180,8 +173,7 @@ public class PrivilegeDescriptor { * @see #get(String) */ public void deletePrivilege() - throws PersistenceException - { + throws PersistenceException { OID oid = new OID("com.arsdigita.kernel.permissions.Privilege", m_name); @@ -231,7 +223,6 @@ public class PrivilegeDescriptor { return m_columnName; } - /** * Determines whether this PrivilegeDescriptor is equal to some other * PrivilegeDescriptor. Equality is based on privilege name. @@ -239,7 +230,7 @@ public class PrivilegeDescriptor { * false otherwise. */ public boolean equals(Object o) { - if (! (o instanceof PrivilegeDescriptor)) { + if (!(o instanceof PrivilegeDescriptor)) { return false; } if (m_name == null) { @@ -264,15 +255,15 @@ public class PrivilegeDescriptor { public PrivilegeDescriptor(String name) { m_name = name; - DataQuery query = SessionManager.getSession() - .retrieveQuery("com.arsdigita.kernel.permissions.PrivilegeColumnNameMap"); + DataQuery query = SessionManager.getSession().retrieveQuery( + "com.arsdigita.kernel.permissions.PrivilegeColumnNameMap"); query.setParameter("privilege", name); if (!query.next()) { - query.close(); - throw new - RuntimeException("Couldn't find column name for privilege - " + name ); + query.close(); + throw new RuntimeException("Couldn't find column name for privilege - " + + name); } else { - m_columnName = (String)query.get("columnName"); + m_columnName = (String) query.get("columnName"); } query.close(); } @@ -281,8 +272,12 @@ public class PrivilegeDescriptor { * Puts a privilege descriptor into the internal cache that is used by * the get method. The put method supports extendibility by allowing * subclasses to be returned by the get method. + * @param privDesc */ protected static void put(PrivilegeDescriptor privDesc) { + if (privDesc == null) { + throw new NullPointerException("privDesc is null"); + } s_privs.put(privDesc.getName(), privDesc); } @@ -295,11 +290,11 @@ public class PrivilegeDescriptor { return m_implyingPrivs; } m_implyingPrivs = new HashSet(); - DataQuery query = SessionManager.getSession() - .retrieveQuery("com.arsdigita.kernel.permissions.ImpliedPrivilege"); + DataQuery query = SessionManager.getSession().retrieveQuery( + "com.arsdigita.kernel.permissions.ImpliedPrivilege"); query.setParameter("childPrivilege", m_name); while (query.next()) { - m_implyingPrivs.add((String)query.get("privilege")); + m_implyingPrivs.add((String) query.get("privilege")); } return m_implyingPrivs; } @@ -334,14 +329,13 @@ public class PrivilegeDescriptor { * Called from the kernel initializer. */ public static void initialize() { - DataCollection privs = SessionManager.getSession() - .retrieve("com.arsdigita.kernel.permissions.Privilege"); - while (privs.next()) { - String name = (String) privs.get("privilege"); - final PrivilegeDescriptor desc = new PrivilegeDescriptor(name); - put(desc); - } + DataCollection privs = SessionManager.getSession().retrieve( + "com.arsdigita.kernel.permissions.Privilege"); + while (privs.next()) { + String name = (String) privs.get("privilege"); + final PrivilegeDescriptor desc = new PrivilegeDescriptor(name); + put(desc); + } privs.close(); } - } diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInCollectedVolume.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInCollectedVolume.pdl index c7fd12873..fd23e132e 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInCollectedVolume.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInCollectedVolume.pdl @@ -23,7 +23,7 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentPage; // PDL definition for a collected volume -object type ArticleInCollectedVolume extends PublicationWithPublisher { +object type ArticleInCollectedVolume extends Publication { Integer[0..1] pagesFrom = ct_article_in_collected_volume.pages_from INTEGER; Integer[0..1] pagesTo = ct_article_in_collected_volume.pages_to INTEGER; diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInJournal.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInJournal.pdl index e1e78dba6..84db3ff09 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInJournal.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInJournal.pdl @@ -30,8 +30,7 @@ object type ArticleInJournal extends Publication { String[0..1] issue = ct_article_in_journal.issue VARCHAR(512); Integer[0..1] pagesFrom = ct_article_in_journal.pages_from INTEGER; Integer[0..1] pagesTo = ct_article_in_journal.pages_to INTEGER; - String[0..1] issn = ct_article_in_journal.issn VARCHAR(9); - String[0..1] url = ct_article_in_journal.url VARCHAR(512); + String[0..1] issn = ct_article_in_journal.issn VARCHAR(9); Date[0..1] publicationDate = ct_article_in_journal.publication_date DATE; reference key (ct_article_in_journal.article_in_journal_id); diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl index 57c9951cd..5360958e0 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl @@ -25,11 +25,6 @@ import com.arsdigita.cms.ContentPage; // PDL definition for a collected volume object type CollectedVolume extends PublicationWithPublisher { - Integer[0..1] volume = ct_collected_volume.volume INTEGER; - Integer[0..1] numberOfVolumes = ct_collected_volume.number_of_volumes INTEGER; - Integer[0..1] numberOfPages = ct_collected_volume._number_of_pages INTEGER; - String[0..1] edition = ct_collected_volume.edition VARCHAR(256); - reference key (ct_collected_volume.collected_volume_id); } diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/Expertise.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/Expertise.pdl index be3c5f07e..1db63513a 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/Expertise.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/Expertise.pdl @@ -29,7 +29,6 @@ object type Expertise extends Publication { component GenericOrganizationalUnit[0..1] organization = join ct_expertise.organization_id to cms_organizationalunits.organizationalunit_id; Integer[0..1] numberOfPages = ct_expertise.number_of_pages INTEGER; - String[0..1] url = ct_expertise.url VARCHAR(512); component GenericOrganizationalUnit[0..1] orderer = join ct_expertise.orderer_id to cms_organizationalunits.organizationalunit_id; diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/GreyLiterature.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/GreyLiterature.pdl index 3b6560076..925c04d63 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/GreyLiterature.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/GreyLiterature.pdl @@ -26,8 +26,7 @@ import com.arsdigita.cms.ContentPage; object type GreyLiterature extends UnPublished { Integer[0..1] pagesFrom = ct_grey_literature.pagesFrom INTEGER; - Integer[0..1] pagesTo = ct_grey_literature.pagesTo INTEGER; - String[0..1] url = ct_grey_literature.url VARCHAR(512); + Integer[0..1] pagesTo = ct_grey_literature.pagesTo INTEGER; reference key (ct_grey_literature.grey_literature_id); diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/InProceedings.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/InProceedings.pdl index 7701d7360..caad5a7e6 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/InProceedings.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/InProceedings.pdl @@ -23,16 +23,8 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentPage; // PDL definition for InProceedings publication -object type InProceedings extends PublicationWithPublisher { +object type InProceedings extends Publication { - String[0..1] organizerOfConference = ct_inproceedings.organizer_of_conference VARCHAR(256); - String[0..1] nameOfConference = ct_inproceedings.name_of_conference VARCHAR(256); - Date[0..1] dateFromOfConference = ct_inproceedings.date_from_of_conference DATE; - Date[0..1] dateToOfConference = ct_inproceedings.date_to_of_conference DATE; - String[0..1] placeOfConference = ct_inproceedings.place_of_conference VARCHAR(256); - Integer[0..1] volume = ct_inproceedings.volume INTEGER; - Integer[0..1] numberOfVolumes = ct_inproceedings.numberOfVolumes INTEGER; - Integer[0..1] numberOfPages = ct_inproceedings.numberOfPages INTEGER; Integer[0..1] pagesFrom = ct_inproceedings.pages_from INTEGER; Integer[0..1] pagesTo = ct_inproceedings.pages_to INTEGER; diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl index 2c9eb5713..4816c7a01 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/InternetArticle.pdl @@ -28,7 +28,6 @@ object type InternetArticle extends Publication { String[0..1] place = ct_internet_article.place VARCHAR(256); component GenericOrganizationalUnit[0..1] organization = join ct_internet_article.organization_id to cms_organizationalunits.organizationalunit_id; - String[0..1] url = ct_article_in_journal.url VARCHAR(512); String[0..1] number = ct_internet_article.number VARCHAR(128); Integer[0..1] numberOfPages = ct_internet_article.number_of_pages INTEGER; String[0..1] edition = ct_internet_article.edition VARCHAR(256); diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/Monograph.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/Monograph.pdl index 89dd235eb..67e8b7b88 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/Monograph.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/Monograph.pdl @@ -25,11 +25,6 @@ import com.arsdigita.cms.ContentPage; // PDL definition for a monograph object type Monograph extends PublicationWithPublisher { - Integer[0..1] volume = ct_monograph.volume INTEGER; - Integer[0..1] numberOfVolumes = ct_monograph.number_of_volumes INTEGER; - Integer[0..1] numberOfPages = ct_monograph.number_of_pages INTEGER; - String[0..1] edition = ct_monograph.edition VARCHAR(512); - reference key (ct_monograph.monograph_id); } diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl new file mode 100644 index 000000000..a95eeba7e --- /dev/null +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl @@ -0,0 +1,50 @@ +// +// Copyright (C) 2010 Jens Pelzetter, for the Center of Social Politics (ZeS) of +// the University of Bremen +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// + +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.ContentPage; + +// PDL definition for proceedings +object type Proceedings extends PublicationWithPublisher { + + component GenericOrganizationalUnit[0..1] organizerOfConference = join ct_proceedings.organizer_id + to cms_organizationalunits.organizationalunit_id; + String[0..1] nameOfConference = ct_proceedings.nameOfConference; + String[0..1] placeOfConference = ct_proceedings.place_of_conference; + Date[0..1] dateFromOfConference = ct_proceedings.date_from_of_conference DATE; + Date[0..1] dateToOfConference = ct_proceedings.date_to_of_conference DATE; + + reference key (ct_proceedings.proceedings_id); +} + +association { + + Proceedings[0..1] proceedings = join ct_inproceedings.inproceedings_id + to ct_proceedings_papers_map.paper_id, + join ct_proceedings_papers_map.proceedings_id + to ct_proceedings.proceedings_id; + InProceedings[0..n] papers = join ct_proceedings.proceedings_id + to ct_proceedings_papers_map.proceedings_id, + join ct_proceedings_papers_map.paper_id + to ct_inproceedings.inproceedings_id; + + Integer[0..1] paperOrder = ct_proceedings_papers_map.paper_order INTEGER; +} diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/PublicationWithPublisher.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/PublicationWithPublisher.pdl index 1d94c64e7..de25375d2 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/PublicationWithPublisher.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/PublicationWithPublisher.pdl @@ -26,7 +26,10 @@ import com.arsdigita.cms.ContentPage; object type PublicationWithPublisher extends Publication { String[0..1] isbn = ct_publication_with_publisher.isbn VARCHAR(17); - String[0..1] url = ct_article_in_journal.url VARCHAR(512); + Integer[0..1] volume = ct_publication_with_publisher.volume INTEGER; + Integer[0..1] numberOfVolumes = ct_publication_with_publisher.number_of_volumes INTEGER; + Integer[0..1] numberOfPages = ct_publication_with_publisher._number_of_pages INTEGER; + String[0..1] edition = ct_publication_with_publisher.edition VARCHAR(256); component Publisher[0..1] publisher = join ct_publication_with_publisher.publisher_id to ct_publisher.publisher_id; diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/Review.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/Review.pdl index a01f90a47..83a9e5d96 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/Review.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/Review.pdl @@ -23,17 +23,6 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentPage; // PDL definition for a InternetArticle publication -object type Review extends Publication { - - String[0..1] journal = ct_review.journal VARCHAR(512); - Integer[0..1] volume = ct_review.volume INTEGER; - String[0..1] issue = ct_review.issue VARCHAR(512); - Integer[0..1] pagesFrom = ct_review.pages_from INTEGER; - Integer[0..1] pagesTo = ct_review.pages_to INTEGER; - String[0..1] issn = ct_review.issn VARCHAR(9); - String[0..1] url = ct_review.url VARCHAR(512); - Date[0..1] publicationDate = ct_review.publication_date DATE; - +object type Review extends ArticleInJournal { reference key (ct_review.review_id); - } \ No newline at end of file diff --git a/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Proceedings.xml b/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Proceedings.xml new file mode 100644 index 000000000..99f219d0f --- /dev/null +++ b/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Proceedings.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml b/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml new file mode 100644 index 000000000..d6aa04475 --- /dev/null +++ b/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/ccm-sci-publications/src/ccm-sci-publications.load b/ccm-sci-publications/src/ccm-sci-publications.load index c665ff50d..0d243acb4 100644 --- a/ccm-sci-publications/src/ccm-sci-publications.load +++ b/ccm-sci-publications/src/ccm-sci-publications.load @@ -13,6 +13,7 @@
+
@@ -29,6 +30,7 @@ + @@ -48,6 +50,7 @@ + diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.java index e44bed3ba..fb12e9fdb 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.java @@ -28,28 +28,27 @@ import java.math.BigDecimal; * * @author Jens Pelzetter */ -public class ArticleInCollectedVolume extends PublicationWithPublisher { +public class ArticleInCollectedVolume extends Publication { public final static String PAGES_FROM = "pagesFrom"; public final static String PAGES_TO = "pagesTo"; public final static String CHAPTER = "chapter"; public final static String COLLECTED_VOLUME = "collectedVolume"; - public final static String BASE_DATA_OBJECT_TYPE = - "com.arsdigita.cms.contenttypes.ArticleInCollectedVolume"; + "com.arsdigita.cms.contenttypes.ArticleInCollectedVolume"; public ArticleInCollectedVolume() { this(BASE_DATA_OBJECT_TYPE); } public ArticleInCollectedVolume(BigDecimal id) - throws DataObjectNotFoundException{ + throws DataObjectNotFoundException { this(new OID(BASE_DATA_OBJECT_TYPE, id)); } public ArticleInCollectedVolume(OID oid) throws - DataObjectNotFoundException{ + DataObjectNotFoundException { super(oid); } @@ -62,7 +61,7 @@ public class ArticleInCollectedVolume extends PublicationWithPublisher { } public Integer getPagesFrom() { - return (Integer)get(PAGES_FROM); + return (Integer) get(PAGES_FROM); } public void setPagesFrom(Integer pagesFrom) { @@ -70,7 +69,7 @@ public class ArticleInCollectedVolume extends PublicationWithPublisher { } public Integer getPagesTo() { - return (Integer)get(PAGES_TO); + return (Integer) get(PAGES_TO); } public void setPagesTo(Integer pagesTo) { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolumeCollection.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolumeCollection.java index 6f6ca7ef9..18e98d4a8 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolumeCollection.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInCollectedVolumeCollection.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2010 Jens Pelzetter, -for the Center of Social Politics of the University of Bremen + * for the Center of Social Politics of the University of Bremen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInJournal.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInJournal.java index 0642b66e2..ec735fc9c 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInJournal.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ArticleInJournal.java @@ -18,7 +18,6 @@ public class ArticleInJournal extends Publication { public static final String PAGES_FROM = "pagesFrom"; public static final String PAGES_TO = "pagesTo"; public static final String ISSN = "issn"; - public static final String URL = "url"; public static final String PUBLICATION_DATE = "publicationDate"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.ArticleInJournal"; @@ -91,14 +90,6 @@ public class ArticleInJournal extends Publication { set(ISSN, issn); } - public String getUrl() { - return (String) get(URL); - } - - public void setUrl(String url) { - set(URL, url); - } - public Date getPublicationDate() { return (Date) get(PUBLICATION_DATE); } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/CollectedVolume.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/CollectedVolume.java index 0bc026343..5f438c731 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/CollectedVolume.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/CollectedVolume.java @@ -34,10 +34,6 @@ import java.math.BigDecimal; */ public class CollectedVolume extends PublicationWithPublisher { - public static final String VOLUME = "volume"; - public static final String NUMBER_OF_VOLUMES = "numberOfVolumes"; - public static final String NUMBER_OF_PAGES = "numberOfPages"; - public static final String EDITION = "edition"; public static final String ARTICLES = "articles"; public static final String ARTICLE_ORDER = "articleOrder"; public static final String BASE_DATA_OBJECT_TYPE = @@ -63,46 +59,14 @@ public class CollectedVolume extends PublicationWithPublisher { super(type); } - public Integer getVolume() { - return (Integer) get(VOLUME); - } - - public void setVolume(Integer volume) { - set(VOLUME, volume); - } - - public Integer getNumberOfVolumes() { - return (Integer) get(NUMBER_OF_VOLUMES); - } - - public void setNumberOfVolumes(Integer numberOfVolumes) { - set(NUMBER_OF_VOLUMES, numberOfVolumes); - } - - public Integer getNumberOfPages() { - return (Integer) get(NUMBER_OF_PAGES); - } - - public void setNumberOfPages(Integer numberOfPages) { - set(NUMBER_OF_PAGES, numberOfPages); - } - - public String getEdition() { - return (String) get(EDITION); - } - - public void setEdition(String edition) { - set(EDITION, edition); - } - public ArticleInCollectedVolumeCollection getArticles() { return new ArticleInCollectedVolumeCollection( (DataCollection) get(ARTICLES)); } - + public void addArticle(ArticleInCollectedVolume article) { Assert.exists(article, ArticleInCollectedVolume.class); - + DataObject link = add(ARTICLES, article); link.set(ARTICLE_ORDER, Integer.valueOf((int) getArticles().size())); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Expertise.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Expertise.java index af3823b14..29bdfa386 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Expertise.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Expertise.java @@ -33,8 +33,7 @@ public class Expertise extends Publication { public static final String PLACE = "place"; public static final String ORGANIZATION = "organization"; - public static final String NUMBER_OF_PAGES = "numberOfPages"; - public static final String URL = "url"; + public static final String NUMBER_OF_PAGES = "numberOfPages"; public static final String ORDERER = "orderer"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Expertise"; @@ -93,14 +92,6 @@ public class Expertise extends Publication { set(NUMBER_OF_PAGES, numberOfPages); } - public String getUrl() { - return (String) get(URL); - } - - public void setUrl(String url) { - set(URL, url); - } - public GenericOrganizationalUnit getOrderer() { DataObject dataObj; diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/GreyLiterature.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/GreyLiterature.java index 602dce509..72acfd223 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/GreyLiterature.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/GreyLiterature.java @@ -31,8 +31,7 @@ import java.math.BigDecimal; public class GreyLiterature extends UnPublished { public static final String PAGES_FROM = "pagesFrom"; - public static final String PAGES_TO = "pagesTo"; - public static final String URL = "url"; + public static final String PAGES_TO = "pagesTo"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.GreyLiterature"; @@ -71,12 +70,5 @@ public class GreyLiterature extends UnPublished { public void setPagesTo(Integer pagesTo) { set(PAGES_TO, pagesTo); } - - public String getUrl() { - return (String) get(URL); - } - - public void setUrl(String url) { - set(URL, url); - } + } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedings.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedings.java index ba16ba2ea..1554cfbff 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedings.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedings.java @@ -29,19 +29,11 @@ import java.util.Date; * * @author Jens Pelzetter */ -public class InProceedings extends PublicationWithPublisher { +public class InProceedings extends Publication { - public static final String ORGANIZER_OF_CONFERENCE = - "organizerOfConference"; - public static final String NAME_OF_CONFERENCE = "nameOfConference"; - public static final String DATE_FROM_OF_CONFERENCE = "dateFromOfConference"; - public static final String DATE_TO_OF_CONFERENCE = "dateToOfConference"; - public static final String PLACE_OF_CONFERENCE = "placeOfConference"; - public static final String VOLUME = "volume"; - public static final String NUMBER_OF_VOLUMES = "numberOfVolumes"; - public static final String NUMBER_OF_PAGES = "numberOfPages"; public static final String PAGES_FROM = "pagesFrom"; public static final String PAGES_TO = "pagesTo"; + public static final String PROCEEDINGS = "proceedings"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.InProceedings"; @@ -65,70 +57,6 @@ public class InProceedings extends PublicationWithPublisher { super(type); } - public String getOrganizerOfConference() { - return (String) get(ORGANIZER_OF_CONFERENCE); - } - - public void setOrganizerOfConference(String organizerOfConference) { - set(ORGANIZER_OF_CONFERENCE, organizerOfConference); - } - - public String getNameOfConference() { - return (String) get(NAME_OF_CONFERENCE); - } - - public void setNameOfConference(String nameOfConference) { - set(NAME_OF_CONFERENCE, nameOfConference); - } - - public Date getDateFromOfConference() { - return (Date) get(DATE_FROM_OF_CONFERENCE); - } - - public void setDateFromOfConference(Date dateFromOfConference) { - set(DATE_FROM_OF_CONFERENCE, dateFromOfConference); - } - - public Date getDateToOfConference() { - return (Date) get(DATE_TO_OF_CONFERENCE); - } - - public void setDateToOfConference(Date dateToOfConference) { - set(DATE_TO_OF_CONFERENCE, dateToOfConference); - } - - public String getPlaceOfConference() { - return (String) get(PLACE_OF_CONFERENCE); - } - - public void setPlaceOfConference(String place) { - set(PLACE_OF_CONFERENCE, place); - } - - public Integer getVolume() { - return (Integer) get(VOLUME); - } - - public void setVolume(Integer volume) { - set(VOLUME, volume); - } - - public Integer getNumberOfVolumes() { - return (Integer) get(NUMBER_OF_VOLUMES); - } - - public void setNumberOfVolumes(Integer numberOfVolumes) { - set(NUMBER_OF_VOLUMES, numberOfVolumes); - } - - public Integer getNumberOfPages() { - return (Integer) get(NUMBER_OF_PAGES); - } - - public void setNumberOfPages(Integer numberOfPages) { - set(NUMBER_OF_PAGES, numberOfPages); - } - public Integer getPagesFrom() { return (Integer) get(PAGES_FROM); } @@ -144,4 +72,12 @@ public class InProceedings extends PublicationWithPublisher { public void setPagesTo(Integer pagesTo) { set(PAGES_TO, pagesTo); } + + public Proceedings getProceedings() { + return (Proceedings) get(PROCEEDINGS); + } + + public void setProceedings(Proceedings proceedings) { + set(PROCEEDINGS, proceedings); + } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedingsCollection.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedingsCollection.java new file mode 100644 index 000000000..db508195b --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InProceedingsCollection.java @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.domain.DomainCollection; +import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class InProceedingsCollection extends DomainCollection { + + public static final String LINKORDER = "link.paperOrder"; + public static final String ORDER = "paperOrder"; + private static final Logger s_log = + Logger.getLogger(InProceedingsCollection.class); + + public InProceedingsCollection(DataCollection dataCollection) { + super(dataCollection); + + m_dataCollection.addOrder(LINKORDER); + } + + public Integer getPaperOrder() { + return (Integer) m_dataCollection.get(LINKORDER); + } + + public void setPaperOrder(Integer order) { + DataObject link = (DataObject) this.get("link"); + + link.set(ORDER, order); + } + + public void swapWithNext(InProceedings paper) { + int currentPosition = 0; + int currentIndex = 0; + int nextIndex = 0; + + s_log.debug("Searching paper..."); + this.rewind(); + while (this.next()) { + currentPosition = this.getPosition(); + currentIndex = this.getPaperOrder(); + s_log.debug(String.format("Position: %d(%d)/%d", currentPosition, + currentIndex, this.size())); + s_log.debug(String.format("getPaperOrder(): %d", + getPaperOrder())); + if (this.getPaper().equals(paper)) { + break; + } + } + + if (currentPosition == 0) { + throw new IllegalArgumentException( + String.format( + "The provided article is not " + + "part of this collection.")); + } + + if (this.next()) { + nextIndex = this.getPaperOrder(); + } else { + throw new IllegalArgumentException( + "The provided paper is the last " + + "in the collection, so there is no next object " + + "to swap with."); + } + + this.rewind(); + + while (this.getPosition() != currentPosition) { + this.next(); + } + + this.setPaperOrder(nextIndex); + this.next(); + this.setPaperOrder(currentIndex); + this.rewind(); + } + + public void swapWithPrevious(InProceedings paper) { + int previousPosition = 0; + int previousIndex = 0; + int currentPosition = 0; + int currentIndex = 0; + + s_log.debug("Searching paper..."); + this.rewind(); + while (this.next()) { + currentPosition = this.getPosition(); + currentIndex = this.getPaperOrder(); + s_log.debug(String.format("Position: %d(%d)/%d", currentPosition, + currentIndex, this.size())); + s_log.debug(String.format("getPaperOrder(): %d", + getPaperOrder())); + if (this.getPaper().equals(paper)) { + break; + } + + previousPosition = currentPosition; + previousIndex = currentIndex; + } + + if (currentPosition == 0) { + throw new IllegalArgumentException( + String.format( + "The provided paper is not " + + "part of this collection.")); + } + + if (previousPosition == 0) { + throw new IllegalArgumentException( + String.format( + "The provided paper is the first one in this " + + "collection, so there is no previous one to switch " + + "with.")); + } + + this.rewind(); + while (this.getPosition() != previousPosition) { + this.next(); + } + + this.setPaperOrder(currentIndex); + this.next(); + this.setPaperOrder(previousIndex); + this.rewind(); + } + + public InProceedings getPaper() { + return new InProceedings(m_dataCollection.getDataObject()); + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java index 8374ca13e..60d9acebe 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/InternetArticle.java @@ -37,7 +37,6 @@ public class InternetArticle extends Publication { public static final String NUMBER_OF_PAGES = "numberOfPages"; public static final String EDITION = "edition"; public static final String ISSN = "issn"; - public static final String URL = "url"; public static final String PUBLICATION_DATE = "publicationDate"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.InternetArticle"; @@ -125,12 +124,4 @@ public class InternetArticle extends Publication { public void setPublicationDate(Date pubDate) { set(PUBLICATION_DATE, pubDate); } - - public String getUrl() { - return (String) get(URL); - } - - public void setUrl(String url) { - set(URL, url); - } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Monograph.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Monograph.java index bf1d0e23f..635fe79dd 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Monograph.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Monograph.java @@ -29,11 +29,7 @@ import java.math.BigDecimal; * @author Jens Pelzetter */ public class Monograph extends PublicationWithPublisher { - - public static final String VOLUME = "volume"; - public static final String NUMBER_OF_VOLUMES = "numberOfVolumes"; - public static final String NUMBER_OF_PAGES = "numberOfPages"; - public static final String EDITION = "edition"; + public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Monograph"; @@ -56,36 +52,5 @@ public class Monograph extends PublicationWithPublisher { public Monograph(String type) { super(type); } - - public Integer getVolume() { - return (Integer) get(VOLUME); - } - - public void setVolume(Integer volume) { - set(VOLUME, volume); - } - - public Integer getNumberOfVolumes() { - return (Integer) get(NUMBER_OF_VOLUMES); - } - - public void setNumberOfVolumes(Integer numberOfVolumes) { - set(NUMBER_OF_VOLUMES, numberOfVolumes); - } - - public Integer getNumberOfPages() { - return (Integer) get(NUMBER_OF_PAGES); - } - - public void setNumberOfPages(Integer numberOfPages) { - set(NUMBER_OF_PAGES, numberOfPages); - } - - public String getEdition() { - return (String) get(EDITION); - } - - public void setEdition(String edition) { - set(EDITION, edition); - } + } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java new file mode 100644 index 000000000..1356efa5f --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.OID; +import com.arsdigita.util.Assert; +import java.math.BigDecimal; +import java.util.Date; + +/** + * Content type of proceedings. Provides attributes for storing the data + * of the conference (name, date, place, organizer) and for linking the papers + * (objects of the content type {@link InProceedings} to a proceedings object. + * + * + * @author Jens Pelzetter + */ +public class Proceedings extends PublicationWithPublisher { + + public static final String ORGANIZER_OF_CONFERENCE = "organizerOfConference"; + public static final String NAME_OF_CONFERENCE = "nameOfConference"; + public static final String PLACE_OF_CONFERENCE = "placeOfConference"; + public static final String DATE_FROM_OF_CONFERENCE = "dateFromOfConference"; + public static final String DATE_TO_OF_CONFERENCE = "dateToOfConference"; + public static final String PAPERS = "papers"; + public static final String PAPER_ORDER = "paperOrder"; + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.cms.contenttypes.Proceedings"; + + public Proceedings() { + super(BASE_DATA_OBJECT_TYPE); + } + + public Proceedings(BigDecimal id) throws DataObjectNotFoundException { + this(new OID(BASE_DATA_OBJECT_TYPE, id)); + } + + public Proceedings(OID oid) throws DataObjectNotFoundException { + super(oid); + } + + public Proceedings(DataObject dataObject) { + super(dataObject); + } + + public Proceedings(String type) { + super(type); + } + + public GenericOrganizationalUnit getOrganizerOfConference() { + DataObject dataObj; + + dataObj = (DataObject) get(ORGANIZER_OF_CONFERENCE); + + if (dataObj == null) { + return null; + } else { + return new GenericOrganizationalUnit(dataObj); + } + } + + public void setOrganizerOfConference(GenericOrganizationalUnit organizer) { + set(ORGANIZER_OF_CONFERENCE, organizer); + } + + public String getNameOfConference() { + return (String) get(NAME_OF_CONFERENCE); + } + + public void setNameOfConference(String nameOfConference) { + set(NAME_OF_CONFERENCE, nameOfConference); + } + + public String getPlaceOfConference() { + return (String) get(PLACE_OF_CONFERENCE); + } + + public void setPlaceOfConference(String place) { + set(PLACE_OF_CONFERENCE, place); + } + + public Date getDateFromOfConference() { + return (Date) get(DATE_FROM_OF_CONFERENCE); + } + + public void setDateFromOfConference(Date dateFrom) { + set(DATE_FROM_OF_CONFERENCE, dateFrom); + } + + public Date getDateToOfConference() { + return (Date) get(DATE_FROM_OF_CONFERENCE); + } + + public void setDateToOfConference(Date dateTo) { + set(DATE_TO_OF_CONFERENCE, dateTo); + } + + public InProceedingsCollection getPapers() { + return new InProceedingsCollection((DataCollection) get(PAPERS)); + } + + public void addPaper(InProceedings paper) { + Assert.exists(paper, InProceedings.class); + + DataObject link = add(PAPERS, paper); + + link.set(PAPER_ORDER, Integer.valueOf((int) getPapers().size())); + } + + public void removePaper(InProceedings paper) { + Assert.exists(paper, InProceedings.class); + remove(PAPERS, paper); + } + + public boolean hasPapers() { + return !this.getPapers().isEmpty(); + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsInitializer.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsInitializer.java new file mode 100644 index 000000000..eaeb1f5dd --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsInitializer.java @@ -0,0 +1,30 @@ +package com.arsdigita.cms.contenttypes; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsInitializer extends ContentTypeInitializer { + + /** + * The pdl.mf file used here is empty, since the + * {@link PublicationInitializer} loads all things using the pdl.mf file + * of the module. Also, it may causes on silly errors in the load-bundle + * step if the same pdl.mf file is used in more than one initializer. + */ + + public ProceedingsInitializer() { + super("empty.pdl.mf", Proceedings.BASE_DATA_OBJECT_TYPE); + } + + @Override + public String[] getStylesheets() { + return new String[] {"/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl"}; + } + + @Override + public String getTraversalXML() { + return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml"; + } + +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsLoader.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsLoader.java new file mode 100644 index 000000000..30831aa35 --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ProceedingsLoader.java @@ -0,0 +1,19 @@ +package com.arsdigita.cms.contenttypes; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsLoader extends AbstractContentTypeLoader { + + private static final String[] TYPES = {"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Proceedings.xml"}; + + public ProceedingsLoader() { + super(); + } + + public String[] getTypes() { + return TYPES; + } + +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java index 16eae3dd2..240291e87 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/PublicationWithPublisher.java @@ -32,7 +32,10 @@ import org.apache.log4j.Logger; *

*
    *
  • ISBN
  • - *
  • URL
  • + *
  • volume
  • + *
  • numberOfVolumes
  • + *
  • numberOfPages
  • + *
  • edition
  • *
  • Publisher
  • *
*

@@ -45,7 +48,10 @@ import org.apache.log4j.Logger; public class PublicationWithPublisher extends Publication { public final static String ISBN = "isbn"; - public static final String URL = "url"; + public static final String VOLUME = "volume"; + public static final String NUMBER_OF_VOLUMES = "numberOfVolumes"; + public static final String NUMBER_OF_PAGES = "numberOfPages"; + public static final String EDITION = "edition"; public final static String PUBLISHER = "publisher"; public final static String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.PublicationWithPublisher"; @@ -93,14 +99,38 @@ public class PublicationWithPublisher extends Publication { set(ISBN, isbn); } - public String getUrl() { - return (String) get(URL); + public Integer getVolume() { + return (Integer) get(VOLUME); } - public void setUrl(String url) { - set(URL, url); + public void setVolume(Integer volume) { + set(VOLUME, volume); } + public Integer getNumberOfVolumes() { + return (Integer) get(NUMBER_OF_VOLUMES); + } + + public void setNumberOfVolumes(Integer numberOfVolumes) { + set(NUMBER_OF_VOLUMES, numberOfVolumes); + } + + public Integer getNumberOfPages() { + return (Integer) get(NUMBER_OF_PAGES); + } + + public void setNumberOfPages(Integer numberOfPages) { + set(NUMBER_OF_PAGES, numberOfPages); + } + + public String getEdition() { + return (String) get(EDITION); + } + + public void setEdition(String edition) { + set(EDITION, edition); + } + /** * Retrieves the publisher of the publication. * diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Review.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Review.java index 5169fc995..0ea2fc15c 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Review.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Review.java @@ -30,16 +30,7 @@ import java.util.Date; * * @author Jens Pelzetter */ -public class Review extends Publication { - - public static final String JOURNAL = "journal"; - public static final String VOLUME = "volume"; - public static final String ISSUE = "issue"; - public static final String PAGES_FROM = "pagesFrom"; - public static final String PAGES_TO = "pagesTo"; - public static final String ISSN = "issn"; - public static final String URL = "url"; - public static final String PUBLICATION_DATE = "publicationDate"; +public class Review extends ArticleInJournal { public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Review"; @@ -63,69 +54,4 @@ public class Review extends Publication { public Review(String type) { super(type); } - - public String getJournal() { - return (String) get(JOURNAL); - } - - public void setJournal(String journal) { - set(JOURNAL, journal); - } - - public Integer getVolume() { - return (Integer) get(VOLUME); - } - - public void setVolume(Integer volume) { - set(VOLUME, volume); - } - - public String getIssue() { - return (String) get(ISSUE); - } - - public void setIssue(String issue) { - set(ISSUE, issue); - } - - public Integer getPagesFrom() { - return (Integer) get(PAGES_FROM); - } - - public void setPagesFrom(Integer pagesFrom) { - set(PAGES_FROM, pagesFrom); - } - - public Integer getPagesTo() { - return (Integer) get(PAGES_TO); - } - - public void setPagesTo(Integer pagesTo) { - set(PAGES_TO, pagesTo); - } - - public String getISSN() { - return (String) get(ISSN); - } - - public void setISSN(String issn) { - set(ISSN, issn); - } - - public String getUrl() { - return (String) get(URL); - } - - public void setUrl(String url) { - set(URL, url); - } - - - public Date getPublicationDate() { - return (Date) get(PUBLICATION_DATE); - } - - public void setPublicationDate(Date pubDate) { - set(PUBLICATION_DATE, pubDate); - } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertiesStep.java index be850c100..5067de190 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertiesStep.java @@ -1,24 +1,47 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.ArticleInCollectedVolume; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * * @author Jens Pelzetter */ public class ArticleInCollectedVolumePropertiesStep - extends PublicationWithPublisherPropertiesStep { + extends PublicationPropertiesStep { public ArticleInCollectedVolumePropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); } + public static Component getArticleInCollectedVolumePropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep. + getPublicationPropertySheet(itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.article_in_collected_volume.pages_from"), + ArticleInCollectedVolume.PAGES_FROM); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.article_in_collected_volume.pages_to"), + ArticleInCollectedVolume.PAGES_TO); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.article_in_collected_volume.chapter"), + ArticleInCollectedVolume.CHAPTER); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -38,7 +61,7 @@ public class ArticleInCollectedVolumePropertiesStep getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getArticleInCollectedVolumePropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertyForm.java index 81631652d..d5fd3c09c 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInCollectedVolumePropertyForm.java @@ -19,7 +19,7 @@ import com.arsdigita.cms.contenttypes.ArticleInCollectedVolume; * @author Jens Pelzetter */ public class ArticleInCollectedVolumePropertyForm - extends PublicationWithPublisherPropertyForm + extends PublicationPropertyForm implements FormProcessListener, FormInitListener, FormSubmissionListener { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertiesStep.java index dd1c691d8..83768ff35 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ArticleInJournalPropertiesStep.java @@ -1,11 +1,14 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.ArticleInJournal; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * @@ -18,6 +21,42 @@ public class ArticleInJournalPropertiesStep extends PublicationPropertiesStep { super(itemModel, parent); } + public static Component getArticleInJournalPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep. + getPublicationPropertySheet(itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.journal"), + ArticleInJournal.JOURNAL); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.volume"), + ArticleInJournal.VOLUME); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.issue"), + ArticleInJournal.ISSUE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.pages_from"), + ArticleInJournal.PAGES_FROM); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.pages_to"), + ArticleInJournal.PAGES_TO); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.issn"), + ArticleInJournal.ISSN); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.articleinjournal.publication_date"), + ArticleInJournal.PUBLICATION_DATE); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -38,7 +77,7 @@ public class ArticleInJournalPropertiesStep extends PublicationPropertiesStep { getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getArticleInJournalPropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( 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 a321b9aff..9ebcc4adf 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 @@ -20,7 +20,7 @@ import java.util.GregorianCalendar; /** * - * @author jensp + * @author Jens Pelzetter */ public class ArticleInJournalPropertyForm extends PublicationPropertyForm @@ -86,12 +86,6 @@ public class ArticleInJournalPropertyForm TextField issn = new TextField(issnParam); add(issn); - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.articleinjournal.url").localize())); - ParameterModel urlParam = new StringParameter(ArticleInJournal.URL); - TextField url = new TextField(urlParam); - add(url); - Calendar today = new GregorianCalendar(); add(new Label((String) PublicationGlobalizationUtil.globalize( "publications.ui.articleinjournal.publicationDate"). @@ -117,8 +111,7 @@ public class ArticleInJournalPropertyForm data.put(ArticleInJournal.ISSUE, article.getIssue()); data.put(ArticleInJournal.PAGES_FROM, article.getPagesFrom()); data.put(ArticleInJournal.PAGES_TO, article.getPagesTo()); - data.put(ArticleInJournal.ISSN, article.getISSN()); - data.put(ArticleInJournal.URL, article.getUrl()); + data.put(ArticleInJournal.ISSN, article.getISSN()); data.put(ArticleInJournal.PUBLICATION_DATE, article.getPublicationDate()); } @@ -140,9 +133,7 @@ public class ArticleInJournalPropertyForm article.setPagesTo( (Integer) data.get(ArticleInJournal.PAGES_TO)); article.setISSN( - (String) data.get(ArticleInJournal.ISSN)); - article.setUrl( - (String) data.get(ArticleInJournal.URL)); + (String) data.get(ArticleInJournal.ISSN)); article.setPublicationDate( (Date) data.get(ArticleInJournal.PUBLICATION_DATE)); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumeArticlesTable.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumeArticlesTable.java index c455b683f..b0b79b05a 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumeArticlesTable.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumeArticlesTable.java @@ -91,6 +91,7 @@ public class CollectedVolumeArticlesTable m_itemModel = itemModel; } + @Override public TableModel makeModel(Table table, PageState state) { table.getRowSelectionModel().clearSelection(state); CollectedVolume collectedVolume = @@ -149,6 +150,7 @@ public class CollectedVolumeArticlesTable } } + @Override public Object getKeyAt(int columnIndex) { return m_article.getID(); } @@ -270,8 +272,7 @@ public class CollectedVolumeArticlesTable ArticleInCollectedVolumeCollection articles = collectedVolume.getArticles(); - if ((articles.size() - 1) - == row) { + if ((articles.size() - 1) == row) { s_log.debug("Row is last row in table, don't show down link"); Label label = new Label(""); return label; @@ -299,7 +300,6 @@ public class CollectedVolumeArticlesTable TableColumn column = getColumnModel().get(event.getColumn().intValue()); if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) { - } else if(column.getHeaderKey().toString().equals(TABLE_COL_DEL)) { collectedVolume.removeArticle(article); } else if(column.getHeaderKey().toString().equals(TABLE_COL_UP)) { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertiesStep.java index e187b27c2..62cee5c05 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertiesStep.java @@ -1,11 +1,13 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * @@ -20,6 +22,14 @@ public class CollectedVolumePropertiesStep super(itemModel, parent); } + public static Component getCollectedVolumePropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep. + getPublicationPropertySheet(itemModel); + + return sheet; + } + @Override protected void addBasicProperties( ItemSelectionModel itemModel, @@ -34,25 +44,26 @@ public class CollectedVolumePropertiesStep basicProperties.add(EDIT_SHEET_NAME, (String) PublicationGlobalizationUtil.globalize( "publications.ui.collected_volume.edit_basic_sheet"). - localize(), new WorkflowLockedComponentAccess(editBasicSheet, + localize(), + new WorkflowLockedComponentAccess(editBasicSheet, itemModel), editBasicSheet.getSaveCancelSection(). getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getCollectedVolumePropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( "publications.ui.publication.basic_properties"). - localize()), basicProperties); + localize()), + basicProperties); } @Override protected void addSteps(ItemSelectionModel itemModel, AuthoringKitWizard parent) { - super.addSteps(itemModel, - parent); + super.addSteps(itemModel, parent); addStep(new CollectedVolumeArticlesStep(itemModel, parent), "publications.ui.collected_volume_articles"); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertyForm.java index caac83bf1..b0b0ae222 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/CollectedVolumePropertyForm.java @@ -2,15 +2,10 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.Label; import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; -import com.arsdigita.bebop.form.TextField; -import com.arsdigita.bebop.parameters.IntegerParameter; -import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.CollectedVolume; import org.apache.log4j.Logger; @@ -45,37 +40,6 @@ public class CollectedVolumePropertyForm @Override protected void addWidgets() { super.addWidgets(); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.collected_volume.volume").localize())); - ParameterModel volumeParam = new IntegerParameter( - CollectedVolume.VOLUME); - TextField volume = new TextField(volumeParam); - add(volume); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.collected_volume.number_of_volumes"). - localize())); - ParameterModel numberOfVolumesParam = - new IntegerParameter(CollectedVolume.NUMBER_OF_VOLUMES); - TextField numberOfVolumes = new TextField(numberOfVolumesParam); - add(numberOfVolumes); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.collected_volume.number_of_pages"). - localize())); - ParameterModel numberOfPagesParam = new IntegerParameter( - CollectedVolume.NUMBER_OF_PAGES); - TextField numberOfPages = new TextField(numberOfPagesParam); - add(numberOfPages); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.collected_volume.edition"). - localize())); - ParameterModel editionModel = new StringParameter( - CollectedVolume.EDITION); - TextField edition = new TextField(editionModel); - add(edition); } @Override @@ -85,13 +49,6 @@ public class CollectedVolumePropertyForm FormData data = fse.getFormData(); CollectedVolume collectedVolume = (CollectedVolume) super.initBasicWidgets(fse); - - data.put(CollectedVolume.VOLUME, collectedVolume.getVolume()); - data.put(CollectedVolume.NUMBER_OF_VOLUMES, - collectedVolume.getNumberOfVolumes()); - data.put(CollectedVolume.NUMBER_OF_PAGES, - collectedVolume.getNumberOfPages()); - data.put(CollectedVolume.EDITION, collectedVolume.getEdition()); } @Override @@ -101,19 +58,5 @@ public class CollectedVolumePropertyForm FormData data = fse.getFormData(); CollectedVolume collectedVolume = (CollectedVolume) super.processBasicWidgets(fse); - - if ((collectedVolume != null) && getSaveCancelSection(). - getSaveButton().isSelected(fse.getPageState())) { - collectedVolume.setVolume((Integer) data.get( - CollectedVolume.VOLUME)); - collectedVolume.setNumberOfVolumes((Integer) data.get( - CollectedVolume.NUMBER_OF_VOLUMES)); - collectedVolume.setNumberOfPages((Integer) data.get( - CollectedVolume.NUMBER_OF_PAGES)); - collectedVolume.setEdition((String) data.get( - CollectedVolume.EDITION)); - - collectedVolume.save(); - } } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertiesStep.java index 0b3032cd5..151005869 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertiesStep.java @@ -1,11 +1,14 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.Expertise; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * @@ -18,6 +21,30 @@ public class ExpertisePropertiesStep extends PublicationPropertiesStep { super(itemModel, parent); } + public static Component getExpertisePropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationPropertySheet( + itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.expertise.place"), + Expertise.PLACE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.expertise.organization"), + Expertise.ORGANIZATION); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.expertise.number_of_pages"), + Expertise.NUMBER_OF_PAGES); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.expertise.orderer"), + Expertise.ORDERER); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -37,7 +64,7 @@ public class ExpertisePropertiesStep extends PublicationPropertiesStep { getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getExpertisePropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertyForm.java index c7b0ac8d5..f65266914 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ExpertisePropertyForm.java @@ -68,14 +68,7 @@ public class ExpertisePropertyForm ParameterModel numberOfPagesParam = new IntegerParameter(Expertise.NUMBER_OF_PAGES); TextField numberOfPages = new TextField(numberOfPagesParam); - add(numberOfPages); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.expertise.url").localize())); - ParameterModel urlParam = - new StringParameter(Expertise.URL); - TextField url = new TextField(urlParam); - add(url); + add(numberOfPages); add(new Label((String) PublicationGlobalizationUtil.globalize( "publications.ui.expertise.orderer").localize())); @@ -95,8 +88,7 @@ public class ExpertisePropertyForm data.put(Expertise.PLACE, expertise.getPlace()); data.put(ITEM_SEARCH_ORGA, expertise.getOrganization()); - data.put(Expertise.NUMBER_OF_PAGES, expertise.getNumberOfPages()); - data.put(Expertise.URL, expertise.getUrl()); + data.put(Expertise.NUMBER_OF_PAGES, expertise.getNumberOfPages()); data.put(ITEM_SEARCH_ORDERER, expertise.getOrderer()); } @@ -113,8 +105,7 @@ public class ExpertisePropertyForm expertise.setOrganization( (GenericOrganizationalUnit) data.get(ITEM_SEARCH_ORGA)); expertise.setNumberOfPages( - (Integer) data.get(Expertise.NUMBER_OF_PAGES)); - expertise.setUrl((String) data.get(Expertise.URL)); + (Integer) data.get(Expertise.NUMBER_OF_PAGES)); expertise.setOrderer( (GenericOrganizationalUnit) data.get(ITEM_SEARCH_ORDERER)); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertiesStep.java index dc19655ce..8adc922e1 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertiesStep.java @@ -1,11 +1,15 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.GreyLiterature; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; -import com.arsdigita.cms.ui.authoring.WorkflowLockedComponentAccess; +import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; + /** * @@ -18,6 +22,22 @@ public class GreyLiteraturePropertiesStep extends UnPublishedPropertiesStep { super(itemModel, parent); } + public static Component getGreyLiteraturePropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) + getUnPublishedPropertySheet(itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.greyliterature.pages_from"), + GreyLiterature.PAGES_FROM); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.greyliterature.pages_to"), + GreyLiterature.PAGES_TO); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -37,7 +57,7 @@ public class GreyLiteraturePropertiesStep extends UnPublishedPropertiesStep { getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getGreyLiteraturePropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertyForm.java index 5ab636eb3..5e70c406e 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/GreyLiteraturePropertyForm.java @@ -56,14 +56,7 @@ public class GreyLiteraturePropertyForm ParameterModel toParam = new IntegerParameter( GreyLiterature.PAGES_TO); TextField pagesTo = new TextField(toParam); - add(pagesTo); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.greyliterature.url").localize())); - ParameterModel urlParam = new StringParameter( - GreyLiterature.URL); - TextField url = new TextField(urlParam); - add(url); + add(pagesTo); } @Override @@ -74,8 +67,7 @@ public class GreyLiteraturePropertyForm GreyLiterature grey = (GreyLiterature) initBasicWidgets(fse); data.put(GreyLiterature.PAGES_FROM, grey.getPagesFrom()); - data.put(GreyLiterature.PAGES_TO, grey.getPagesTo()); - data.put(GreyLiterature.URL, grey.getUrl()); + data.put(GreyLiterature.PAGES_TO, grey.getPagesTo()); } @Override @@ -89,8 +81,7 @@ public class GreyLiteraturePropertyForm getPageState())) { grey.setPagesFrom((Integer) data.get(GreyLiterature.PAGES_FROM)); grey.setPagesTo((Integer) data.get(GreyLiterature.PAGES_TO)); - grey.setUrl((String) data.get(GreyLiterature.URL)); - + grey.save(); } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertiesStep.java index 588048f37..28671dcbc 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertiesStep.java @@ -1,24 +1,43 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.InProceedings; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * * @author Jens Pelzetter */ public class InProceedingsPropertiesStep - extends PublicationWithPublisherPropertiesStep { + extends PublicationPropertiesStep { public InProceedingsPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); } + public static Component getInProceedingsPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep. + getPublicationPropertySheet(itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.inproceedings.pages_from"), + InProceedings.PAGES_FROM); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.inproceedings.pages_to"), + InProceedings.PAGES_TO); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -38,7 +57,7 @@ public class InProceedingsPropertiesStep getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getInProceedingsPropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java index a759997f8..a725d426e 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java @@ -8,22 +8,17 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.form.TextField; -import com.arsdigita.bebop.parameters.DateParameter; import com.arsdigita.bebop.parameters.IntegerParameter; import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.InProceedings; -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; /** * * @author Jens Pelzetter */ public class InProceedingsPropertyForm - extends PublicationWithPublisherPropertyForm + extends PublicationPropertyForm implements FormProcessListener, FormInitListener, FormSubmissionListener { @@ -45,74 +40,7 @@ public class InProceedingsPropertyForm @Override protected void addWidgets() { super.addWidgets(); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.organizer_of_conference"). - localize())); - ParameterModel organizerParam = - new StringParameter(InProceedings.ORGANIZER_OF_CONFERENCE); - TextField organizer = new TextField(organizerParam); - add(organizer); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.name_of_conference"). - localize())); - ParameterModel nameOfConferenceParam = - new StringParameter(InProceedings.NAME_OF_CONFERENCE); - TextField nameOfConference = new TextField(nameOfConferenceParam); - add(nameOfConference); - - Calendar today = new GregorianCalendar(); - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.date_from_of_conference"). - localize())); - ParameterModel dateFromParam = - new DateParameter(InProceedings.DATE_FROM_OF_CONFERENCE); - com.arsdigita.bebop.form.Date dateFrom = - new com.arsdigita.bebop.form.Date( - dateFromParam); - dateFrom.setYearRange(1900, today.get(Calendar.YEAR) + 3); - add(dateFrom); - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.date_to_of_conference"). - localize())); - ParameterModel dateToParam = - new DateParameter(InProceedings.DATE_TO_OF_CONFERENCE); - com.arsdigita.bebop.form.Date dateTo = - new com.arsdigita.bebop.form.Date( - dateToParam); - dateTo.setYearRange(1900, today.get(Calendar.YEAR) + 3); - add(dateTo); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.place_of_conference"). - localize())); - ParameterModel placeParam = new StringParameter( - InProceedings.PLACE_OF_CONFERENCE); - TextField place = new TextField(placeParam); - add(place); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.volume").localize())); - ParameterModel volumeParam = new IntegerParameter(InProceedings.VOLUME); - TextField volume = new TextField(volumeParam); - add(volume); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.number_of_volumes").localize())); - ParameterModel numberOfVolumesParam = - new IntegerParameter(InProceedings.NUMBER_OF_VOLUMES); - TextField numberOfVolumes = new TextField(numberOfVolumesParam); - add(numberOfVolumes); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.number_of_pages").localize())); - ParameterModel numberOfPagesParam = - new IntegerParameter(InProceedings.NUMBER_OF_PAGES); - TextField numberOfPages = new TextField(numberOfPagesParam); - add(numberOfPages); - add(new Label((String) PublicationGlobalizationUtil.globalize( "publications.ui.inproceedings.pages_from").localize())); ParameterModel pagesFromParam = @@ -135,23 +63,7 @@ public class InProceedingsPropertyForm FormData data = fse.getFormData(); InProceedings inProceedings = (InProceedings) super.initBasicWidgets(fse); - - data.put(InProceedings.ORGANIZER_OF_CONFERENCE, - inProceedings.getOrganizerOfConference()); - data.put(InProceedings.NAME_OF_CONFERENCE, - inProceedings.getNameOfConference()); - data.put(InProceedings.DATE_FROM_OF_CONFERENCE, - inProceedings.getDateFromOfConference()); - data.put(InProceedings.DATE_TO_OF_CONFERENCE, - inProceedings.getDateToOfConference()); - data.put(InProceedings.PLACE_OF_CONFERENCE, - inProceedings.getPlaceOfConference()); - data.put(InProceedings.VOLUME, - inProceedings.getVolume()); - data.put(InProceedings.NUMBER_OF_VOLUMES, - inProceedings.getNumberOfVolumes()); - data.put(InProceedings.NUMBER_OF_PAGES, - inProceedings.getNumberOfPages()); + data.put(InProceedings.PAGES_FROM, inProceedings.getPagesFrom()); data.put(InProceedings.PAGES_TO, @@ -167,23 +79,7 @@ public class InProceedingsPropertyForm (InProceedings) super.processBasicWidgets(fse); if ((inProceedings != null) && getSaveCancelSection().getSaveButton(). - isSelected(fse.getPageState())) { - inProceedings.setOrganizerOfConference( - (String) data.get(InProceedings.ORGANIZER_OF_CONFERENCE)); - inProceedings.setNameOfConference( - (String) data.get(InProceedings.NAME_OF_CONFERENCE)); - inProceedings.setDateFromOfConference( - (Date) data.get(InProceedings.DATE_FROM_OF_CONFERENCE)); - inProceedings.setDateToOfConference( - (Date) data.get(InProceedings.DATE_TO_OF_CONFERENCE)); - inProceedings.setPlaceOfConference( - (String) data.get(InProceedings.PLACE_OF_CONFERENCE)); - inProceedings.setVolume( - (Integer) data.get(InProceedings.VOLUME)); - inProceedings.setNumberOfVolumes( - (Integer) data.get(InProceedings.NUMBER_OF_VOLUMES)); - inProceedings.setNumberOfPages( - (Integer) data.get(InProceedings.NUMBER_OF_PAGES)); + isSelected(fse.getPageState())) { inProceedings.setPagesFrom( (Integer) data.get(InProceedings.PAGES_FROM)); inProceedings.setPagesTo( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java index e94991bc8..3dd2860a2 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertiesStep.java @@ -1,11 +1,14 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.InternetArticle; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * @@ -18,6 +21,42 @@ public class InternetArticlePropertiesStep extends PublicationPropertiesStep { super(itemModel, parent); } + public static Component getInternetArticlePropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep. + getPublicationPropertySheet(itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.place"), + InternetArticle.PLACE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.organization"), + InternetArticle.ORGANIZATION); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.number"), + InternetArticle.NUMBER); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.number_of_pages"), + InternetArticle.NUMBER_OF_PAGES); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.edition"), + InternetArticle.EDITION); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.issn"), + InternetArticle.ISSN); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.internetarticle.publication_date"), + InternetArticle.PUBLICATION_DATE); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java index afe87832f..1cf92a433 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InternetArticlePropertyForm.java @@ -64,13 +64,7 @@ public class InternetArticlePropertyForm ContentType. findByAssociatedObjectType( GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE)); - add(m_itemSearch); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.internetarticle.url").localize())); - ParameterModel urlParam = new StringParameter(InternetArticle.URL); - TextField url = new TextField(urlParam); - add(url); + add(m_itemSearch); add(new Label((String) PublicationGlobalizationUtil.globalize( "publications.ui.internetarticle.number").localize())); @@ -121,8 +115,7 @@ public class InternetArticlePropertyForm InternetArticle article = (InternetArticle) initBasicWidgets(fse); data.put(InternetArticle.PLACE, article.getPlace()); - data.put(ITEM_SEARCH, article.getOrganization()); - data.put(InternetArticle.URL, article.getUrl()); + data.put(ITEM_SEARCH, article.getOrganization()); data.put(InternetArticle.NUMBER, article.getNumber()); data.put(InternetArticle.NUMBER_OF_PAGES, article.getNumberOfPages()); data.put(InternetArticle.EDITION, article.getEdition()); @@ -142,9 +135,7 @@ public class InternetArticlePropertyForm isSelected(fse.getPageState())) { article.setPlace((String) data.get(InternetArticle.PLACE)); article.setOrganization( - (GenericOrganizationalUnit) data.get(ITEM_SEARCH)); - article.setUrl( - (String) data.get(InternetArticle.URL)); + (GenericOrganizationalUnit) data.get(ITEM_SEARCH)); article.setNumber((String) data.get(InternetArticle.NUMBER)); article.setNumberOfPages( (Integer) data.get(InternetArticle.NUMBER_OF_PAGES)); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertiesStep.java index 16a041a7b..9ff479bea 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertiesStep.java @@ -22,24 +22,11 @@ public class MonographPropertiesStep super(itemModel, parent); } - public static Component getMonographPropertiesStep( + public static Component getMonographPropertySheet( ItemSelectionModel itemModel) { DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep. - getPublicationWithPublisherPropertySheet(itemModel); - - sheet.add(PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.volume"), - Monograph.VOLUME); - sheet.add(PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.numberOfVolumes"), - Monograph.NUMBER_OF_VOLUMES); - sheet.add(PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.numberOfPages"), - Monograph.NUMBER_OF_PAGES); - sheet.add(PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.edition"), - Monograph.EDITION); + getPublicationWithPublisherPropertySheet(itemModel); return sheet; } @@ -63,7 +50,7 @@ public class MonographPropertiesStep getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getMonographPropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertyForm.java index e92706d36..1f2f2da61 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/MonographPropertyForm.java @@ -2,15 +2,10 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.Label; import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; -import com.arsdigita.bebop.form.TextField; -import com.arsdigita.bebop.parameters.IntegerParameter; -import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.Monograph; @@ -41,33 +36,6 @@ public class MonographPropertyForm @Override protected void addWidgets() { super.addWidgets(); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.volume"). - localize())); - ParameterModel volumeParam = new IntegerParameter(Monograph.VOLUME); - TextField volume = new TextField(volumeParam); - add(volume); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.numberOfVolumes").localize())); - ParameterModel numberOfVolumesParam = new IntegerParameter( - Monograph.NUMBER_OF_VOLUMES); - TextField numberOfVolumes = new TextField(numberOfVolumesParam); - add(numberOfVolumes); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.numberOfPages").localize())); - ParameterModel numberOfPagesParam = new IntegerParameter( - Monograph.NUMBER_OF_PAGES); - TextField numberOfPages = new TextField(numberOfPagesParam); - add(numberOfPages); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.monograph.edition").localize())); - ParameterModel editionParam = new StringParameter(Monograph.EDITION); - TextField edition = new TextField(editionParam); - add(edition); } @Override @@ -76,11 +44,6 @@ public class MonographPropertyForm FormData data = fse.getFormData(); Monograph monograph = (Monograph) super.initBasicWidgets(fse); - - data.put(Monograph.VOLUME, monograph.getVolume()); - data.put(Monograph.NUMBER_OF_VOLUMES, monograph.getNumberOfVolumes()); - data.put(Monograph.NUMBER_OF_PAGES, monograph.getNumberOfPages()); - data.put(Monograph.EDITION, monograph.getEdition()); } @Override @@ -88,18 +51,6 @@ public class MonographPropertyForm super.process(fse); FormData data = fse.getFormData(); - Monograph monograph = (Monograph) super.processBasicWidgets(fse); - - if ((monograph != null) && getSaveCancelSection().getSaveButton(). - isSelected(fse.getPageState())) { - monograph.setVolume((Integer) data.get(Monograph.VOLUME)); - monograph.setNumberOfVolumes((Integer) data.get( - Monograph.NUMBER_OF_VOLUMES)); - monograph.setNumberOfPages((Integer) data.get( - Monograph.NUMBER_OF_PAGES)); - monograph.setEdition((String) data.get(Monograph.EDITION)); - - monograph.save(); - } + Monograph monograph = (Monograph) super.processBasicWidgets(fse); } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersAddForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersAddForm.java new file mode 100644 index 000000000..96fd0f06e --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersAddForm.java @@ -0,0 +1,68 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.FormData; +import com.arsdigita.bebop.FormProcessException; +import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.event.FormInitListener; +import com.arsdigita.bebop.event.FormProcessListener; +import com.arsdigita.bebop.event.FormSectionEvent; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.InProceedings; +import com.arsdigita.cms.contenttypes.Proceedings; +import com.arsdigita.cms.ui.ItemSearchWidget; +import com.arsdigita.cms.ui.authoring.BasicItemForm; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsPapersAddForm + extends BasicItemForm + implements FormProcessListener, + FormInitListener { + + private ItemSearchWidget m_itemSearch; + private final String ITEM_SEARCH = "papers"; + private ItemSelectionModel m_itemModel; + + public ProceedingsPapersAddForm(ItemSelectionModel itemModel) { + super("PapersAddForm", itemModel); + m_itemModel = itemModel; + } + + @Override + protected void addWidgets() { + add(new Label((String) PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.select_paper").localize())); + m_itemSearch = new ItemSearchWidget( + ITEM_SEARCH, + ContentType.findByAssociatedObjectType( + InProceedings.class.getName())); + add(m_itemSearch); + } + + @Override + public void init(FormSectionEvent fse) throws FormProcessException { + FormData data = fse.getFormData(); + PageState state = fse.getPageState(); + + setVisible(state, true); + } + + @Override + public void process(FormSectionEvent fse) throws FormProcessException { + FormData data = fse.getFormData(); + PageState state = fse.getPageState(); + Proceedings proceedings = (Proceedings) getItemSelectionModel(). + getSelectedObject(state); + + if (!(this.getSaveCancelSection().getCancelButton(). + isSelected(state))) { + proceedings.addPaper((InProceedings) data.get(ITEM_SEARCH)); + } + + init(fse); + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersStep.java new file mode 100644 index 000000000..eec3c87be --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersStep.java @@ -0,0 +1,41 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.cms.ItemSelectionModel; +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; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsPapersStep extends SimpleEditStep { + + private static final String ADD_PAPER_SHEET_NAME = "addPaper"; + + public ProceedingsPapersStep(ItemSelectionModel itemModel, + AuthoringKitWizard parent) { + this(itemModel, parent, null); + } + + public ProceedingsPapersStep(ItemSelectionModel itemModel, + AuthoringKitWizard parent, + String prefix) { + super(itemModel, parent, prefix); + + BasicItemForm addPaperSheet = + new ProceedingsPapersAddForm(itemModel); + add(ADD_PAPER_SHEET_NAME, + (String) PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.add_paper").localize(), + new WorkflowLockedComponentAccess(addPaperSheet, itemModel), + addPaperSheet.getSaveCancelSection().getCancelButton()); + + ProceedingsPapersTable papersTable = new ProceedingsPapersTable( + itemModel); + setDisplayComponent(papersTable); + + + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java new file mode 100644 index 000000000..e19cfd6bc --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java @@ -0,0 +1,319 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.Component; +import com.arsdigita.bebop.ControlLink; +import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.Table; +import com.arsdigita.bebop.event.TableActionEvent; +import com.arsdigita.bebop.event.TableActionListener; +import com.arsdigita.bebop.table.TableCellRenderer; +import com.arsdigita.bebop.table.TableColumn; +import com.arsdigita.bebop.table.TableColumnModel; +import com.arsdigita.bebop.table.TableModel; +import com.arsdigita.bebop.table.TableModelBuilder; +import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.SecurityManager; +import com.arsdigita.cms.contenttypes.ArticleInCollectedVolumeCollection; +import com.arsdigita.cms.contenttypes.CollectedVolume; +import com.arsdigita.cms.contenttypes.InProceedings; +import com.arsdigita.cms.contenttypes.InProceedingsCollection; +import com.arsdigita.cms.contenttypes.Proceedings; +import com.arsdigita.cms.dispatcher.Utilities; +import com.arsdigita.util.LockableImpl; +import java.math.BigDecimal; +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsPapersTable + extends Table + implements TableActionListener { + + private final Logger s_log = Logger.getLogger( + ProceedingsPapersTable.class); + private final String TABLE_COL_EDIT = "table_col_edit"; + private final String TABLE_COL_DEL = "table_col_del"; + private final String TABLE_COL_UP = "table_col_up"; + private final String TABLE_COL_DOWN = "table_col_down"; + private ItemSelectionModel m_itemModel; + + public ProceedingsPapersTable(ItemSelectionModel itemModel) { + super(); + m_itemModel = itemModel; + + setEmptyView(new Label(PublicationGlobalizationUtil.globalize( + "publications.ui.procreedings.no_papers"))); + + TableColumnModel colModel = getColumnModel(); + colModel.add(new TableColumn( + 0, + PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.paper").localize(), + TABLE_COL_EDIT)); + colModel.add(new TableColumn( + 1, + PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.paper.remove").localize(), + TABLE_COL_DEL)); + colModel.add(new TableColumn( + 2, + PublicationGlobalizationUtil.globalize( + "publications.ui.procedings.paper.up").localize(), + TABLE_COL_UP)); + colModel.add(new TableColumn( + 3, + PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.paper.down").localize(), + TABLE_COL_DOWN)); + + setModelBuilder( + new ProceedingsPapersTableModelBuilder(itemModel)); + + colModel.get(0).setCellRenderer(new EditCellRenderer()); + colModel.get(1).setCellRenderer(new DeleteCellRenderer()); + colModel.get(2).setCellRenderer(new UpCellRenderer()); + colModel.get(3).setCellRenderer(new DownCellRenderer()); + + addTableActionListener(this); + } + + private class ProceedingsPapersTableModelBuilder + extends LockableImpl + implements TableModelBuilder { + + private ItemSelectionModel m_itemModel; + + public ProceedingsPapersTableModelBuilder( + ItemSelectionModel itemModel) { + m_itemModel = itemModel; + } + + @Override + public TableModel makeModel(Table table, PageState state) { + table.getRowSelectionModel().clearSelection(state); + Proceedings proceedings = + (Proceedings) m_itemModel.getSelectedObject(state); + return new ProceedingsPapersTableModel(table, + state, + proceedings); + } + } + + private class ProceedingsPapersTableModel implements TableModel { + + private Table m_table; + private InProceedingsCollection m_papers; + private InProceedings m_paper; + + private ProceedingsPapersTableModel(Table table, + PageState state, + Proceedings proceedings) { + m_table = table; + m_papers = proceedings.getPapers(); + } + + @Override + public int getColumnCount() { + return m_table.getColumnModel().size(); + } + + @Override + public boolean nextRow() { + boolean ret; + + if ((m_papers != null) && m_papers.next()) { + m_paper = m_papers.getPaper(); + ret = true; + } else { + ret = false; + } + + return ret; + } + + @Override + public Object getElementAt(int columnIndex) { + switch (columnIndex) { + case 0: + return m_paper.getTitle(); + case 1: + return PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.paper.remove"). + localize(); + case 2: + return PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.paper.up"). + localize(); + case 3: + return PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.paper.down"). + localize(); + default: + return null; + } + } + + @Override + public Object getKeyAt(int columnIndex) { + return m_paper.getID(); + } + } + + private class EditCellRenderer + extends LockableImpl + implements TableCellRenderer { + + @Override + public Component getComponent(Table table, + PageState state, + Object value, + boolean isSelected, + Object key, + int row, + int col) { + SecurityManager securityManager = + Utilities.getSecurityManager(state); + Proceedings proceedings = (Proceedings) m_itemModel.getSelectedItem( + state); + + boolean canEdit = securityManager.canAccess( + state.getRequest(), + SecurityManager.EDIT_ITEM, + proceedings); + + if (canEdit) { + ControlLink link = new ControlLink(value.toString()); + return link; + } else { + Label label = new Label(value.toString()); + return label; + } + } + } + + private class DeleteCellRenderer + extends LockableImpl + implements TableCellRenderer { + + @Override + public Component getComponent(Table table, + PageState state, + Object value, + boolean isSelected, + Object key, + int row, + int column) { + SecurityManager securityManager = + Utilities.getSecurityManager(state); + Proceedings proceedings = (Proceedings) m_itemModel.getSelectedItem( + state); + + boolean canEdit = securityManager.canAccess( + state.getRequest(), + SecurityManager.DELETE_ITEM, + proceedings); + + if (canEdit) { + ControlLink link = new ControlLink(value.toString()); + link.setConfirmation((String) PublicationGlobalizationUtil. + globalize( + "publications.ui.proceedings.paper.confirm_remove"). + localize()); + return link; + } else { + Label label = new Label(value.toString()); + return label; + } + } + } + + private class UpCellRenderer + extends LockableImpl + implements TableCellRenderer { + + @Override + public Component getComponent(Table table, + PageState state, + Object value, + boolean isSelected, + Object key, + int row, + int col) { + if (0 == row) { + s_log.debug("Row is first row in table, don't show up link"); + Label label = new Label(""); + return label; + } else { + ControlLink link = new ControlLink(value.toString()); + return link; + } + } + } + + private class DownCellRenderer + extends LockableImpl + implements TableCellRenderer { + + @Override + public Component getComponent( + Table table, + PageState state, + Object value, + boolean isSelected, + Object key, + int row, + int col) { + + CollectedVolume collectedVolume = + (CollectedVolume) m_itemModel.getSelectedObject( + state); + ArticleInCollectedVolumeCollection articles = + collectedVolume.getArticles(); + + if ((articles.size() - 1) + == row) { + s_log.debug("Row is last row in table, don't show down link"); + Label label = new Label(""); + return label; + } else { + ControlLink link = new ControlLink(value.toString()); + return link; + } + } + } + + @Override + public void cellSelected(TableActionEvent event) { + PageState state = event.getPageState(); + + InProceedings paper = + new InProceedings( + new BigDecimal(event.getRowKey().toString())); + + Proceedings proceedings = + (Proceedings) m_itemModel.getSelectedItem(state); + + InProceedingsCollection papers = + proceedings.getPapers(); + + TableColumn column = getColumnModel().get(event.getColumn().intValue()); + + if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) { + + } else if(column.getHeaderKey().toString().equals(TABLE_COL_DEL)) { + proceedings.removePaper(paper); + } else if(column.getHeaderKey().toString().equals(TABLE_COL_UP)) { + papers.swapWithPrevious(paper); + } else if(column.getHeaderKey().toString().equals(TABLE_COL_DOWN)) { + papers.swapWithNext(paper); + } + } + + @Override + public void headSelected(TableActionEvent event) { + //Noting to do + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertiesStep.java new file mode 100644 index 000000000..e38c036e6 --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertiesStep.java @@ -0,0 +1,90 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.Component; +import com.arsdigita.bebop.Label; +import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.Proceedings; +import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; +import com.arsdigita.cms.ui.authoring.BasicPageForm; +import com.arsdigita.cms.ui.authoring.SimpleEditStep; +import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsPropertiesStep + extends PublicationWithPublisherPropertiesStep { + + public ProceedingsPropertiesStep( + ItemSelectionModel itemModel, + AuthoringKitWizard parent) { + super(itemModel, parent); + } + + public static Component getProceedingsPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationPropertySheet( + itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.organizer_of_conference"), + Proceedings.ORGANIZER_OF_CONFERENCE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.name_of_conference"), + Proceedings.NAME_OF_CONFERENCE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.place_of_conference"), + Proceedings.PLACE_OF_CONFERENCE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.date_from_of_conference"), + Proceedings.DATE_FROM_OF_CONFERENCE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.date_TO_of_conference"), + Proceedings.DATE_TO_OF_CONFERENCE); + + return sheet; + } + + @Override + protected void addBasicProperties( + ItemSelectionModel itemModel, + AuthoringKitWizard parent) { + SimpleEditStep basicProperties = new SimpleEditStep(itemModel, + parent, + EDIT_SHEET_NAME); + + BasicPageForm editBasicSheet = + new ProceedingsPropertyForm(itemModel, this); + + basicProperties.add(EDIT_SHEET_NAME, + (String) PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.edit_basic_sheet").localize(), + new WorkflowLockedComponentAccess(editBasicSheet, + itemModel), + editBasicSheet.getSaveCancelSection(). + getCancelButton()); + + basicProperties.setDisplayComponent( + getPublicationPropertySheet(itemModel)); + + getSegmentedPanel().addSegment( + new Label((String) PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.basic_properties").localize()), + basicProperties); + } + + @Override + protected void addSteps(ItemSelectionModel itemModel, + AuthoringKitWizard parent) { + super.addSteps(itemModel, parent); + + addStep(new ProceedingsPapersStep(itemModel, parent), + "publications.ui.proceedings.papers"); + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java new file mode 100644 index 000000000..d13b54041 --- /dev/null +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java @@ -0,0 +1,136 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.FormData; +import com.arsdigita.bebop.FormProcessException; +import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.event.FormInitListener; +import com.arsdigita.bebop.event.FormProcessListener; +import com.arsdigita.bebop.event.FormSectionEvent; +import com.arsdigita.bebop.event.FormSubmissionListener; +import com.arsdigita.bebop.form.Date; +import com.arsdigita.bebop.form.TextField; +import com.arsdigita.bebop.parameters.DateParameter; +import com.arsdigita.bebop.parameters.ParameterModel; +import com.arsdigita.bebop.parameters.StringParameter; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit; +import com.arsdigita.cms.contenttypes.Proceedings; +import com.arsdigita.cms.ui.ItemSearchWidget; +import java.util.Calendar; +import java.util.GregorianCalendar; + +/** + * + * @author Jens Pelzetter + */ +public class ProceedingsPropertyForm + extends PublicationWithPublisherPropertyForm + implements FormProcessListener, + FormInitListener, + FormSubmissionListener { + + private ProceedingsPropertiesStep m_step; + private ItemSearchWidget m_itemSearch; + private final String ITEM_SEARCH = "organizerOfConference"; + public static final String ID = "proceedingsEdit"; + + public ProceedingsPropertyForm(ItemSelectionModel itemModel) { + this(itemModel, null); + } + + public ProceedingsPropertyForm(ItemSelectionModel itemModel, + ProceedingsPropertiesStep step) { + super(itemModel, step); + m_step = step; + addSubmissionListener(this); + } + + @Override + protected void addWidgets() { + super.addWidgets(); + + add(new Label((String) PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.organizer_of_conference"). + localize())); + m_itemSearch = + new ItemSearchWidget(ITEM_SEARCH, + ContentType.findByAssociatedObjectType( + GenericOrganizationalUnit.class.getName())); + add(m_itemSearch); + + add(new Label(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.name_of_conference"))); + ParameterModel nameOfConfParam = new StringParameter( + Proceedings.NAME_OF_CONFERENCE); + TextField nameOfConf = new TextField(nameOfConfParam); + add(nameOfConf); + + add(new Label(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.place_of_conference"))); + ParameterModel placeOfConfParam = new StringParameter( + Proceedings.PLACE_OF_CONFERENCE); + TextField placeOfConf = new TextField(placeOfConfParam); + add(placeOfConf); + + Calendar today = new GregorianCalendar(); + add(new Label(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.date_from_of_conference"))); + ParameterModel dateFromParam = new DateParameter( + Proceedings.DATE_FROM_OF_CONFERENCE); + Date dateFrom = new Date(dateFromParam); + dateFrom.setYearRange(1900, today.get(Calendar.YEAR) + 3); + add(dateFrom); + + add(new Label(PublicationGlobalizationUtil.globalize( + "publications.ui.proceedings.date_from_of_conference"))); + ParameterModel dateToParam = new DateParameter( + Proceedings.DATE_FROM_OF_CONFERENCE); + Date dateTo = new Date(dateToParam); + dateTo.setYearRange(1900, today.get(Calendar.YEAR) + 3); + add(dateTo); + } + + @Override + public void init(FormSectionEvent fse) throws FormProcessException { + super.init(fse); + + FormData data = fse.getFormData(); + Proceedings proceedings = (Proceedings) super.initBasicWidgets(fse); + + data.put(ITEM_SEARCH, proceedings.getOrganizerOfConference()); + data.put(Proceedings.NAME_OF_CONFERENCE, + proceedings.getNameOfConference()); + data.put(Proceedings.PLACE_OF_CONFERENCE, + proceedings.getPlaceOfConference()); + data.put(Proceedings.DATE_FROM_OF_CONFERENCE, + proceedings.getDateFromOfConference()); + data.put(Proceedings.DATE_TO_OF_CONFERENCE, + proceedings.getDateToOfConference()); + } + + @Override + public void process(FormSectionEvent fse) throws FormProcessException { + super.process(fse); + + FormData data = fse.getFormData(); + Proceedings proceedings = (Proceedings) super.processBasicWidgets(fse); + + + if ((proceedings != null) && getSaveCancelSection().getSaveButton(). + isSelected(fse.getPageState())) { + proceedings.setOrganizerOfConference( + (GenericOrganizationalUnit) data.get(ITEM_SEARCH)); + proceedings.setNameOfConference((String) data.get( + Proceedings.NAME_OF_CONFERENCE)); + proceedings.setPlaceOfConference((String) data.get( + Proceedings.PLACE_OF_CONFERENCE)); + proceedings.setDateFromOfConference((java.util.Date) data.get( + Proceedings.DATE_FROM_OF_CONFERENCE)); + proceedings.setDateToOfConference((java.util.Date) data.get( + Proceedings.DATE_TO_OF_CONFERENCE)); + + proceedings.save(); + } + } +} diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertiesStep.java index 376c72077..53523fd2c 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertiesStep.java @@ -32,6 +32,26 @@ public class PublicationWithPublisherPropertiesStep "publications.ui.with_publisher.isbn"), PublicationWithPublisher.ISBN); + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.with_publisher.volume"), + PublicationWithPublisher.VOLUME); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.with_publisher.number_of_volumes"), + PublicationWithPublisher.NUMBER_OF_VOLUMES); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.with_publisher.number_of_pages"), + PublicationWithPublisher.NUMBER_OF_PAGES); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.with_publisher.edition"), + PublicationWithPublisher.EDITION); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.with_publisher.publisher"), + PublicationWithPublisher.PUBLISHER); + return sheet; } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java index 81f579e53..300feb5fe 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationWithPublisherPropertyForm.java @@ -8,6 +8,7 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.form.TextField; +import com.arsdigita.bebop.parameters.IntegerParameter; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ContentType; @@ -67,13 +68,37 @@ public class PublicationWithPublisherPropertyForm TextField isbn = new TextField(isbnParam); add(isbn); + add(new Label((String) PublicationGlobalizationUtil.globalize( + "publications.ui.collected_volume.volume").localize())); + ParameterModel volumeParam = new IntegerParameter( + PublicationWithPublisher.VOLUME); + TextField volume = new TextField(volumeParam); + add(volume); add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.with_publisher.url").localize())); - ParameterModel urlParam = new StringParameter( - PublicationWithPublisher.URL); - TextField url = new TextField(urlParam); - add(url); + "publications.ui.collected_volume.number_of_volumes"). + localize())); + ParameterModel numberOfVolumesParam = + new IntegerParameter( + PublicationWithPublisher.NUMBER_OF_VOLUMES); + TextField numberOfVolumes = new TextField(numberOfVolumesParam); + add(numberOfVolumes); + + add(new Label((String) PublicationGlobalizationUtil.globalize( + "publications.ui.collected_volume.number_of_pages"). + localize())); + ParameterModel numberOfPagesParam = new IntegerParameter( + PublicationWithPublisher.NUMBER_OF_PAGES); + TextField numberOfPages = new TextField(numberOfPagesParam); + add(numberOfPages); + + add(new Label((String) PublicationGlobalizationUtil.globalize( + "publications.ui.collected_volume.edition"). + localize())); + ParameterModel editionModel = new StringParameter( + PublicationWithPublisher.EDITION); + TextField edition = new TextField(editionModel); + add(edition); } @Override @@ -87,7 +112,12 @@ public class PublicationWithPublisherPropertyForm data.put(ITEM_SEARCH, publication.getPublisher()); data.put(PublicationWithPublisher.ISBN, publication.getISBN()); - data.put(PublicationWithPublisher.URL, publication.getUrl()); + data.put(PublicationWithPublisher.VOLUME, publication.getVolume()); + data.put(PublicationWithPublisher.NUMBER_OF_VOLUMES, + publication.getNumberOfVolumes()); + data.put(PublicationWithPublisher.NUMBER_OF_PAGES, + publication.getNumberOfPages()); + data.put(PublicationWithPublisher.EDITION, publication.getEdition()); } @@ -104,7 +134,15 @@ public class PublicationWithPublisherPropertyForm isSelected(fse.getPageState())) { publication.setPublisher((Publisher) data.get(ITEM_SEARCH)); publication.setISBN((String) data.get(PublicationWithPublisher.ISBN)); - publication.setUrl((String) data.get(PublicationWithPublisher.URL)); + + publication.setVolume((Integer) data.get( + PublicationWithPublisher.VOLUME)); + publication.setNumberOfVolumes((Integer) data.get( + PublicationWithPublisher.NUMBER_OF_VOLUMES)); + publication.setNumberOfPages((Integer) data.get( + PublicationWithPublisher.NUMBER_OF_PAGES)); + publication.setEdition((String) data.get( + PublicationWithPublisher.EDITION)); publication.save(); } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertiesStep.java index de9d77a3a..94490bf6c 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ReviewPropertiesStep.java @@ -1,23 +1,33 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * * @author Jens Pelzetter */ -public class ReviewPropertiesStep extends PublicationPropertiesStep { +public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep { public ReviewPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); } + public static Component getReviewPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep. + getPublicationPropertySheet(itemModel); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -37,7 +47,7 @@ public class ReviewPropertiesStep extends PublicationPropertiesStep { getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getReviewPropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( 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 c121846b2..dea19f162 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 @@ -23,7 +23,7 @@ import java.util.GregorianCalendar; * @author Jens Pelzetter */ public class ReviewPropertyForm - extends PublicationPropertyForm + extends ArticleInJournalPropertyForm implements FormProcessListener, FormInitListener, FormSubmissionListener { @@ -45,60 +45,6 @@ public class ReviewPropertyForm @Override protected void addWidgets() { super.addWidgets(); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.journal").localize())); - ParameterModel journalParam = new StringParameter(Review.JOURNAL); - TextField journal = new TextField(journalParam); - add(journal); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.volume").localize())); - ParameterModel volumeParam = new IntegerParameter(Review.VOLUME); - TextField volume = new TextField(volumeParam); - add(volume); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.issue").localize())); - ParameterModel issueParam = new StringParameter(Review.ISSUE); - TextField issue = new TextField(issueParam); - add(issue); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.pagesFrom").localize())); - ParameterModel pagesFromParam = new IntegerParameter(Review.PAGES_FROM); - TextField pagesFrom = new TextField(pagesFromParam); - add(pagesFrom); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publcations.ui.review.pagesTo").localize())); - ParameterModel pagesToParam = new IntegerParameter(Review.PAGES_TO); - TextField pagesTo = new TextField(pagesToParam); - add(pagesTo); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.issn").localize())); - ParameterModel issnParam = new StringParameter(Review.ISSN); - TextField issn = new TextField(issnParam); - add(issn); - - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.url").localize())); - ParameterModel urlParam = new StringParameter(Review.URL); - TextField url = new TextField(urlParam); - add(url); - - Calendar today = new GregorianCalendar(); - add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.review.publicationdate"). - localize())); - ParameterModel pubDateParam = - new DateParameter(Review.PUBLICATION_DATE); - com.arsdigita.bebop.form.Date pubDate = - new com.arsdigita.bebop.form.Date( - pubDateParam); - pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2); - add(pubDate); } @Override @@ -106,16 +52,7 @@ public class ReviewPropertyForm super.init(fse); FormData data = fse.getFormData(); - Review review = (Review) initBasicWidgets(fse); - - data.put(Review.JOURNAL, review.getJournal()); - data.put(Review.VOLUME, review.getVolume()); - data.put(Review.ISSUE, review.getIssue()); - data.put(Review.PAGES_FROM, review.getPagesFrom()); - data.put(Review.PAGES_TO, review.getPagesTo()); - data.put(Review.ISSN, review.getISSN()); - data.put(Review.URL, review.getUrl()); - data.put(Review.PUBLICATION_DATE, review.getPublicationDate()); + Review review = (Review) initBasicWidgets(fse); } @Override @@ -123,20 +60,6 @@ public class ReviewPropertyForm super.process(fse); FormData data = fse.getFormData(); - Review review = (Review) processBasicWidgets(fse); - - if ((review != null) && getSaveCancelSection().getSaveButton(). - isSelected(fse.getPageState())) { - review.setJournal((String) data.get(Review.JOURNAL)); - review.setVolume((Integer) data.get(Review.VOLUME)); - review.setIssue((String) data.get(Review.ISSUE)); - review.setPagesFrom((Integer) data.get(Review.PAGES_FROM)); - review.setPagesTo((Integer) data.get(Review.PAGES_TO)); - review.setISSN((String) data.get(Review.ISSN)); - review.setUrl((String) data.get(Review.URL)); - review.setPublicationDate((Date) data.get(Review.PUBLICATION_DATE)); - - review.save(); - } + Review review = (Review) processBasicWidgets(fse); } } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/UnPublishedPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/UnPublishedPropertiesStep.java index 8a82f609f..9f65722da 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/UnPublishedPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/UnPublishedPropertiesStep.java @@ -1,11 +1,14 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.UnPublished; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** @@ -19,6 +22,32 @@ public class UnPublishedPropertiesStep extends PublicationPropertiesStep { super(itemModel, parent); } + public static Component getUnPublishedPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep. + getPublicationPropertySheet(itemModel); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.unpublished.place"), + UnPublished.PLACE); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.unpublished.organization"), + UnPublished.ORGANIZATION); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.unpublished.number"), + UnPublished.NUMBER); + + sheet.add(PublicationGlobalizationUtil.globalize( + "publications.ui.unpublished.number_of_pages"), + UnPublished.NUMBER_OF_PAGES); + + + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -38,7 +67,7 @@ public class UnPublishedPropertiesStep extends PublicationPropertiesStep { getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getUnPublishedPropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/WorkingPaperPropertiesStep.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/WorkingPaperPropertiesStep.java index 079b82332..d9a4778ec 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/WorkingPaperPropertiesStep.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/WorkingPaperPropertiesStep.java @@ -1,11 +1,13 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** @@ -19,6 +21,14 @@ public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep { super(itemModel, parent); } + public static Component getWorkingPaperPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) + getUnPublishedPropertySheet(itemModel); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { @@ -38,7 +48,7 @@ public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep { getCancelButton()); basicProperties.setDisplayComponent( - getPublicationPropertySheet(itemModel)); + getWorkingPaperPropertySheet(itemModel)); getSegmentedPanel().addSegment( new Label((String) PublicationGlobalizationUtil.globalize( diff --git a/ccm-sci-publications/web/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl b/ccm-sci-publications/web/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl new file mode 100644 index 000000000..48420fadf --- /dev/null +++ b/ccm-sci-publications/web/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl @@ -0,0 +1,19 @@ + +]> + + + + +

+ + + +

+
+ + \ No newline at end of file diff --git a/ccm-sci-types-organization/application.xml b/ccm-sci-types-organization/application.xml new file mode 100644 index 000000000..dc3fbdf71 --- /dev/null +++ b/ccm-sci-types-organization/application.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + Content types for scientific organizations + + diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl new file mode 100644 index 000000000..357944cf5 --- /dev/null +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl @@ -0,0 +1,10 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.cms.*; + +object type SciDepartment extends GenericOrganizationalUnit { + String[0..1] description = ct_scidepartments.description; + + reference key ( ct_scidepartments.organization_id ); +} diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl new file mode 100644 index 000000000..664f31eb3 --- /dev/null +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl @@ -0,0 +1,10 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.cms.*; + +object type SciOrganization extends GenericOrganizationalUnit { + String[0..1] description = ct_sciorganizations.description; + + reference key ( ct_sciorganizations.organization_id ); +} diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl new file mode 100644 index 000000000..64b0a3be7 --- /dev/null +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl @@ -0,0 +1,14 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.cms.*; + +object type SciProject extends GenericOrganizationalUnit { + + Date[0..1] projectbegin = ct_sciprojects.projectbegin DATE; + Date[0..1] projectend = ct_sciprojects.projectend DATE; + String[0..1] description = ct_sciprojects.description VARCHAR(4096); + String[0..1] funding = ct_sciprojects.funding VARCHAR(2048); + + reference key ( ct_sciprojects.organization_id ); +} diff --git a/ccm-sci-types-organization/sql/ccm-sci-types-organization/postgres-create.sql b/ccm-sci-types-organization/sql/ccm-sci-types-organization/postgres-create.sql new file mode 100644 index 000000000..38716a0ca --- /dev/null +++ b/ccm-sci-types-organization/sql/ccm-sci-types-organization/postgres-create.sql @@ -0,0 +1,4 @@ +begin; +\i ddl/postgres/create.sql +\i ddl/postgres/deferred.sql +end; \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml new file mode 100644 index 000000000..dec512a5c --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.pdl b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.pdl new file mode 100644 index 000000000..8a3fbcd53 --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.pdl @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml new file mode 100644 index 000000000..30b087337 --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml new file mode 100644 index 000000000..8fa71f760 --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml new file mode 100644 index 000000000..5590f9868 --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml new file mode 100644 index 000000000..ddd394bca --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/ccm-sci-types-organization.config b/ccm-sci-types-organization/src/ccm-sci-types-organization.config new file mode 100644 index 000000000..6b16ef9b2 --- /dev/null +++ b/ccm-sci-types-organization/src/ccm-sci-types-organization.config @@ -0,0 +1,4 @@ + + + + diff --git a/ccm-sci-types-organization/src/ccm-sci-types-organization.load b/ccm-sci-types-organization/src/ccm-sci-types-organization.load new file mode 100644 index 000000000..2e343b6de --- /dev/null +++ b/ccm-sci-types-organization/src/ccm-sci-types-organization.load @@ -0,0 +1,22 @@ + + +
+
+
+ + + +
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartment.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartment.java new file mode 100644 index 000000000..12bd4a803 --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartment.java @@ -0,0 +1,45 @@ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.OID; +import java.math.BigDecimal; + +/** + * + * @author Jens Pelzetter + */ +public class SciDepartment extends GenericOrganizationalUnit { + + public static final String DESCRIPTION = "description"; + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.cms.contenttypes.SciDepartment"; + + public SciDepartment() { + this(BASE_DATA_OBJECT_TYPE); + } + + public SciDepartment(BigDecimal id) throws DataObjectNotFoundException { + this(new OID(BASE_DATA_OBJECT_TYPE, id)); + } + + public SciDepartment(OID oid) throws DataObjectNotFoundException { + super(oid); + } + + public SciDepartment(DataObject obj) { + super(obj); + } + + public SciDepartment(String type) { + super(type); + } + + public String getDescription() { + return (String) get(DESCRIPTION); + } + + public void setDescription(String description) { + set(DESCRIPTION, description); + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentInitializer.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentInitializer.java new file mode 100644 index 000000000..b2fc63890 --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentInitializer.java @@ -0,0 +1,29 @@ +package com.arsdigita.cms.contenttypes; + +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class SciDepartmentInitializer extends ContentTypeInitializer { + + private static final Logger s_log = Logger.getLogger( + SciDepartmentInitializer.class); + + public SciDepartmentInitializer() { + super("empty.pdl.mf", SciDepartment.BASE_DATA_OBJECT_TYPE); + } + + @Override + public String[] getStylesheets() { + return new String[]{ + "/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl" + }; + } + + @Override + public String getTraversalXML() { + return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml"; + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java new file mode 100644 index 000000000..2d27f626a --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java @@ -0,0 +1,17 @@ +package com.arsdigita.cms.contenttypes; + +/** + * + * @author Jens Pelzetter + */ +public class SciDepartmentLoader extends AbstractContentTypeLoader { + + private static final String[] TYPES = { + "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml" + }; + + public String[] getTypes() { + return TYPES; + } + +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganization.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganization.java new file mode 100644 index 000000000..d63e05493 --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganization.java @@ -0,0 +1,45 @@ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.OID; +import java.math.BigDecimal; + +/** + * + * @author Jens Pelzetter + */ +public class SciOrganization extends GenericOrganizationalUnit { + + public static final String DESCRIPTION = "description"; + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.cms.contenttypes.SciOrganization"; + + public SciOrganization() { + this(BASE_DATA_OBJECT_TYPE); + } + + public SciOrganization(BigDecimal id) throws DataObjectNotFoundException { + this(new OID(BASE_DATA_OBJECT_TYPE, id)); + } + + public SciOrganization(OID oid) throws DataObjectNotFoundException { + super(oid); + } + + public SciOrganization(DataObject obj) { + super(obj); + } + + public SciOrganization(String type) { + super(type); + } + + public String getDescription() { + return (String) get(DESCRIPTION); + } + + public void setDescription(String description) { + set(DESCRIPTION, description); + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationInitializer.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationInitializer.java new file mode 100644 index 000000000..f286354fa --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationInitializer.java @@ -0,0 +1,31 @@ +package com.arsdigita.cms.contenttypes; + +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class SciOrganizationInitializer extends ContentTypeInitializer { + + private static final Logger s_log = Logger.getLogger( + SciOrganizationInitializer.class); + + public SciOrganizationInitializer() { + super("ccm-sci-types-organization.odl.mf", + SciOrganization.BASE_DATA_OBJECT_TYPE); + } + + @Override + public String[] getStylesheets() { + return new String[]{ + "/static/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xsl" + }; + } + + @Override + public String getTraversalXML() { + return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml"; + + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java new file mode 100644 index 000000000..7660fad12 --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java @@ -0,0 +1,17 @@ +package com.arsdigita.cms.contenttypes; + +/** + * + * @author Jens Pelzetter + */ +public class SciOrganizationLoader extends AbstractContentTypeLoader { + + private static final String[] TYPES = { + "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xml" + }; + + public String[] getTypes() { + return TYPES; + } + +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProject.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProject.java new file mode 100644 index 000000000..911d60f1f --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProject.java @@ -0,0 +1,74 @@ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.OID; +import java.math.BigDecimal; +import java.util.Date; + +/** + * + * @author Jens Pelzetter + */ +public class SciProject extends GenericOrganizationalUnit{ + + public static final String BEGIN = "projectbegin"; + public static final String END = "projectend"; + public static final String DESCRIPTION = "description"; + public static final String FUNDING = "funding"; + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.cms.contenttypes.SciProject"; + + public SciProject() { + super(BASE_DATA_OBJECT_TYPE); + } + + public SciProject(BigDecimal id ) throws DataObjectNotFoundException{ + this(new OID(BASE_DATA_OBJECT_TYPE, id)); + } + + public SciProject(OID oid) { + super(oid); + } + + public SciProject(DataObject obj) { + super(obj); + } + + public SciProject(String type) { + super(type); + } + + public Date getBegin() { + return (Date) get(BEGIN); + } + + public void setBegin(Date begin) { + set(BEGIN, begin); + } + + public Date getEnd() { + return (Date) get(END); + } + + public void setEnd(Date end) { + set(END, end); + } + + public String getDescription() { + return (String) get(DESCRIPTION); + } + + public void setDescription(String description) { + set(DESCRIPTION, description); + } + + public String getFunding() { + return (String) get(FUNDING); + } + + public void setFunding(String funding) { + set(FUNDING, funding); + } + +} diff --git a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectInitializer.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectInitializer.java similarity index 64% rename from ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectInitializer.java rename to ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectInitializer.java index 3d015f26c..ae6ce707a 100644 --- a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectInitializer.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectInitializer.java @@ -6,24 +6,24 @@ import org.apache.log4j.Logger; * * @author Jens Pelzetter */ -public class ProjectInitializer extends ContentTypeInitializer { +public class SciProjectInitializer extends ContentTypeInitializer { private static final Logger s_log = Logger.getLogger( - ProjectInitializer.class); + SciProjectInitializer.class); - public ProjectInitializer() { - super("ccm-cms-types-project.pdl.mf", Project.BASE_DATA_OBJECT_TYPE); + public SciProjectInitializer() { + super("empty.pdl.mf", SciProject.BASE_DATA_OBJECT_TYPE); } @Override public String[] getStylesheets() { return new String[]{ - "/static/content-types/com/arsdigita/cms/contenttypes/Project.xsl" + "/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl" }; } @Override public String getTraversalXML() { - return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Project.xml"; + return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml"; } } diff --git a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectLoader.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java similarity index 67% rename from ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectLoader.java rename to ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java index 5bb121ee8..0f23b2cf1 100644 --- a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ProjectLoader.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java @@ -9,10 +9,10 @@ package com.arsdigita.cms.contenttypes; * * @author Jens Pelzetter */ -public class ProjectLoader extends AbstractContentTypeLoader { +public class SciProjectLoader extends AbstractContentTypeLoader { private static final String[] TYPES = { - "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Project.xml" + "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml" }; public String[] getTypes() { diff --git a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectPropertiesStep.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertiesStep.java similarity index 86% rename from ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectPropertiesStep.java rename to ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertiesStep.java index 7de39e523..74e3c4ae1 100644 --- a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectPropertiesStep.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertiesStep.java @@ -11,10 +11,10 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; * * @author Jens Pelzetter */ -public class ProjectPropertiesStep +public class SciProjectPropertiesStep extends GenericOrganizationalUnitPropertiesStep { - public ProjectPropertiesStep(ItemSelectionModel itemModel, + public SciProjectPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); } @@ -25,7 +25,7 @@ public class ProjectPropertiesStep addStep(new GenericOrganizationalUnitContactPropertiesStep(itemModel, parent), "cms.contenttypes.ui.orgaunit.contact"); - addStep(new ProjectSubprojectPropertiesStep(itemModel, + addStep(new SciProjectSubprojectPropertiesStep(itemModel, parent), "cms.contenttypes.ui.project.subprojects"); addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel, diff --git a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectAddForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectAddForm.java similarity index 59% rename from ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectAddForm.java rename to ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectAddForm.java index 351e11c9d..0838a4752 100644 --- a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectAddForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectAddForm.java @@ -1,21 +1,21 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.cms.contenttypes.Project; +import com.arsdigita.cms.contenttypes.SciProject; /** * * @author Jens Pelzetter */ -public class ProjectSubprojectAddForm +public class SciProjectSubprojectAddForm extends GenericOrganizationalUnitChildAddForm { - public ProjectSubprojectAddForm(ItemSelectionModel itemModel) { + public SciProjectSubprojectAddForm(ItemSelectionModel itemModel) { super("SubprojectAddForm", itemModel); } @Override protected String getChildDataObjectType() { - return Project.BASE_DATA_OBJECT_TYPE; + return SciProject.BASE_DATA_OBJECT_TYPE; } } diff --git a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectPropertiesStep.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectPropertiesStep.java similarity index 77% rename from ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectPropertiesStep.java rename to ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectPropertiesStep.java index 728e816b7..628b96b72 100644 --- a/ccm-cms-types-project/src/com/arsdigita/cms/contenttypes/ui/ProjectSubprojectPropertiesStep.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubprojectPropertiesStep.java @@ -16,24 +16,24 @@ import org.apache.log4j.Logger; * * @author Jens Pelzetter */ -public class ProjectSubprojectPropertiesStep extends SimpleEditStep { +public class SciProjectSubprojectPropertiesStep extends SimpleEditStep { private final static Logger s_log = Logger.getLogger( - ProjectSubprojectPropertiesStep.class); + SciProjectSubprojectPropertiesStep.class); private String ADD_CHILD_SHEET_NAME = "addChild"; - public ProjectSubprojectPropertiesStep(ItemSelectionModel itemModel, - AuthoringKitWizard parent) { + public SciProjectSubprojectPropertiesStep(ItemSelectionModel itemModel, + AuthoringKitWizard parent) { this(itemModel, parent, null); } - public ProjectSubprojectPropertiesStep( + public SciProjectSubprojectPropertiesStep( ItemSelectionModel itemModel, AuthoringKitWizard parent, String prefix) { super(itemModel, parent, prefix); - BasicItemForm addChildSheet = new ProjectSubprojectAddForm(itemModel); + BasicItemForm addChildSheet = new SciProjectSubprojectAddForm(itemModel); add(ADD_CHILD_SHEET_NAME, (String) ContenttypesGlobalizationUtil.globalize( "cms.contenttypes.ui.genericorgaunit.add_child").localize(), diff --git a/ccm-sci-types-organization/src/empty.pdl.mf b/ccm-sci-types-organization/src/empty.pdl.mf new file mode 100644 index 000000000..e69de29bb diff --git a/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl b/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl new file mode 100644 index 000000000..9af8f5179 --- /dev/null +++ b/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl @@ -0,0 +1,19 @@ + +]> + + + + +

+
+ + +

+
+ +
\ No newline at end of file diff --git a/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xsl b/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xsl new file mode 100644 index 000000000..93f7e0825 --- /dev/null +++ b/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xsl @@ -0,0 +1,19 @@ + +]> + + + + +

+
+ + +

+
+ +
\ No newline at end of file diff --git a/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl b/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl new file mode 100644 index 000000000..5dd9498a5 --- /dev/null +++ b/ccm-sci-types-organization/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl @@ -0,0 +1,19 @@ + +]> + + + + +

+
+ + +

+
+ +
\ No newline at end of file diff --git a/ccm-cms-types-project/application.xml b/ccm-sci-types-sciproject/application.xml similarity index 90% rename from ccm-cms-types-project/application.xml rename to ccm-sci-types-sciproject/application.xml index 3ca3bc735..af07d9557 100644 --- a/ccm-cms-types-project/application.xml +++ b/ccm-sci-types-sciproject/application.xml @@ -1,6 +1,6 @@ - The Project Content Type for OpenCCM. + A project type for scientific projects. diff --git a/ccm-sci-types-sciproject/pdl/com/arsdigita/content-types/SciProject.pdl b/ccm-sci-types-sciproject/pdl/com/arsdigita/content-types/SciProject.pdl new file mode 100644 index 000000000..b51157587 --- /dev/null +++ b/ccm-sci-types-sciproject/pdl/com/arsdigita/content-types/SciProject.pdl @@ -0,0 +1,14 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.cms.*; + +object type SciProject extends GenericOrganizationalUnit { + + Date[0..1] projectbegin = ct_sciprojects.projectbegin DATE; + Date[0..1] projectend = ct_sciprojects.projectend DATE; + String[0..1] description = ct_sciprojects.description VARCHAR(4096); + String[0..1] funding = ct_sciprojects.funding VARCHAR(2048); + + reference key ( ct_sciprojects.project_id ); +} diff --git a/ccm-cms-types-project/sql/ccm-cms-types-project/postgres-create.sql b/ccm-sci-types-sciproject/sql/ccm-sci-types-sciproject/postgres-create.sql similarity index 100% rename from ccm-cms-types-project/sql/ccm-cms-types-project/postgres-create.sql rename to ccm-sci-types-sciproject/sql/ccm-sci-types-sciproject/postgres-create.sql diff --git a/ccm-cms-types-project/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Project.xml b/ccm-sci-types-sciproject/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml similarity index 67% rename from ccm-cms-types-project/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Project.xml rename to ccm-sci-types-sciproject/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml index 88af81e96..65038e03a 100644 --- a/ccm-cms-types-project/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Project.xml +++ b/ccm-sci-types-sciproject/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml @@ -5,19 +5,19 @@ xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> + label="Scientific Project" + description="The content type SciProject." + objectType="com.arsdigita.cms.contenttypes.SciProject" + classname="com.arsdigita.cms.contenttypes.SciProject"> diff --git a/ccm-cms-types-project/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Project.xml b/ccm-sci-types-sciproject/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml similarity index 93% rename from ccm-cms-types-project/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Project.xml rename to ccm-sci-types-sciproject/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml index a84d8fa10..de7c68adc 100644 --- a/ccm-cms-types-project/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Project.xml +++ b/ccm-sci-types-sciproject/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml @@ -8,7 +8,7 @@ The default properties for BaseContact are left as is and are inherited from ContentPage --> - + diff --git a/ccm-cms-types-project/src/ccm-cms-types-project.config b/ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.config similarity index 66% rename from ccm-cms-types-project/src/ccm-cms-types-project.config rename to ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.config index 42372609b..8b74833f1 100644 --- a/ccm-cms-types-project/src/ccm-cms-types-project.config +++ b/ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.config @@ -1,4 +1,4 @@ - + diff --git a/ccm-cms-types-project/src/ccm-cms-types-project.load b/ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.load similarity index 55% rename from ccm-cms-types-project/src/ccm-cms-types-project.load rename to ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.load index b575d12ad..5c471a2e8 100644 --- a/ccm-cms-types-project/src/ccm-cms-types-project.load +++ b/ccm-sci-types-sciproject/src/ccm-sci-types-sciproject.load @@ -7,11 +7,11 @@ -
- +
+ - - + + diff --git a/ccm-cms-types-project/web/static/content-types/com/arsdigita/cms/contenttypes/Project.xsl b/ccm-sci-types-sciproject/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl similarity index 76% rename from ccm-cms-types-project/web/static/content-types/com/arsdigita/cms/contenttypes/Project.xsl rename to ccm-sci-types-sciproject/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl index 18cf5d5a7..147068237 100644 --- a/ccm-cms-types-project/web/static/content-types/com/arsdigita/cms/contenttypes/Project.xsl +++ b/ccm-sci-types-sciproject/web/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl @@ -6,13 +6,13 @@ xmlns:cms="http://www.arsdigita.com/cms/1.0" version="1.0"> - +

+ name="cms:CT_text_com_arsdigita_cms_contenttypes_SciProject">