Class IdOrderService
java.lang.Object
com.persequor.saga.modules.id.service.IdOrderService
-
Constructor Summary
ConstructorsConstructorDescriptionIdOrderService
(DownloadedIdRepository repository, IdModuleRequestRepository idModuleRequestRepository, IIdOrderRepository idOrderRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkOrderIntegrity
(IdRequest request) findExistingIdsInNamespace
(Collection<String> ids, String namespace) Returns the ids that are both in the provided collection and in namespace.long
getNumberOfIdsInNamespace
(String namespace) getOrderByDownloadedId
(String productId) getOrderByPairedId
(String id, IPairedType pairedType) getOrderRequestFromIds
(UUID sagaOrderId, String userOrderId) getSpecificIds
(UUID sagaOrderId, Integer limit, Integer offset, Boolean sorted) void
storeIds
(Collection<String> ids, UUID sagaOrderId, ExtraParams extraParams) Stores the ids for the given request.
-
Constructor Details
-
IdOrderService
@Inject public IdOrderService(DownloadedIdRepository repository, IdModuleRequestRepository idModuleRequestRepository, IIdOrderRepository idOrderRepository)
-
-
Method Details
-
getSpecificIds
-
getOrderRequestFromIds
-
getNumberOfIdsInNamespace
- Parameters:
namespace
- the order namespace- Returns:
- the total number of ids associated with this namespace.
-
findExistingIdsInNamespace
Returns the ids that are both in the provided collection and in namespace.- Parameters:
ids
- the ids to be checked whether or not already existnamespace
- the namespace the ids are checked against- Returns:
- This collection will always be a subset of the input collection.
-
storeIds
Stores the ids for the given request.- Throws:
IllegalArgumentException
- in case there is a namespace associated with the given order and there is one or more ids that already exist in the namespace.
-
getOrderByDownloadedId
-
getOrderByPairedId
-
checkOrderIntegrity
- Throws:
IdOrderIntegrityException
-