Updated ProceedingsImExporter to implement updated interface.
parent
105bdb0e20
commit
92085a8660
|
|
@ -3,6 +3,7 @@ package org.scientificcms.publications;
|
||||||
import org.libreccm.imexport.Processes;
|
import org.libreccm.imexport.Processes;
|
||||||
import org.librecms.assets.Organization;
|
import org.librecms.assets.Organization;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
|
@ -30,4 +31,55 @@ public class ProceedingsImExporter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateExistingPublicationWithPublisher(
|
||||||
|
final Proceedings existingPublication,
|
||||||
|
final Proceedings withImportedPublication
|
||||||
|
) {
|
||||||
|
if (!Objects.equals(
|
||||||
|
existingPublication.getNameOfConference(),
|
||||||
|
withImportedPublication.getNameOfConference()
|
||||||
|
)) {
|
||||||
|
existingPublication.setNameOfConference(
|
||||||
|
withImportedPublication.getNameOfConference()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Objects.equals(
|
||||||
|
existingPublication.getPlaceOfConference(),
|
||||||
|
withImportedPublication.getPlaceOfConference()
|
||||||
|
)) {
|
||||||
|
existingPublication.setPlaceOfConference(
|
||||||
|
withImportedPublication.getPlaceOfConference()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Objects.equals(
|
||||||
|
existingPublication.getStartDate(),
|
||||||
|
withImportedPublication.getStartDate()
|
||||||
|
)) {
|
||||||
|
existingPublication.setStartDate(
|
||||||
|
withImportedPublication.getStartDate()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Objects.equals(
|
||||||
|
existingPublication.getEndDate(),
|
||||||
|
withImportedPublication.getEndDate()
|
||||||
|
)) {
|
||||||
|
existingPublication.setEndDate(
|
||||||
|
withImportedPublication.getEndDate()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Objects.equals(
|
||||||
|
existingPublication.getOrganizer(),
|
||||||
|
withImportedPublication.getOrganizer()
|
||||||
|
)) {
|
||||||
|
existingPublication.setOrganizer(
|
||||||
|
withImportedPublication.getOrganizer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue