Removed final modifier from some methods since CDI does not support
final methodsmaster
parent
7fcdb4a967
commit
9e252145f0
|
|
@ -19,9 +19,20 @@ public abstract class AbstractPublicationImExporter<T extends Publication>
|
||||||
@Inject
|
@Inject
|
||||||
private PublicationRepository publicationRepo;
|
private PublicationRepository publicationRepo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link AbstractEntityImExporter#init() }
|
||||||
|
* for subtypes of {@link Publication}.
|
||||||
|
*
|
||||||
|
* !!!Warning: Implementations of this abstract class MUST NEVER override
|
||||||
|
* this method. Instead, they MUST implement
|
||||||
|
* {@link #initPublicationImExporter()}.
|
||||||
|
*
|
||||||
|
* Unfortunetly, CDI does not support final methods, therefore we can't make
|
||||||
|
* this method final.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
protected final void init() {
|
protected void init() {
|
||||||
initPublicationImExporter();
|
initPublicationImExporter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -37,8 +48,23 @@ public abstract class AbstractPublicationImExporter<T extends Publication>
|
||||||
publicationRepo.save(publication);
|
publicationRepo.save(publication);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of
|
||||||
|
* {@link AbstractEntityImExporter#updateExistingEntity(org.libreccm.imexport.Exportable, org.libreccm.imexport.Exportable)}
|
||||||
|
* for subtypes of {@link Publication}.
|
||||||
|
*
|
||||||
|
* !!!Warning: Implementations of this abstract class MUST NEVER override
|
||||||
|
* this method.Instead, they MUST implement
|
||||||
|
* {@link #updateExistingPublication(org.scientificcms.publications.Publication, org.scientificcms.publications.Publication)}.
|
||||||
|
*
|
||||||
|
* Unfortunetly, CDI does not support final methods, therefore we can't make
|
||||||
|
* this method final.
|
||||||
|
*
|
||||||
|
* @param existingEntity Exiting publication.
|
||||||
|
* @param importedEntity Imported publication.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected final void updateExistingEntity(
|
protected void updateExistingEntity(
|
||||||
final T existingEntity,
|
final T existingEntity,
|
||||||
final T importedEntity
|
final T importedEntity
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,20 @@ import java.util.Set;
|
||||||
public abstract class AbstractPublicationWithPublisherImExporter<T extends PublicationWithPublisher>
|
public abstract class AbstractPublicationWithPublisherImExporter<T extends PublicationWithPublisher>
|
||||||
extends AbstractPublicationImExporter<T> {
|
extends AbstractPublicationImExporter<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of
|
||||||
|
* {@link AbstractPublicationImExporter#initPublicationImExporter()} for
|
||||||
|
* subtypes of {@link PublicationWithPublisher}.
|
||||||
|
*
|
||||||
|
* !!!Warning: Implementations of this abstract class MUST NEVER override
|
||||||
|
* this method. Instead, they MUST implement
|
||||||
|
* {@link #initPublicationWithPublisherImExporter()}.
|
||||||
|
*
|
||||||
|
* Unfortunetly, CDI does not support final methods, therefore we can't make
|
||||||
|
* this method final.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected final void initPublicationImExporter() {
|
protected void initPublicationImExporter() {
|
||||||
addRequiredEntities(
|
addRequiredEntities(
|
||||||
Set.of(
|
Set.of(
|
||||||
Publisher.class
|
Publisher.class
|
||||||
|
|
@ -23,8 +35,23 @@ public abstract class AbstractPublicationWithPublisherImExporter<T extends Publi
|
||||||
|
|
||||||
protected abstract void initPublicationWithPublisherImExporter();
|
protected abstract void initPublicationWithPublisherImExporter();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of
|
||||||
|
* {@link AbstractPublicationImExporter#updateExistingPublication(org.scientificcms.publications.Publication, org.scientificcms.publications.Publication)}
|
||||||
|
* for subtypes of {@link PublicationWithPublisher}.
|
||||||
|
*
|
||||||
|
* !!!Warning: Implementations of this abstract class MUST NEVER override
|
||||||
|
* this method.Instead, they MUST implement
|
||||||
|
* {@link #updateExistingPublicationWithPublisher(org.scientificcms.publications.PublicationWithPublisher, org.scientificcms.publications.PublicationWithPublisher)}.
|
||||||
|
*
|
||||||
|
* Unfortunetly, CDI does not support final methods, therefore we can't make
|
||||||
|
* this method final.
|
||||||
|
*
|
||||||
|
* @param existingPublication Exiting publication.
|
||||||
|
* @param withImportedPublication Imported publication.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected final void updateExistingPublication(
|
protected void updateExistingPublication(
|
||||||
final T existingPublication,
|
final T existingPublication,
|
||||||
final T withImportedPublication
|
final T withImportedPublication
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,20 @@ import java.util.Set;
|
||||||
public abstract class AbstractUnPublishedImExporter<T extends UnPublished>
|
public abstract class AbstractUnPublishedImExporter<T extends UnPublished>
|
||||||
extends AbstractPublicationImExporter<T> {
|
extends AbstractPublicationImExporter<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of
|
||||||
|
* {@link AbstractPublicationImExporter#initPublicationImExporter()} for
|
||||||
|
* subtypes of {@link UnPublished}.
|
||||||
|
*
|
||||||
|
* !!!Warning: Implementations of this abstract class MUST NEVER override
|
||||||
|
* this method. Instead, they MUST implement
|
||||||
|
* {@link #initUnPublishedImExporter()}.
|
||||||
|
*
|
||||||
|
* Unfortunetly, CDI does not support final methods, therefore we can't make
|
||||||
|
* this method final.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected final void initPublicationImExporter() {
|
protected void initPublicationImExporter() {
|
||||||
addRequiredEntities(
|
addRequiredEntities(
|
||||||
Set.of(Organization.class)
|
Set.of(Organization.class)
|
||||||
);
|
);
|
||||||
|
|
@ -24,8 +36,23 @@ public abstract class AbstractUnPublishedImExporter<T extends UnPublished>
|
||||||
|
|
||||||
protected abstract void initUnPublishedImExporter();
|
protected abstract void initUnPublishedImExporter();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of
|
||||||
|
* {@link AbstractPublicationImExporter#updateExistingPublication(org.scientificcms.publications.Publication, org.scientificcms.publications.Publication)}
|
||||||
|
* for subtypes of {@link UnPublished}.
|
||||||
|
*
|
||||||
|
* !!!Warning: Implementations of this abstract class MUST NEVER override
|
||||||
|
* this method.Instead, they MUST implement
|
||||||
|
* {@link #updateExistingUnPublished(org.scientificcms.publications.UnPublished, org.scientificcms.publications.UnPublished)}.
|
||||||
|
*
|
||||||
|
* Unfortunetly, CDI does not support final methods, therefore we can't make
|
||||||
|
* this method final.
|
||||||
|
*
|
||||||
|
* @param existingPublication Exiting publication.
|
||||||
|
* @param withImportedPublication Imported publication.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected final void updateExistingPublication(
|
protected void updateExistingPublication(
|
||||||
final T existingPublication,
|
final T existingPublication,
|
||||||
final T withImportedPublication
|
final T withImportedPublication
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue