diff --git a/software/core/oqm-core-api/build.gradle b/software/core/oqm-core-api/build.gradle index a612ec46f0..923379114d 100644 --- a/software/core/oqm-core-api/build.gradle +++ b/software/core/oqm-core-api/build.gradle @@ -8,7 +8,7 @@ plugins { } group 'com.ebp.openQuarterMaster' -version '4.4.4' +version '4.4.5-SNAPSHOT' repositories { mavenCentral() diff --git a/software/core/oqm-core-api/docs/DataModel.md b/software/core/oqm-core-api/docs/DataModel.md index 3ddc50b673..c3039f36eb 100644 --- a/software/core/oqm-core-api/docs/DataModel.md +++ b/software/core/oqm-core-api/docs/DataModel.md @@ -1,4 +1,4 @@ -# Open QuarterMaster Base Station Data Models +# Open QuarterMaster Core API Data Models [Back](README.md) diff --git a/software/core/oqm-core-api/docs/Features.adoc b/software/core/oqm-core-api/docs/Features.adoc index da68c82ac6..a05290a9dd 100644 --- a/software/core/oqm-core-api/docs/Features.adoc +++ b/software/core/oqm-core-api/docs/Features.adoc @@ -1,4 +1,4 @@ -= OQM Base Station Features += OQM Core API Features :toc: :toclevels: 5 :sectnumlevels:5 diff --git a/software/core/oqm-core-api/docs/README.md b/software/core/oqm-core-api/docs/README.md index 211539e93f..aca20abb6a 100644 --- a/software/core/oqm-core-api/docs/README.md +++ b/software/core/oqm-core-api/docs/README.md @@ -1,4 +1,4 @@ -# Open QuarterMaster Base Station Documentation +# Open QuarterMaster Core API Documentation [Back](../README.md) diff --git a/software/core/oqm-core-api/docs/development/BuildingAndDeployment.adoc b/software/core/oqm-core-api/docs/development/BuildingAndDeployment.adoc index bd0035fec8..70414ef6b3 100644 --- a/software/core/oqm-core-api/docs/development/BuildingAndDeployment.adoc +++ b/software/core/oqm-core-api/docs/development/BuildingAndDeployment.adoc @@ -13,11 +13,11 @@ link:README.md[Back] === Configuration -This is a list of relevant config values for configuring a running instance of Open QuarterMaster Base Station. These variables can be passed via environment variables. +This is a list of relevant config values for configuring a running instance of Open QuarterMaster Core API. These variables can be passed via environment variables. For more information: https://quarkus.io/guides/config-reference -When deployed using link:../../Station-Captain[Station Captain], Base Station's config file is: `/etc/oqm/serviceConfig/core-base+station/config.list` +When deployed using link:../../Station-Captain[Station Captain], the Core API's config file is: `/etc/oqm/serviceConfig/core-api/config.list` ==== Service Info diff --git a/software/core/oqm-core-api/installerSrc/core-api-config.list b/software/core/oqm-core-api/installerSrc/core-api-config.list index dca651d2ef..85f51f0a8d 100644 --- a/software/core/oqm-core-api/installerSrc/core-api-config.list +++ b/software/core/oqm-core-api/installerSrc/core-api-config.list @@ -1,6 +1,6 @@ # -# The Main config for Base Station. Do not edit. To adjust configuration, edit: -# /etc/oqm/serviceConfig/core/base+station/user-config.list +# The Main config for the OQM Core API. Do not edit. To adjust configuration, edit: +# /etc/oqm/serviceConfig/core/api/user-config.list # # Basic configs diff --git a/software/core/oqm-core-api/installerSrc/oqm-core-api.service b/software/core/oqm-core-api/installerSrc/oqm-core-api.service index 7a2c07da2a..de2b404d68 100644 --- a/software/core/oqm-core-api/installerSrc/oqm-core-api.service +++ b/software/core/oqm-core-api/installerSrc/oqm-core-api.service @@ -48,7 +48,7 @@ ExecStartPre=/bin/bash -c "chmod 600 $USER_CONFIG_FILE" # Pull image as separate task ExecStartPre=/bin/bash -c "/usr/bin/docker pull $IMAGE_NAME:$IMAGE_VERSION || echo 'Could not pull image.'" -# Run Base Station +# Run Core API ExecStart=/bin/bash -c "/usr/bin/docker run --rm --name $CONTAINER_NAME \ --network=oqm-internal \ -v /etc/oqm/certs/trustStores:/etc/oqm/certs/trustStores:ro \ diff --git a/software/core/oqm-core-api/makeInstallers.sh b/software/core/oqm-core-api/makeInstallers.sh index 8d1a046a11..a4196d50af 100755 --- a/software/core/oqm-core-api/makeInstallers.sh +++ b/software/core/oqm-core-api/makeInstallers.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Script to make installers for OQM- Base Station. +# Script to make installers for OQM- Core API. # # Intended to be run from the dir this resides # diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/CoreApiInteractingEntity.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/CoreApiInteractingEntity.java index 3171d9590f..a661d0f1bd 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/CoreApiInteractingEntity.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/CoreApiInteractingEntity.java @@ -23,7 +23,7 @@ public class CoreApiInteractingEntity extends InteractingEntity { /** - * Don't change this. We use this very specific ObjectId to identify the Base Station's specific entry in the db. + * Don't change this. We use this very specific ObjectId to identify the Core API's specific entry in the db. */ public static final ObjectId BS_ID = new ObjectId("00000000AAAAAAAAAAFFFFFF"); diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/ReflectionConfiguration.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/ReflectionConfiguration.java deleted file mode 100644 index 0dcf8acee8..0000000000 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/config/ReflectionConfiguration.java +++ /dev/null @@ -1,37 +0,0 @@ -//package tech.ebp.oqm.core.api.data; -// -//import io.quarkus.runtime.annotations.RegisterForReflection; -//import lombok.AccessLevel; -//import lombok.NoArgsConstructor; -//import tech.ebp.oqm.core.api.model.object.interactingEntity.user.User; -//import tech.ebp.oqm.core.api.model.object.storage.storageBlock.StorageBlock; -//import tech.ebp.oqm.core.api.model.rest.ErrorMessage; -//import tech.ebp.oqm.core.api.service.mongo.search.SearchResult; -// -//import java.time.ZonedDateTime; -// -///** -// * Required to tell GraalVm to keep classes around. -// *
-// * If running in native mode and get errors about classes, reflection, etc, add the erring class here -// *
-// * https://quarkus.io/guides/writing-native-applications-tips#including-resources -// *
-// * TODO:: test in native mode and go through to include all needed classes -// */ -//@RegisterForReflection( -// targets = { // Classes we know about go here -// ErrorMessage.class, -// ZonedDateTime.class, -// User.class, -// StorageBlock.class, -// SearchResult.class, -// }, -// classNames = { //proxy classes go here -// "com.ebp.openQuarterMaster.baseStation.service.mongo.StorageBlockService_ClientProxy" -// } -//) -//@NoArgsConstructor(access = AccessLevel.PRIVATE)//prevent instantiation -//public final class MyReflectionConfiguration { -// -//} diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/filters/InheritenceOpenapiFilter.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/filters/InheritenceOpenapiFilter.java deleted file mode 100644 index c2a172a1ff..0000000000 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/filters/InheritenceOpenapiFilter.java +++ /dev/null @@ -1,10 +0,0 @@ -package tech.ebp.oqm.core.api.filters; - -import org.eclipse.microprofile.openapi.OASFilter; - -//TODO:: figure this out to try to add polymorphic classes to docs: https://quarkus.io/guides/openapi-swaggerui#enhancing-the-openapi-schema-with-filters -//@OpenApiFilter(OpenApiFilter.RunStage.BUILD) -//@OpenApiFilter -//public class InheritenceOpenapiFilter implements OASFilter { -// -//} diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/endpoints/info/Test.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/endpoints/info/Test.java index bc78b806a2..52b0b82b4b 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/endpoints/info/Test.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/endpoints/info/Test.java @@ -27,7 +27,7 @@ public class Test extends EndpointProvider { @GET @Path("illegalArgException") @Operation( - summary = "The currency the base station is set to operate with." + summary = "The currency the core api is set to operate with." ) @APIResponse( responseCode = "200", @@ -42,7 +42,7 @@ public Response illegalArgException() { @GET @Path("illegalStateException") @Operation( - summary = "The currency the base station is set to operate with." + summary = "The currency the core api is set to operate with." ) @APIResponse( responseCode = "200", @@ -64,7 +64,7 @@ public static class TestClass { @POST @Path("validationException") @Operation( - summary = "The currency the base station is set to operate with." + summary = "The currency the core api is set to operate with." ) @APIResponse( responseCode = "200", diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/ui/IndexUi.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/ui/IndexUi.java index 5dd08f85e4..f725542358 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/ui/IndexUi.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/interfaces/ui/IndexUi.java @@ -18,6 +18,9 @@ import java.text.MessageFormat; import java.util.Optional; +/** + * A Simple splash page to show, and direct to swagger. + */ @SuppressWarnings("LombokGetterMayBeUsed") @Blocking @Slf4j diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/model/jackson/ColorModule.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/model/jackson/ColorModule.java index 323e557d79..e4890fc28a 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/model/jackson/ColorModule.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/model/jackson/ColorModule.java @@ -11,10 +11,19 @@ import java.io.IOException; /** - * Jackson module to handle the Mongodb ObjectId in a reasonable manner (as its hex string) + * Jackson module for serializing and deserializing {@link Color} objects. + *
+ * Colors are serialized as hex strings (e.g., "#FF5733") and deserialized from
+ * that same hex string format
*/
public class ColorModule extends TestableModule
+ * Runs periodically to scan all databases for items that have expired or are approaching
+ * their expiry dates. For each database, it triggers expiry/warning event processing
+ * via {@link ItemStatsService#scanForExpired(String)}.
+ *
+ * Configuration: The execution schedule is controlled by the {@code service.item.expiryCheck.cron}
+ * property. Concurrent executions are skipped if one is already running.
+ *
+ * Iterates through all registered databases and calls the item stats service
+ * to scan for expired items and generate appropriate events.
+ *
+ * Creates unique temporary files and directories with timestamp-based naming to prevent conflicts.
+ * Files are automatically scheduled for deletion on JVM exit via {@link File#deleteOnExit()}.
+ * Supports optional subdirectory organization via the {@code tempFolder} parameter.
+ *
+ * Main usages:
+ *
+ *
+ *
+ * Configuration: The base temporary directory is configured via the {@code service.tempDir} property. + *
+ */ @Slf4j @ApplicationScoped public class TempFileService { @@ -26,6 +45,14 @@ public class TempFileService { private static final DateTimeFormatter FILENAME_TIMESTAMP_FORMAT = DateTimeFormatter.ofPattern("MM-dd-yyyy_kk-mm"); private static final Random RANDOM = new SecureRandom(); + /** + * Validates that a directory exists, is actually a directory, and is writable. + * Creates the directory if it doesn't exist. + * + * @param dir the path to validate + * @throws InvalidConfigException if the directory doesn't exist and cannot be created, + * is not a directory, or is not writable + */ public static void checkDir(Path dir){ if (!Files.exists(dir)) { try{ @@ -72,6 +99,14 @@ private Path getDir(String tempFolder){ return directory; } + /** + * Gets a temporary file with the specified filename in the given folder. + * The file is scheduled for deletion on JVM exit. + * + * @param filename the filename to use + * @param tempFolder optional subdirectory within the temp directory (can be null/empty) + * @return a File object pointing to the temp file + */ public File getTempFile(String filename, String tempFolder){ Path directory = this.getDir(tempFolder); @@ -84,6 +119,17 @@ public File getTempFile(String filename, String tempFolder){ } + /** + * Gets a uniquely named temporary file with the given prefix and extension. + * The filename format is: {@code prefix_MM-dd-yyyy_kk-mm_rrr.extension} + * where rrr is a random 3-digit number. + * The file is scheduled for deletion on JVM exit. + * + * @param prefix the filename prefix + * @param extension the file extension (without dot) + * @param tempFolder optional subdirectory within the temp directory (can be null/empty) + * @return a File object pointing to the temp file + */ public File getTempFile(String prefix, String extension, String tempFolder) { return this.getTempFile( String.format( @@ -98,6 +144,16 @@ public File getTempFile(String prefix, String extension, String tempFolder) { } + /** + * Creates a uniquely named temporary directory with the given prefix. + * The directory name format is: {@code prefix_MM-dd-yyyy_kk-mm_rrr} + * where rrr is a random 3-digit number. + * The directory is scheduled for deletion on JVM exit. + * + * @param prefix the directory name prefix + * @param tempFolder optional subdirectory within the temp directory (can be null/empty) + * @return a File object pointing to the temp directory + */ public File getTempDir(String prefix, String tempFolder) { Path directory = this.getDir(tempFolder); diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierBarcodeService.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierBarcodeService.java index 55ba26e088..b0dcfc3f13 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierBarcodeService.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierBarcodeService.java @@ -30,10 +30,16 @@ import java.io.IOException; /** - * Service to generate barcode images. - * - * TODO:: move to own service? - * TODO:: add better labels to images https://github.com/jfree/jfreesvg + * Service for generating barcode images as SVG data. + *+ * Supports multiple barcode formats including UPC-A, UPC-E, EAN-8, EAN-13, ISBN-10, + * ISBN-13, GTIN-14, and generic codes. Barcodes are rendered as SVG strings suitable + * for embedding in HTML or saving as image files. + *
+ *+ * Each barcode can include an optional label for human-readable identification. + * When no custom label is provided, the identifier type name is used automatically. + *
*/ @Slf4j @ApplicationScoped @@ -67,6 +73,17 @@ private static String toImageData(Symbol code){ return os.toString(); } + /** + * Renders a barcode symbol to SVG format with optional label. + *+ * If a label is provided, it is added below the barcode with appropriate + * formatting including underline styling. + *
+ * + * @param code the barcode symbol to render + * @param label optional label text to display below the barcode + * @return SVG string representation of the barcode + */ public static String processBarcodeData(Symbol code, String label){ String output = toImageData(code); @@ -144,6 +161,14 @@ public static String processBarcodeData(Symbol code, String label){ return output; } + /** + * Generates a barcode SVG for the specified identifier type and data. + * + * @param type the barcode type/format to generate + * @param data the identifier data to encode + * @param label optional label text to display below the barcode + * @return SVG string representation of the barcode + */ public String getBarcodeData(IdentifierType type, String data, String label){ String dataIn = data; int hQuietZone = 10; @@ -226,6 +251,13 @@ public String getBarcodeData(IdentifierType type, String data, String label){ ); } + /** + * Generates a barcode SVG for the given identifier object. + * Uses the identifier's type, value, and label properties. + * + * @param identifier the identifier to generate a barcode for + * @return SVG string representation of the barcode + */ public String getBarcodeData(Identifier identifier){ return this.getBarcodeData(identifier.getType(), identifier.getValue(), identifier.getLabel()); } diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierUtils.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierUtils.java index 86c9e037d8..27e94e197e 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierUtils.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/identifiers/IdentifierUtils.java @@ -16,13 +16,28 @@ import tech.ebp.oqm.core.api.service.identifiers.upc.ISBNCodeUtilities; import tech.ebp.oqm.core.api.service.identifiers.upc.UpcCodeUtilities; - /** - * - * https://www.computalabel.com/m/UPCexamplesM.htm + * Utility class for working with product and item identifiers. + *+ * Provides methods for detecting identifier types, validating codes, and creating + * identifier objects from raw code strings. Supports standard identifier formats + * including UPC-A, UPC-E, EAN-8, EAN-13, ISBN-10, ISBN-13, GTIN-14, and generic identifiers. + *
*/ public class IdentifierUtils { + /** + * Determines the type of identifier from the given code and returns the appropriate + * Identifier implementation. + *+ * Checks the code against all supported identifier formats in order: UPC-A, UPC-E, + * ISBN-13, ISBN-10, EAN-13, EAN-8, GTIN-14, and finally GenericIdentifier. + *
+ * + * @param code the identifier code string + * @return the appropriate Identifier subtype + * @throws IllegalArgumentException if the code doesn't match any supported identifier format + */ public static Identifier determineGeneralIdType(String code) { if(UpcCodeUtilities.isValidUPCACode(code)){ return UPC_A.builder().value(code).build(); @@ -52,6 +67,14 @@ public static Identifier determineGeneralIdType(String code) { throw new IllegalArgumentException("Code given does not fit into any category of id."); } + /** + * Validates that the given code is valid for the specified identifier type. + * + * @param type the identifier type to validate against + * @param code the code string to validate + * @return true if the code is valid for the given type, false otherwise + * @throws IllegalArgumentException if the identifier type is unknown + */ public static boolean isValidCode(IdentifierType type, String code) { switch (type){ case UPC_A -> { @@ -82,6 +105,15 @@ public static boolean isValidCode(IdentifierType type, String code) { throw new IllegalArgumentException("Unknown id type: " + type); } + /** + * Creates an Identifier object of the specified type from the given code string. + * Validates the code before creating the identifier and throws an exception if invalid. + * + * @param type the identifier type to create + * @param code the code string to use + * @return the created Identifier object + * @throws IllegalArgumentException if the identifier type is unknown or the code is invalid + */ public static Identifier objFromParts(IdentifierType type, String code) { switch (type){ case UPC_A -> { @@ -136,6 +168,12 @@ public static Identifier objFromParts(IdentifierType type, String code) { throw new IllegalArgumentException("Unknown id type: " + type); } + /** + * Validates that a generic identifier is not blank. + * + * @param id the identifier to validate + * @return true if the identifier is not blank, false otherwise + */ public static boolean isValidGenericId(@NonNull String id) { return !id.isBlank(); } diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/importExport/exporting/DatabaseExportService.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/importExport/exporting/DatabaseExportService.java index de886cf8f4..50f0daf304 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/importExport/exporting/DatabaseExportService.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/importExport/exporting/DatabaseExportService.java @@ -56,7 +56,7 @@ public class DatabaseExportService { public static final String OQM_EXPORT_PREFIX = "oqm_export"; public static final String OQM_EXPORT_FILE_EXT = ".oqmdb"; public static final String TEMP_FOLDER = "export"; - public static final String GZIP_COMMENT = "Created by Open QuarterMaster Base Station. Full data export, intended to be re-imported by the Base Station software."; + public static final String GZIP_COMMENT = "Created by Open QuarterMaster Core API. Full data export, intended to be re-imported by the Core API software."; public static final int GZIP_COMPRESSION_LEVEL = Deflater.BEST_COMPRESSION; private static final DateFormat fileRevisionTimestampFormat = new SimpleDateFormat("MM-dd-yyyy_hh-mm-ss-SSS"); diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/mongo/InteractingEntityService.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/mongo/InteractingEntityService.java index 2180ad61a9..b340d0305d 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/mongo/InteractingEntityService.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/mongo/InteractingEntityService.java @@ -17,6 +17,7 @@ import tech.ebp.oqm.core.api.model.object.history.ObjectHistoryEvent; import tech.ebp.oqm.core.api.model.object.interactingEntity.InteractingEntity; import tech.ebp.oqm.core.api.model.rest.search.InteractingEntitySearch; +import tech.ebp.oqm.core.api.service.serviceState.InstanceMutexService; import java.util.Optional; import java.util.concurrent.locks.ReentrantLock; @@ -56,7 +57,7 @@ public void setup() { } //force getting around Arc subclassing out the injected class CoreApiInteractingEntity coreApiInteractingEntity = new CoreApiInteractingEntity(); - //ensure we have the base station in the db + //ensure we have the Core API entity in the db CoreApiInteractingEntity gotten = (CoreApiInteractingEntity) this.get(coreApiInteractingEntity.getId()); if (gotten == null) { this.add(coreApiInteractingEntity); diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/HistoryEventNotificationService.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/HistoryEventNotificationService.java index 841c704a53..7ffd973acd 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/HistoryEventNotificationService.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/HistoryEventNotificationService.java @@ -14,6 +14,7 @@ import org.eclipse.microprofile.reactive.messaging.Incoming; import org.eclipse.microprofile.reactive.messaging.Message; import org.eclipse.microprofile.reactive.messaging.OnOverflow; +import tech.ebp.oqm.core.api.model.messaging.EventNotificationWrapper; import tech.ebp.oqm.core.api.model.object.history.ObjectHistoryEvent; import java.util.Arrays; diff --git a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/OutgoingNotificationService.java b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/OutgoingNotificationService.java index 68d42f4164..67666d68ed 100644 --- a/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/OutgoingNotificationService.java +++ b/software/core/oqm-core-api/src/main/java/tech/ebp/oqm/core/api/service/notification/OutgoingNotificationService.java @@ -3,39 +3,20 @@ import io.smallrye.reactive.messaging.annotations.Broadcast; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; -import org.bson.types.ObjectId; import org.eclipse.microprofile.reactive.messaging.Channel; import org.eclipse.microprofile.reactive.messaging.Emitter; import org.eclipse.microprofile.reactive.messaging.Message; import org.eclipse.microprofile.reactive.messaging.OnOverflow; -import tech.ebp.oqm.core.api.model.object.history.ObjectHistoryEvent; +import tech.ebp.oqm.core.api.model.messaging.EventNotificationWrapper; /** - * Don't - * use - * this - * anywhere - * except - * in - * {@link - * HistoryEventNotificationService} + * Don't use this anywhere except in {@link HistoryEventNotificationService} *
- * Exists
- * to
- * skirt
- * around
- * CDI
- * issues
- * related
- * to
- * enabledness
- * of
- * the
- * emitter.
+ * Exists to skirt around CDI issues related to enabledness of the emitter.
*/
@ApplicationScoped
public class OutgoingNotificationService {
-
+
@Inject
@Broadcast
@Channel(HistoryEventNotificationService.OUTGOING_EVENT_CHANNEL)
@@ -43,6 +24,10 @@ public class OutgoingNotificationService {
Emitter