Updated TalkImExporter to implement updated interface.
parent
92085a8660
commit
0900d983e4
|
|
@ -2,7 +2,8 @@ package org.scientificcms.publications;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
|
|
@ -19,9 +20,38 @@ public class TalkImExporter extends AbstractPublicationImExporter<Talk> {
|
|||
}
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
protected void initPublicationImExporter() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingPublication(
|
||||
final Talk existingPublication,
|
||||
final Talk withImportedPublication
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingPublication.getEvent(),
|
||||
withImportedPublication.getEvent()
|
||||
)) {
|
||||
existingPublication.setEvent(withImportedPublication.getEvent());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingPublication.getDateOfTalk(),
|
||||
withImportedPublication.getDateOfTalk()
|
||||
)) {
|
||||
existingPublication.setDateOfTalk(
|
||||
withImportedPublication.getDateOfTalk()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingPublication.getPlace(),
|
||||
withImportedPublication.getPlace()
|
||||
)) {
|
||||
existingPublication.setPlace(withImportedPublication.getPlace());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue