Updated GreyLiteratureImExporter to implement updated interface
parent
3f5422375f
commit
d90ad517c3
|
|
@ -5,7 +5,6 @@ import org.librecms.assets.Organization;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
|
|
@ -23,9 +22,28 @@ public class GreyLiteratureImExporter
|
|||
}
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void initUnPublishedImExporter() {
|
||||
addRequiredEntities(Set.of(Organization.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingUnPublished(
|
||||
final GreyLiterature existingPublication,
|
||||
final GreyLiterature withImportedPublication
|
||||
) {
|
||||
if (existingPublication.getStartPage() != withImportedPublication
|
||||
.getStartPage()) {
|
||||
existingPublication.setStartPage(
|
||||
withImportedPublication.getStartPage()
|
||||
);
|
||||
}
|
||||
|
||||
if (existingPublication.getEndPage() != withImportedPublication
|
||||
.getEndPage()) {
|
||||
existingPublication.setEndPage(
|
||||
withImportedPublication.getEndPage()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue