parent
0818ad1481
commit
643b89099f
|
|
@ -2,9 +2,9 @@ package org.scientificcms.publications;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
|
|
@ -22,9 +22,41 @@ public class ArticleInCollectedVolumeImExporter
|
|||
}
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
protected void initPublicationImExporter() {
|
||||
addRequiredEntities(Set.of(CollectedVolume.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingPublication(
|
||||
final ArticleInCollectedVolume existingPublication,
|
||||
final ArticleInCollectedVolume withImportedPublication
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingPublication.getStartPage(),
|
||||
withImportedPublication.getStartPage()
|
||||
)) {
|
||||
existingPublication.setStartPage(
|
||||
withImportedPublication.getStartPage()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingPublication.getEndPage(),
|
||||
withImportedPublication.getEndPage()
|
||||
)) {
|
||||
existingPublication.setEndPage(
|
||||
withImportedPublication.getEndPage()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingPublication.getChapter(),
|
||||
withImportedPublication.getChapter()
|
||||
)) {
|
||||
existingPublication.setChapter(
|
||||
withImportedPublication.getChapter()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue