* Introduce soft deleted list option for soft deletable entities Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * fix verify build Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * fix typo in license Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Add sorting option on deleted field Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * add missing import in tests Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Rename SoftDeletedFilter to SoftDeletedMode and its values Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Introduce MgmtSoftDeletedMode on api layer Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * remove unused imports Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Integrate the enum on API layer Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Fix OpenApi spec Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * address some comments Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Get rid of count(SoftDeletedMode) at all Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * remove formatter for enum - stop supporting lowercase values in API Signed-off-by: strailov <Stanislav.Trailov@bosch.io> --------- Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
hawkBit repository API
API for repository access. Contains:
- Entity Model
- Management service API
Method naming concept (example target management)
// Count all targets
Long count()
// Count by filter parameter (example)
Long countByTargetFilterQuery(@NotEmpty String targetFilterQuery);
//Create entity
List<Target> create(@NotEmpty Collection<TargetCreate> create)
Target create(@NotNull TargetCreate create)
//Delete entities (throws EntityNotFoundException if one element does not exist (at least one not found in collection case))
void delete(@NotEmpty Collection<Long> targetIDs);
void delete(@NotNull Long targetID);
void deleteByControllerId(@NotEmpty String controllerId);
void deleteByControllerId(@NotEmpty Collection<String> controllerId);
//Update Target (throws EntityNotFoundException if one element does not exist (at least one not found in collection case))
List<Target> update(@NotEmpty Collection<TargetUpdate> update);
Target update(@NotNull TargetUpdate update);
//Exist
boolean exists(@NotNull Long targetId)
boolean existsByAssignedDistributionSet(@NotNull Long distributionSetID);
// Read methods
// Find one on technical ID (Optional, no EntityNotFoundException)
Optional<Target> get(@NotNull Long targetId);
List<Target> get(@NotEmpty Collection<Long> targetId);
// Find one on non-ID but unique constraint (Optional, no EntityNotFoundException)
Optional<Target> getByControllerID(@NotEmpty String controllerId);
List<Target> getByControllerID(@NotEmpty Collection<String> controllerId);
// Find one on non-ID but and non unique constraint (Optional, no EntityNotFoundException)
Optional<Target> findFirstByDescription(@NotEmpty String description);
// Query/search repository (page might be empty, no EntityNotFoundException) (note: pageReq always first in signature)
Page<Target> findByAssignedDistributionSet(@NotNull Long distributionSetID, @NotNull Pageable pageable);