Bugfixes for sci-publications, especially CollectedVolumeAsset

pull/1/head
Jens Pelzetter 2022-05-30 20:22:48 +02:00
parent 5cad76c691
commit 4e03986d45
11 changed files with 264 additions and 11 deletions

View File

@ -7,7 +7,10 @@ package org.scientificcms.publications.assets;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
import org.librecms.contentsection.Asset; import org.librecms.contentsection.Asset;
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
import org.scientificcms.publications.CollectedVolume; import org.scientificcms.publications.CollectedVolume;
import org.scientificcms.publications.ui.assets.CollectedVolumeAssetCreateStep;
import org.scientificcms.publications.ui.assets.CollectedVolumeAssetEditStep;
import java.util.Objects; import java.util.Objects;
@ -24,8 +27,12 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Entity @Entity
@Table(name = "COLLECTED_VOLUMES", schema = DB_SCHEMA) @Table(name = "COLLECTED_VOLUME_ASSETS", schema = DB_SCHEMA)
@Audited @Audited
@MvcAssetEditKit(
createStep = CollectedVolumeAssetCreateStep.class,
editStep = CollectedVolumeAssetEditStep.class
)
public class CollectedVolumeAsset extends Asset { public class CollectedVolumeAsset extends Asset {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -24,7 +24,7 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a> * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/ */
@Entity @Entity
@Table(name = "PROCEEDINGS", schema = DB_SCHEMA) @Table(name = "PROCEEDINGS_ASSETS", schema = DB_SCHEMA)
@Audited @Audited
public class ProceedingsAsset extends Asset { public class ProceedingsAsset extends Asset {

View File

@ -43,7 +43,7 @@ public class CollectedVolumeAssetCreateStep
@Override @Override
public String showCreateStep() { public String showCreateStep() {
return "org/scientificcms/assets/collectedvolume/ui/create-collected-volume.xhtml"; return "org/scientificcms/assets/collectedvolume/ui/create-collectedvolume.xhtml";
} }
@Override @Override

View File

@ -2,7 +2,7 @@ package org.scientificcms.publications.ui.assets;
import org.librecms.assets.Person; import org.librecms.assets.Person;
import org.librecms.ui.contentsections.documents.CmsEditorLocaleVariantRow; import org.librecms.ui.contentsections.documents.CmsEditorLocaleVariantRow;
import org.scientificcms.publications.Publisher; import org.scientificcms.publications.assets.PublisherAsset;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -146,7 +146,7 @@ public class CollectedVolumeAssetEditStepModel {
} }
public String getPublisherType() { public String getPublisherType() {
return Publisher.class.getName(); return PublisherAsset.class.getName();
} }
} }

View File

@ -16,10 +16,17 @@ public class SciPublicationsAssetSteps implements MvcAssetEditSteps {
@Override @Override
public Set<Class<?>> getClasses() { public Set<Class<?>> getClasses() {
return Set.of( return Set.of(
CollectedVolumeAssetEditStep.class,
JournalAssetEditStep.class, JournalAssetEditStep.class,
PublisherAssetEditStep.class, PublisherAssetEditStep.class,
SeriesAssetEditStep.class SeriesAssetEditStep.class
); );
} }
@Override
public Set<Class<?>> getResourceClasses() {
return Set.of(
CollectedVolumeAssetAuthors.class
);
}
} }

View File

@ -26,7 +26,7 @@
name="name" name="name"
pattern="^([a-zA-Z0-9_-]*)$" pattern="^([a-zA-Z0-9_-]*)$"
required="true" required="true"
value="#{SciCmsJournalAssetCreateStep.name}" value="#{SciCmsCollectedVolumeAssetCreateStep.name}"
/> />
<bootstrap:formGroupSelect <bootstrap:formGroupSelect
@ -41,11 +41,11 @@
<bootstrap:formGroupText <bootstrap:formGroupText
help="#{SciPublicationsUiMessageBundle['collectedvolume.createform.title.help']}" help="#{SciPublicationsUiMessageBundle['collectedvolume.createform.title.help']}"
inputId="journalTitle" inputId="title"
label="#{SciPublicationsUiMessageBundle['collectedvolume.createform.title.label']}" label="#{SciPublicationsUiMessageBundle['collectedvolume.createform.title.label']}"
name="journalTitle" name="title"
required="true" required="true"
value="#{SciCmsJournalAssetCreateStep.title}" value="#{SciCmsCollectedVolumeAssetCreateStep.title}"
/> />
<bootstrap:formGroupNumber <bootstrap:formGroupNumber

View File

@ -242,6 +242,7 @@
type="button"> type="button">
<bootstrap:svgIcon icon="pen" /> <bootstrap:svgIcon icon="pen" />
<span class="sr-only">#{SciPublicationsUiMessageBundle['collectedvolume.editstep.properties.edit']}</span> <span class="sr-only">#{SciPublicationsUiMessageBundle['collectedvolume.editstep.properties.edit']}</span>
</button>
</div> </div>
<div aria-hidden="true" <div aria-hidden="true"
aria-labelledby="properties-edit-dialog-title" aria-labelledby="properties-edit-dialog-title"

View File

@ -0,0 +1,117 @@
drop table SCI_PUBLICATIONS.COLLECTED_VOLUMES cascade;
drop table SCI_PUBLICATIONS.COLLECTED_VOLUMES_AUD cascade;
drop table SCI_PUBLICATIONS_PROCEEDINGS cascade;
drop table SCI_PUBLICATIONS_PROCEEDINGS_AUD cascade;
create table SCI_PUBLICATIONS.COLLECTED_VOLUMES (
PUBLICATION_ID bigint not null,
primary key (PUBLICATION_ID)
);
create table SCI_PUBLICATIONS.COLLECTED_VOLUMES_AUD (
PUBLICATION_ID bigint not null,
REV integer not null,
primary key (PUBLICATION_ID, REV)
);
create table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS (
OBJECT_ID bigint not null,
COLLECTED_VOLUME_ID bigint,
primary key (OBJECT_ID)
);
create table SCI_PUBLICATIONS.PROCEEDINGS (
END_DATE date,
NAME_OF_CONFERENCE varchar(2048),
PLACE_OF_CONFERENCE varchar(2048),
START_DATE date,
PUBLICATION_ID bigint not null,
ORGANIZER_ID bigint,
primary key (PUBLICATION_ID)
);
create table SCI_PUBLICATIONS.PROCEEDINGS_AUD (
PUBLICATION_ID bigint not null,
REV integer not null,
END_DATE date,
NAME_OF_CONFERENCE varchar(2048),
PLACE_OF_CONFERENCE varchar(2048),
START_DATE date,
ORGANIZER_ID bigint,
primary key (PUBLICATION_ID, REV)
);
create table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS_AUD (
OBJECT_ID bigint not null,
REV integer not null,
COLLECTED_VOLUME_ID bigint,
primary key (OBJECT_ID, REV)
);
create table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS (
OBJECT_ID bigint not null,
PROCEEDINGS_ID bigint,
primary key (OBJECT_ID)
);
create table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS_AUD (
OBJECT_ID bigint not null,
REV integer not null,
PROCEEDINGS_ID bigint,
primary key (OBJECT_ID, REV)
);
alter table SCI_PUBLICATIONS.ARTICLES_IN_COLLECTED_VOLUME
add constraint FKkb34jhf75m9vh02foylq1ug4s
foreign key (COLLECTED_VOLUME_ID)
references SCI_PUBLICATIONS.COLLECTED_VOLUMES;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUMES
add constraint FKqq7bm5yk69mck1xqsdgsv7ech
foreign key (PUBLICATION_ID)
references SCI_PUBLICATIONS.PUBLICATIONS_WITH_PUBLISHER;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUMES_AUD
add constraint FKcwvisrc7uwfv09tdpr6iaiste
foreign key (PUBLICATION_ID, REV)
references SCI_PUBLICATIONS.PUBLICATIONS_WITH_PUBLISHER_AUD;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS
add constraint FKabg3388xca99o8qdy77s39dcy
foreign key (COLLECTED_VOLUME_ID)
references SCI_PUBLICATIONS.COLLECTED_VOLUMES;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS
add constraint FKevodnm64rjlpwg0rshem0i875
foreign key (OBJECT_ID)
references CCM_CMS.ASSETS;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS_AUD
add constraint FKp2d2l0kjdsopae419j8usd30b
foreign key (OBJECT_ID, REV)
references CCM_CMS.ASSETS_AUD;
alter table SCI_PUBLICATIONS.PROCEEDINGS
add constraint FKmmnnwj9y6esnslb7vwowxg137
foreign key (ORGANIZER_ID)
references CCM_CMS.ORGANIZATIONS;
alter table SCI_PUBLICATIONS.PROCEEDINGS
add constraint FKq5cs05ulosb5r672e5srij9cp
foreign key (PUBLICATION_ID)
references SCI_PUBLICATIONS.PUBLICATIONS_WITH_PUBLISHER;
alter table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS
add constraint FKbk0i68t7oldry6nmqwi3jtmxd
foreign key (PROCEEDINGS_ID)
references SCI_PUBLICATIONS.PROCEEDINGS;
alter table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS
add constraint FK3a4f2hnbtja2j2yrs6kodc21v
foreign key (OBJECT_ID)
references CCM_CMS.ASSETS;
alter table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS_AUD
add constraint FK41vrnu1ldq4emdvsybmrs781m
foreign key (OBJECT_ID, REV)
references CCM_CMS.ASSETS_AUD;

View File

@ -0,0 +1,117 @@
drop table SCI_PUBLICATIONS.COLLECTED_VOLUMES cascade;
drop table SCI_PUBLICATIONS.COLLECTED_VOLUMES_AUD cascade;
drop table SCI_PUBLICATIONS.PROCEEDINGS cascade;
drop table SCI_PUBLICATIONS.PROCEEDINGS_AUD cascade;
create table SCI_PUBLICATIONS.COLLECTED_VOLUMES (
PUBLICATION_ID bigint not null,
primary key (PUBLICATION_ID)
);
create table SCI_PUBLICATIONS.COLLECTED_VOLUMES_AUD (
PUBLICATION_ID bigint not null,
REV integer not null,
primary key (PUBLICATION_ID, REV)
);
create table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS (
OBJECT_ID bigint not null,
COLLECTED_VOLUME_ID bigint,
primary key (OBJECT_ID)
);
create table SCI_PUBLICATIONS.PROCEEDINGS (
END_DATE date,
NAME_OF_CONFERENCE varchar(2048),
PLACE_OF_CONFERENCE varchar(2048),
START_DATE date,
PUBLICATION_ID int8 not null,
ORGANIZER_ID int8,
primary key (PUBLICATION_ID)
);
create table SCI_PUBLICATIONS.PROCEEDINGS_AUD (
PUBLICATION_ID int8 not null,
REV int4 not null,
END_DATE date,
NAME_OF_CONFERENCE varchar(2048),
PLACE_OF_CONFERENCE varchar(2048),
START_DATE date,
ORGANIZER_ID int8,
primary key (PUBLICATION_ID, REV)
);
create table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS_AUD (
OBJECT_ID bigint not null,
REV integer not null,
COLLECTED_VOLUME_ID bigint,
primary key (OBJECT_ID, REV)
);
create table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS (
OBJECT_ID int8 not null,
PROCEEDINGS_ID int8,
primary key (OBJECT_ID)
);
create table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS_AUD (
OBJECT_ID int8 not null,
REV int4 not null,
PROCEEDINGS_ID int8,
primary key (OBJECT_ID, REV)
);
alter table SCI_PUBLICATIONS.ARTICLES_IN_COLLECTED_VOLUME
add constraint FKkb34jhf75m9vh02foylq1ug4s
foreign key (COLLECTED_VOLUME_ID)
references SCI_PUBLICATIONS.COLLECTED_VOLUMES;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUMES
add constraint FKqq7bm5yk69mck1xqsdgsv7ech
foreign key (PUBLICATION_ID)
references SCI_PUBLICATIONS.PUBLICATIONS_WITH_PUBLISHER;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUMES_AUD
add constraint FKcwvisrc7uwfv09tdpr6iaiste
foreign key (PUBLICATION_ID, REV)
references SCI_PUBLICATIONS.PUBLICATIONS_WITH_PUBLISHER_AUD;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS
add constraint FKabg3388xca99o8qdy77s39dcy
foreign key (COLLECTED_VOLUME_ID)
references SCI_PUBLICATIONS.COLLECTED_VOLUMES;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS
add constraint FKevodnm64rjlpwg0rshem0i875
foreign key (OBJECT_ID)
references CCM_CMS.ASSETS;
alter table SCI_PUBLICATIONS.COLLECTED_VOLUME_ASSETS_AUD
add constraint FKp2d2l0kjdsopae419j8usd30b
foreign key (OBJECT_ID, REV)
references CCM_CMS.ASSETS_AUD;
alter table SCI_PUBLICATIONS.PROCEEDINGS
add constraint FKmmnnwj9y6esnslb7vwowxg137
foreign key (ORGANIZER_ID)
references CCM_CMS.ORGANIZATIONS;
alter table SCI_PUBLICATIONS.PROCEEDINGS
add constraint FKq5cs05ulosb5r672e5srij9cp
foreign key (PUBLICATION_ID)
references SCI_PUBLICATIONS.PUBLICATIONS_WITH_PUBLISHER;
alter table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS
add constraint FKbk0i68t7oldry6nmqwi3jtmxd
foreign key (PROCEEDINGS_ID)
references SCI_PUBLICATIONS.PROCEEDINGS;
alter table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS
add constraint FK3a4f2hnbtja2j2yrs6kodc21v
foreign key (OBJECT_ID)
references CCM_CMS.ASSETS;
alter table SCI_PUBLICATIONS.PROCEEDINGS_ASSETS_AUD
add constraint FK41vrnu1ldq4emdvsybmrs781m
foreign key (OBJECT_ID, REV)
references CCM_CMS.ASSETS_AUD;

View File

@ -92,7 +92,7 @@ collectedvolume.createform.title.help=The title of the collected volume.
collectedvolume.createform.title.label=Title collectedvolume.createform.title.label=Title
collectedvolume.label=Collected Volume collectedvolume.label=Collected Volume
collectedvolume.description=A collected volume as asset. collectedvolume.description=A collected volume as asset.
collectedvolume.createform.yearofpublication.help=Year of publication collectedvolume.createform.yearofpublication.help=The year of publication of the collected volume.
collectedvolume.createform.shortdescription.help=A short description of the collected volume. collectedvolume.createform.shortdescription.help=A short description of the collected volume.
collectedvolume.createform.shortdescription.label=Description collectedvolume.createform.shortdescription.label=Description
collectedvolume.editstep.header=Edit Collected Volume {0} collectedvolume.editstep.header=Edit Collected Volume {0}
@ -160,3 +160,5 @@ collectedvolume.editstep.shortdescription.remove.submit=Remove
collectedvolume.editstep.shortdescription.remove.text=Are you sure to remove the following localized description of the collected volume: collectedvolume.editstep.shortdescription.remove.text=Are you sure to remove the following localized description of the collected volume:
collectedvolume.editstep.shortdescription.remove.title=Confirm removal of localized description collectedvolume.editstep.shortdescription.remove.title=Confirm removal of localized description
collectedvolume.editstep.shortdescription.title=Description collectedvolume.editstep.shortdescription.title=Description
collectedvolume.createform.yearofpublication.label=Year of publication
createstep.title.error.missing=No title for the collected volume was provided.

View File

@ -92,7 +92,7 @@ collectedvolume.createform.title.help=Der Titel des Sammelbandes.
collectedvolume.createform.title.label=Titel collectedvolume.createform.title.label=Titel
collectedvolume.label=Sammelband collectedvolume.label=Sammelband
collectedvolume.description=Ein Sammelband, repr\u00e4sentiert als Asset. collectedvolume.description=Ein Sammelband, repr\u00e4sentiert als Asset.
collectedvolume.createform.yearofpublication.help=Erscheinungsjahr collectedvolume.createform.yearofpublication.help=Das Erscheinungsjahr des Sammelbandes.
collectedvolume.createform.shortdescription.help=Eine kurze Beschreibung des Sammelbandes. collectedvolume.createform.shortdescription.help=Eine kurze Beschreibung des Sammelbandes.
collectedvolume.createform.shortdescription.label=Beschreibung collectedvolume.createform.shortdescription.label=Beschreibung
collectedvolume.editstep.header=Sammelband {0} bearbeiten collectedvolume.editstep.header=Sammelband {0} bearbeiten
@ -160,3 +160,5 @@ collectedvolume.editstep.shortdescription.remove.submit=Entfernen
collectedvolume.editstep.shortdescription.remove.text=Sind Sie sicher, dass Sie die folgende lokaliserte Beschreibung des Sammelbandes entfernen wollen: collectedvolume.editstep.shortdescription.remove.text=Sind Sie sicher, dass Sie die folgende lokaliserte Beschreibung des Sammelbandes entfernen wollen:
collectedvolume.editstep.shortdescription.remove.title=Entfernen einer lokaliserten Beschreibung best\u00e4tigen collectedvolume.editstep.shortdescription.remove.title=Entfernen einer lokaliserten Beschreibung best\u00e4tigen
collectedvolume.editstep.shortdescription.title=Beschreibung collectedvolume.editstep.shortdescription.title=Beschreibung
collectedvolume.createform.yearofpublication.label=Erscheinungsjahr
createstep.title.error.missing=Es wurde kein Titel f\u00fcr den Sammelband angegeben.