Package org.openwms.common.location.impl
Class LocationRemovalManagerImpl
java.lang.Object
org.openwms.common.location.impl.LocationRemovalManagerImpl
- All Implemented Interfaces:
LocationRemovalManager
A LocationRemovalManagerImpl.
- 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 RegistrationServiceprivate final LocationRepositoryprivate final org.ameba.i18n.Translator -
Constructor Summary
ConstructorsConstructorDescriptionLocationRemovalManagerImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.ameba.i18n.Translator translator, org.springframework.web.client.RestTemplate aLoadBalanced, LocationRepository repository, RegistrationService registrationService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowedToDelete(@NotNull Collection<String> pKeys) Checks if theLocations with the givenpKeys are allowed to be deleted.private voidaskForRemoval(ReplicaRegistry srv, Collection<String> pKeys) voiddeleteAll(@NotNull Collection<Location> locations) DeleteLocations.private voiddeleteInternal(Location location) private voiddeleteLocation(Location location) voidmarkForDeletion(@NotNull Collection<String> pKeys) MarkLocations for upcoming deletion.private voidremoveLocation(ReplicaRegistry srv, Collection<String> pKeys) voidTry to delete aLocation.private voidverifyNoTransportUnitsOn(Collection<String> pKeys) private voidverifyNoTransportUnitsOn(Location location)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher -
translator
private final org.ameba.i18n.Translator translator -
aLoadBalanced
private final org.springframework.web.client.RestTemplate aLoadBalanced -
repository
-
registrationService
-
-
Constructor Details
-
LocationRemovalManagerImpl
LocationRemovalManagerImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.ameba.i18n.Translator translator, org.springframework.web.client.RestTemplate aLoadBalanced, LocationRepository repository, RegistrationService registrationService)
-
-
Method Details
-
tryDelete
Try to delete aLocation.- Specified by:
tryDeletein interfaceLocationRemovalManager- Parameters:
pKey- The persistent key of the Location to be deleted.
-
deleteAll
DeleteLocations.- Specified by:
deleteAllin interfaceLocationRemovalManager- Parameters:
locations- The Locations to be deleted.
-
deleteInternal
-
verifyNoTransportUnitsOn
-
verifyNoTransportUnitsOn
-
deleteLocation
-
allowedToDelete
Checks if theLocations with the givenpKeys are allowed to be deleted. At first the implementation checks if anyTransportUnitis booked onto one of theLocations and as second all parties of interest are asked if deletion in the current moment is okay for them, too.- Specified by:
allowedToDeletein interfaceLocationRemovalManager- Parameters:
pKeys- The persistent keys of the Locations to be checked.- Returns:
- true if the Locations are allowed to be deleted, otherwise false.
-
markForDeletion
- Specified by:
markForDeletionin interfaceLocationRemovalManager- Parameters:
pKeys- The persistent keys of the Locations to be marked for deletion.
-
askForRemoval
-
removeLocation
-