From 1881880cd95877013ff464448cf8744acd1b6947 Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Wed, 1 Jun 2016 09:21:51 +0200 Subject: [PATCH] Added findactions method. Signed-off-by: Kai Zimmermann --- .../hawkbit/repository/DeploymentManagement.java | 10 ++++++++++ .../repository/jpa/JpaDeploymentManagement.java | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java index 1c2c71f8e..9dc5f74c8 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java @@ -286,6 +286,16 @@ public interface DeploymentManagement { @PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET) Slice findActionsByTarget(@NotNull Pageable pageable, @NotNull Target target); + /** + * Retrieves all {@link Action}s from repository. + * + * @param pageable + * pagination parameter + * @return a paged list of {@link Action}s + */ + @PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET) + Slice findActionsAll(@NotNull Pageable pageable); + /** * Retrieves all {@link Action} which assigned to a specific * {@link DistributionSet}. diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDeploymentManagement.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDeploymentManagement.java index 6f3a876b8..4739f16a7 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDeploymentManagement.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDeploymentManagement.java @@ -706,4 +706,9 @@ public class JpaDeploymentManagement implements DeploymentManagement { public Slice findActionsByDistributionSet(final Pageable pageable, final DistributionSet ds) { return actionRepository.findByDistributionSet(pageable, (JpaDistributionSet) ds); } + + @Override + public Slice findActionsAll(final Pageable pageable) { + return convertAcPage(actionRepository.findAll(pageable), pageable); + } }