private static FeatureDefinitionNotAccessibleException commandToFeatureDefinitionException( final ThingCommand command) { return FeatureDefinitionNotAccessibleException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeatureDefinitionNotAccessibleException commandToFeatureDefinitionException( final ThingCommand command) { return FeatureDefinitionNotAccessibleException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeatureNotAccessibleException commandToFeatureException(final ThingCommand command) { return FeatureNotAccessibleException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeaturePropertiesNotAccessibleException commandToFeaturePropertiesException( final ThingCommand command) { return FeaturePropertiesNotAccessibleException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeatureNotAccessibleException commandToFeatureException(final ThingCommand command) { return FeatureNotAccessibleException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeaturePropertiesNotAccessibleException commandToFeaturePropertiesException( final ThingCommand command) { return FeaturePropertiesNotAccessibleException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeaturePropertyNotAccessibleException commandToFeaturePropertyException(final ThingCommand command) { return FeaturePropertyNotAccessibleException.newBuilder(command.getId(), ((WithFeatureId) command).getFeatureId(), command.getResourcePath()) .dittoHeaders(command.getDittoHeaders()) .build(); }
private static FeaturePropertyNotAccessibleException commandToFeaturePropertyException(final ThingCommand command) { return FeaturePropertyNotAccessibleException.newBuilder(command.getId(), ((WithFeatureId) command).getFeatureId(), command.getResourcePath()) .dittoHeaders(command.getDittoHeaders()) .build(); }
mappingStrategies.put(ModifyFeature.TYPE, command -> FeatureNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(DeleteFeature.TYPE, command -> FeatureNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(ModifyFeatureDefinition.TYPE, command -> FeatureDefinitionNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(ModifyFeatureProperties.TYPE, command -> FeaturePropertiesNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(ModifyFeatureProperty.TYPE, command -> FeaturePropertyNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId(), command.getResourcePath()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(DeleteFeatureDefinition.TYPE, command -> FeatureDefinitionNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId())
mappingStrategies.put(ModifyFeature.TYPE, command -> FeatureNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(DeleteFeature.TYPE, command -> FeatureNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(ModifyFeatureDefinition.TYPE, command -> FeatureDefinitionNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(ModifyFeatureProperties.TYPE, command -> FeaturePropertiesNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(ModifyFeatureProperty.TYPE, command -> FeaturePropertyNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId(), command.getResourcePath()) .dittoHeaders(command.getDittoHeaders()) .build()); mappingStrategies.put(DeleteFeatureDefinition.TYPE, command -> FeatureDefinitionNotModifiableException.newBuilder(command.getThingId(), ((WithFeatureId) command).getFeatureId())