Class RegistrationServiceImpl
java.lang.Object
org.openwms.wms.registration.impl.RegistrationServiceImpl
- All Implemented Interfaces:
RegistrationService
A RegistrationServiceImpl.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.web.client.RestTemplateprivate final org.springframework.context.ApplicationEventPublisherprivate static final org.slf4j.Loggerprivate final ReplicaRegistryRepository -
Constructor Summary
ConstructorsConstructorDescriptionRegistrationServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.springframework.web.client.RestTemplate aLoadBalanced, ReplicaRegistryRepository repository) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaskForRemoval(ReplicaRegistry srv, Collection<String> pKeys) booleanregistrarsExist(@NotNull EntityType entityName) Checks if there are any registrars for the givenentityType.voidremove(@NotNull EntityType entityName, @NotBlank String pKey) Removes an entity of the specifiedentityTypeand the given primary key.private voidremove(ReplicaRegistry srv, Collection<String> pKeys)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher -
aLoadBalanced
private final org.springframework.web.client.RestTemplate aLoadBalanced -
repository
-
-
Constructor Details
-
RegistrationServiceImpl
RegistrationServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.springframework.web.client.RestTemplate aLoadBalanced, ReplicaRegistryRepository repository)
-
-
Method Details
-
registrarsExist
Checks if there are any registrars for the givenentityType.- Specified by:
registrarsExistin interfaceRegistrationService- Parameters:
entityName- The entity type to check.- Returns:
trueif registrars exist for the given entity type,falseotherwise.
-
remove
@Measured public void remove(@NotNull @NotNull EntityType entityName, @NotBlank @NotBlank String pKey) Removes an entity of the specifiedentityTypeand the given primary key.- Specified by:
removein interfaceRegistrationService- Parameters:
entityName- The type of the entity to remove.pKey- The primary key of the entity to remove.
-
askForRemoval
-
remove
-