}
protected abstract String getObjectTypeString();
public void decomission(String objectId, Optional<String> user) {
DecomissionResult result = manager.decomission(objectId, user);
if (result == DecomissionResult.FAILURE_NOT_FOUND || result == DecomissionResult.FAILURE_DEAD) {
throw new NotFoundException(String.format("Couldn't find an active %s with id %s (result: %s)", getObjectTypeString(), objectId, result.name()));
} else if (result == DecomissionResult.FAILURE_ALREADY_DECOMISSIONING) {
throw new ConflictException(String.format("%s %s is already in decomissioning state", getObjectTypeString(), objectId));
}
}