Class PermissionRequestCreationAndValidationService
java.lang.Object
energy.eddie.regionconnector.at.eda.services.PermissionRequestCreationAndValidationService
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionRequestCreationAndValidationService(Outbox outbox, DataNeedCalculationService<DataNeed> dataNeedCalculationService, ValidatedEventFactory validatedEventFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateAndValidatePermissionRequest(PermissionRequestForCreation permissionRequest) Creates and validates a permission request.
-
Constructor Details
-
Method Details
-
createAndValidatePermissionRequest
public CreatedPermissionRequest createAndValidatePermissionRequest(PermissionRequestForCreation permissionRequest) throws DataNeedNotFoundException, UnsupportedDataNeedException Creates and validates a permission request. This will emit aCreatedEvent, and aValidatedEventor aMalformedEvent.- Parameters:
permissionRequest- the DTO that is the base for the created and validated permission request.- Returns:
- a DTO with the id of the created and validated permission request
- Throws:
DataNeedNotFoundExceptionUnsupportedDataNeedException
-