diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonBundle.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonBundle.java index 599ae347a..957941955 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonBundle.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonBundle.java @@ -5,7 +5,6 @@ import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.CustomCopy; import com.arsdigita.cms.ItemCopier; import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; @@ -19,8 +18,7 @@ import java.math.BigDecimal; * @author Jens Pelzetter * @version $Id$ */ -public class GenericPersonBundle - extends ContentBundle { +public class GenericPersonBundle extends ContentBundle { public final static String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.GenericPersonBundle"; @@ -107,7 +105,7 @@ public class GenericPersonBundle while (orgaunits.next()) { createOrgaUnitAssoc(orgaunits); } - + return true; } else { return super.copyProperty(source, property, copier); @@ -138,9 +136,11 @@ public class GenericPersonBundle } private void createOrgaUnitAssoc(final DataCollection orgaunits) { - final GenericOrganizationalUnitBundle draftOrga = (GenericOrganizationalUnitBundle) DomainObjectFactory. + final GenericOrganizationalUnitBundle draftOrga = + (GenericOrganizationalUnitBundle) DomainObjectFactory. newInstance(orgaunits.getDataObject()); - final GenericOrganizationalUnitBundle liveOrga = (GenericOrganizationalUnitBundle) draftOrga. + final GenericOrganizationalUnitBundle liveOrga = + (GenericOrganizationalUnitBundle) draftOrga. getLiveVersion(); if (liveOrga != null) { 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 451d1ac4a..42e755e91 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInCollectedVolume.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInCollectedVolume.pdl @@ -20,6 +20,7 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.ContentBundle; // PDL definition for a collected volume object type ArticleInCollectedVolume extends Publication { @@ -33,6 +34,6 @@ object type ArticleInCollectedVolume extends Publication { reference key (ct_article_in_collected_volume.article_id); } -object type ArticleInJournalBundle extends PublicationBundle { - reference key (ct_article_in_journal_bundles.bundle_id); +object type ArticleInCollectedVolumeBundle extends PublicationBundle { + reference key (ct_article_in_collected_volume_bundles.bundle_id); } \ No newline at end of file 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 34b940bd9..712f708cc 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInJournal.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/ArticleInJournal.pdl @@ -20,6 +20,7 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.ContentBundle; // PDL definition for an article in a journal object type ArticleInJournal extends Publication { @@ -33,4 +34,8 @@ object type ArticleInJournal extends Publication { reference key (ct_article_in_journal.article_in_journal_id); +} + +object type ArticleInJournalBundle extends PublicationBundle { + reference key (ct_article_in_journal_bundles.bundle_id); } \ No newline at end of file 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 b17f2e55f..7ceadd0e1 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl @@ -29,17 +29,21 @@ object type CollectedVolume extends PublicationWithPublisher { //Moved to publication Boolean[0..1] reviewed = ct_collected_volume.reviewed BIT; } +object type CollectedVolumeBundle extends PublicationBundle { + reference key (ct_collected_volume_bundles.bundle_id); +} + association { - CollectedVolume[0..n] collectedVolume = join ct_article_in_collected_volume.article_id - to ct_collected_volume_article_map.article_id, + CollectedVolumeBundle[0..n] collectedVolume = join ct_article_in_collected_volume_bundles.bundle_id + to ct_collected_volume_article_map.article_id, join ct_collected_volume_article_map.collected_volume_id - to ct_collected_volume.collected_volume_id; - ArticleInCollectedVolume[0..n] articles = join ct_collected_volume.collected_volume_id + to ct_collected_volume_bundles.bundle_id; + ArticleInCollectedVolumeBundle[0..n] articles = join ct_collected_volume_bundles.bundle_id to ct_collected_volume_article_map.collected_volume_id, join ct_collected_volume_article_map.article_id - to ct_article_in_collected_volume.article_id; + to ct_article_in_collected_volume_bundles.bundle_id; Integer[0..1] articleOrder = ct_collected_volume_article_map.article_order INTEGER; diff --git a/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.xml b/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.xml index 6e731aefd..ae6a2a33a 100644 --- a/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.xml +++ b/ccm-sci-publications/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ArticleInCollectedVolume.xml @@ -10,7 +10,7 @@ objectType="com.arsdigita.cms.contenttypes.ArticleInCollectedVolume" classname="com.arsdigita.cms.contenttypes.ArticleInCollectedVolume"> - + - +