parent
0818ad1481
commit
643b89099f
|
|
@ -2,9 +2,9 @@ package org.scientificcms.publications;
|
||||||
|
|
||||||
import org.libreccm.imexport.Processes;
|
import org.libreccm.imexport.Processes;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,9 +22,41 @@ public class ArticleInCollectedVolumeImExporter
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@PostConstruct
|
protected void initPublicationImExporter() {
|
||||||
protected void init() {
|
|
||||||
addRequiredEntities(Set.of(CollectedVolume.class));
|
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