Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge_master

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
Ammar Bikic
2021-01-15 16:44:31 +01:00
45 changed files with 709 additions and 167 deletions

View File

@@ -125,6 +125,20 @@ public interface TargetManagement {
+ SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
long countByInstalledDistributionSet(long distId);
/**
* Checks if there is already a {@link Target} that has the given distribution set Id assigned or installed.
*
* @param distId
* to search for
* @return <code>true</code> if a {@link Target} exists.
*
* @throws EntityNotFoundException
* if distribution set with given ID does not exist
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET + SpringEvalExpressions.HAS_AUTH_OR
+ SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
boolean existsByInstalledOrAssignedDistributionSet(long distId);
/**
* Count {@link TargetFilterQuery}s for given target filter query.
*