Adding some more logging for importing entities

deploy_packages_to_gitea
Jens Pelzetter 2022-12-11 12:21:03 +01:00
parent dfb25f0d38
commit 2cfbfc80ea
2 changed files with 10 additions and 7 deletions

View File

@ -58,7 +58,7 @@ public abstract class AbstractEntityImExporter<T extends Exportable> {
* this class using {@link #addRequiredEntities(java.util.Set)}. Other
* implementations of {@code AbstractEntityImExporter} may also add themself
* to the list of required entities of another implementation of
* {@code AbstractEnitityImExporter}. For this, {@link #getEntityClass()}
* {@code AbstractEnitityImExporter}. For this, {@link #getEntityClass()}
* should be used, to add the concrete implementation.
*/
private final Set<Class<? extends Exportable>> requiredEntities;
@ -96,8 +96,9 @@ public abstract class AbstractEntityImExporter<T extends Exportable> {
* annotations in a portable way in the rest of the code because CDI
* containers usually create a {@link java.lang.reflect.Proxy} class and
* there is no portable way to unproxy a class.
*
* <strong>This method is not intended to be overriden, but CDI beans can't have final methods.</strong>
*
* <strong>This method is not intended to be overriden, but CDI beans can't
* have final methods.</strong>
*
* @return A {@link Set} of exportable entity classes which should be
* processed before the entities which are processed by this
@ -111,8 +112,9 @@ public abstract class AbstractEntityImExporter<T extends Exportable> {
* Add entities that have be processed before this implementation is used.
* This method should only be called by the implementation of the
* {@link #init()} method.
*
* <strong>This method is not intended to be overriden, but CDI beans can't have final methods.</strong>
*
* <strong>This method is not intended to be overriden, but CDI beans can't
* have final methods.</strong>
*
* @param requiredEntities The additional required entities.
*/
@ -165,7 +167,7 @@ public abstract class AbstractEntityImExporter<T extends Exportable> {
/**
* Reloads the entity to export. Entities become detacted for several
* reasons before they are passed to the null null null null null null null {@link #exportEntity(org.libreccm.imexport.Exportable) method. The
* reasons before they are passed to the null null null null null null null null {@link #exportEntity(org.libreccm.imexport.Exportable) method. The
* implementation of this should reload the passed entity.
*
* @param entity The entity to reload.

View File

@ -323,7 +323,8 @@ public class ImportExport {
.lines()
.collect(Collectors.joining("\n"));
imExporter.importEntity(data);
final Exportable entity = imExporter.importEntity(data);
LOGGER.info("Imported entity {}", entity.toString());
} catch (IOException
| FileDoesNotExistException
| FileAccessException