Remove unnecessary DB calls from UI

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
kaizimmerm
2016-11-23 22:34:37 +01:00
parent 54ba35966e
commit a951137d4f
13 changed files with 28 additions and 70 deletions

View File

@@ -63,7 +63,8 @@ public interface TargetManagement {
*
* @return number of found {@link Target}s.
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET + SpringEvalExpressions.HAS_AUTH_OR
+ SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
Long countTargetByAssignedDistributionSet(@NotNull Long distId);
/**
@@ -104,7 +105,8 @@ public interface TargetManagement {
* to search for
* @return number of found {@link Target}s.
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET + SpringEvalExpressions.HAS_AUTH_OR
+ SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
Long countTargetByInstalledDistributionSet(@NotNull Long distId);
/**

View File

@@ -11,8 +11,6 @@ package org.eclipse.hawkbit.repository.model;
import java.util.List;
import java.util.Set;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
/**
* A {@link DistributionSet} defines a meta package that combines a set of
* {@link SoftwareModule}s which have to be or are provisioned to a
@@ -36,12 +34,6 @@ public interface DistributionSet extends NamedVersionedEntity {
*/
boolean isDeleted();
/**
* @return immutable {@link List} of {@link DistributionSetMetadata}
* elements. See {@link DistributionSetManagement} to alter.
*/
List<DistributionSetMetadata> getMetadata();
/**
* @return <code>true</code> if {@link DistributionSet} contains a mandatory
* migration step, i.e. unfinished {@link Action}s will kept active
@@ -49,21 +41,11 @@ public interface DistributionSet extends NamedVersionedEntity {
*/
boolean isRequiredMigrationStep();
/**
* @return the assignedTargets
*/
List<Target> getAssignedTargets();
/**
* @return the auto assign target filters
*/
List<TargetFilterQuery> getAutoAssignFilters();
/**
* @return the installedTargets
*/
List<TargetInfo> getInstalledTargets();
/**
*
* @return unmodifiableSet of {@link SoftwareModule}.