Refactor management api style (#2445)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -114,13 +114,13 @@ public interface ArtifactManagement {
|
||||
/**
|
||||
* Get local artifact for a base software module.
|
||||
*
|
||||
* @param pageReq Pageable parameter
|
||||
* @param softwareModuleId software module id
|
||||
* @param pageable Pageable parameter
|
||||
* @return Page<Artifact>
|
||||
* @throws EntityNotFoundException if software module with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
Page<Artifact> findBySoftwareModule(@NotNull Pageable pageReq, long softwareModuleId);
|
||||
Page<Artifact> findBySoftwareModule(long softwareModuleId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Count local artifacts for a base software module.
|
||||
|
||||
@@ -138,13 +138,13 @@ public interface ControllerManagement {
|
||||
/**
|
||||
* Retrieves all the {@link ActionStatus} entries of the given {@link Action}.
|
||||
*
|
||||
* @param pageReq pagination parameter
|
||||
* @param actionId to be filtered on
|
||||
* @param pageable pagination parameter
|
||||
* @return the corresponding {@link Page} of {@link ActionStatus}
|
||||
* @throws EntityNotFoundException if action with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.IS_CONTROLLER)
|
||||
Page<ActionStatus> findActionStatusByAction(@NotNull Pageable pageReq, long actionId);
|
||||
Page<ActionStatus> findActionStatusByAction(long actionId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Register new target in the repository (plug-and-play) and in case it already exists updates {@link Target#getAddress()} and
|
||||
|
||||
@@ -46,14 +46,12 @@ import org.springframework.data.domain.Slice;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
/**
|
||||
* A DeploymentManagement service provides operations for the deployment of
|
||||
* {@link DistributionSet}s to {@link Target}s.
|
||||
* A DeploymentManagement service provides operations for the deployment of {@link DistributionSet}s to {@link Target}s.
|
||||
*/
|
||||
public interface DeploymentManagement {
|
||||
|
||||
/**
|
||||
* build a {@link DeploymentRequest} for a target distribution set
|
||||
* assignment
|
||||
* build a {@link DeploymentRequest} for a target distribution set assignment
|
||||
*
|
||||
* @param controllerId ID of target
|
||||
* @param distributionSetId ID of distribution set
|
||||
@@ -64,26 +62,23 @@ public interface DeploymentManagement {
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns {@link DistributionSet}s to {@link Target}s according to the
|
||||
* {@link DeploymentRequest}.
|
||||
* Assigns {@link DistributionSet}s to {@link Target}s according to the {@link DeploymentRequest}.
|
||||
*
|
||||
* @param deploymentRequests information about all target-ds-assignments that shall be made
|
||||
* @return the list of assignment results
|
||||
* @throws IncompleteDistributionSetException if mandatory {@link SoftwareModuleType} are not assigned as
|
||||
* defined by the {@link DistributionSetType}.
|
||||
* @throws EntityNotFoundException if either provided {@link DistributionSet} or {@link Target}s
|
||||
* do not exist
|
||||
* @throws EntityNotFoundException if either provided {@link DistributionSet} or {@link Target}s do not exist
|
||||
* @throws AssignmentQuotaExceededException if the maximum number of targets the distribution set can be
|
||||
* assigned to at once is exceeded
|
||||
* @throws MultiAssignmentIsNotEnabledException if the request results in multiple assignments to the same
|
||||
* target and multiassignment is disabled
|
||||
* target and multi-assignment is disabled
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(@Valid @NotEmpty List<DeploymentRequest> deploymentRequests);
|
||||
|
||||
/**
|
||||
* Assigns {@link DistributionSet}s to {@link Target}s according to the
|
||||
* {@link DeploymentRequest}.
|
||||
* Assigns {@link DistributionSet}s to {@link Target}s according to the {@link DeploymentRequest}.
|
||||
*
|
||||
* @param initiatedBy the username of the user who initiated the assignment
|
||||
* @param deploymentRequests information about all target-ds-assignments that shall be made
|
||||
@@ -91,21 +86,18 @@ public interface DeploymentManagement {
|
||||
* @return the list of assignment results
|
||||
* @throws IncompleteDistributionSetException if mandatory {@link SoftwareModuleType} are not assigned as
|
||||
* defined by the {@link DistributionSetType}.
|
||||
* @throws EntityNotFoundException if either provided {@link DistributionSet} or {@link Target}s
|
||||
* do not exist
|
||||
* @throws EntityNotFoundException if either provided {@link DistributionSet} or {@link Target}s do not exist
|
||||
* @throws AssignmentQuotaExceededException if the maximum number of targets the distribution set can be
|
||||
* assigned to at once is exceeded
|
||||
* @throws MultiAssignmentIsNotEnabledException if the request results in multiple assignments to the same
|
||||
* target and multiassignment is disabled
|
||||
* target and multi-assignment is disabled
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(String initiatedBy,
|
||||
@Valid @NotEmpty List<DeploymentRequest> deploymentRequests, String actionMessage);
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(
|
||||
String initiatedBy, @Valid @NotEmpty List<DeploymentRequest> deploymentRequests, String actionMessage);
|
||||
|
||||
/**
|
||||
* Registers "offline" assignments. "offline" assignment means adding a
|
||||
* completed action for a {@link DistributionSet} to a {@link Target}.
|
||||
*
|
||||
* Registers "offline" assignments. "offline" assignment means adding a completed action for a {@link DistributionSet} to a {@link Target}.
|
||||
* The handling differs to hawkBit-managed updates by means that:<br/>
|
||||
*
|
||||
* <ol type="A">
|
||||
@@ -117,17 +109,14 @@ public interface DeploymentManagement {
|
||||
* <li>does not send a {@link TargetAssignDistributionSetEvent}.</li>
|
||||
* </ol>
|
||||
*
|
||||
* @param assignments target IDs with the respective distribution set ID which they
|
||||
* are supposed to be assigned to
|
||||
* @param assignments target IDs with the respective distribution set ID which they are supposed to be assigned to
|
||||
* @return the assignment results
|
||||
* @throws IncompleteDistributionSetException if mandatory {@link SoftwareModuleType} are not assigned as
|
||||
* defined by the {@link DistributionSetType}.
|
||||
* @throws EntityNotFoundException if either provided {@link DistributionSet} or {@link Target}s
|
||||
* do not exist
|
||||
* @throws AssignmentQuotaExceededException if the maximum number of targets the distribution set can be
|
||||
* assigned to at once is exceeded
|
||||
* @throws EntityNotFoundException if either provided {@link DistributionSet} or {@link Target}s do not exist
|
||||
* @throws AssignmentQuotaExceededException if the maximum number of targets the distribution set can be assigned to at once is exceeded
|
||||
* @throws MultiAssignmentIsNotEnabledException if the request results in multiple assignments to the same
|
||||
* target and multiassignment is disabled
|
||||
* target and multi-assignment is disabled
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||
List<DistributionSetAssignmentResult> offlineAssignedDistributionSets(Collection<Entry<String, Long>> assignments, String initiatedBy);
|
||||
@@ -136,14 +125,12 @@ public interface DeploymentManagement {
|
||||
List<DistributionSetAssignmentResult> offlineAssignedDistributionSets(Collection<Entry<String, Long>> assignments);
|
||||
|
||||
/**
|
||||
* Cancels the {@link Action} with the given ID. The method will immediately
|
||||
* add a {@link Status#CANCELED} status to the action. However, it might be
|
||||
* possible that the controller will continue to work on the cancellation.
|
||||
* Cancels the {@link Action} with the given ID. The method will immediately add a {@link Status#CANCELED} status to the action.
|
||||
* However, it might be possible that the controller will continue to work on the cancellation.
|
||||
*
|
||||
* @param actionId to be canceled
|
||||
* @return canceled {@link Action}
|
||||
* @throws CancelActionNotAllowedException in case the given action is not active or is already a cancel
|
||||
* action
|
||||
* @throws CancelActionNotAllowedException in case the given action is not active or is already a cancel action
|
||||
* @throws EntityNotFoundException if action with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||
@@ -152,7 +139,7 @@ public interface DeploymentManagement {
|
||||
/**
|
||||
* Counts all actions associated to a specific target.
|
||||
*
|
||||
* @param rsqlParam rsql query string
|
||||
* @param rsql rsql query string
|
||||
* @param controllerId the target associated to the actions to count
|
||||
* @return the count value of found actions associated to the target
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
@@ -161,11 +148,10 @@ public interface DeploymentManagement {
|
||||
* @throws EntityNotFoundException if target with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countActionsByTarget(@NotNull String rsqlParam, @NotEmpty String controllerId);
|
||||
long countActionsByTarget(@NotNull String rsql, @NotEmpty String controllerId);
|
||||
|
||||
/**
|
||||
* Returns total count of all actions
|
||||
* <p/>
|
||||
* Returns total count of all actions<p/>
|
||||
* No access control applied.
|
||||
*
|
||||
* @return the total amount of stored actions
|
||||
@@ -174,15 +160,14 @@ public interface DeploymentManagement {
|
||||
long countActionsAll();
|
||||
|
||||
/**
|
||||
* Counts the actions which match the given query.
|
||||
* <p/>
|
||||
* Counts the actions which match the given query.<p/>
|
||||
* No access control applied.
|
||||
*
|
||||
* @param rsqlParam RSQL query.
|
||||
* @param rsql RSQL query.
|
||||
* @return the total number of actions matching the given RSQL query.
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countActions(@NotNull String rsqlParam);
|
||||
long countActions(@NotNull String rsql);
|
||||
|
||||
/**
|
||||
* Counts all actions associated to a specific target.
|
||||
@@ -215,37 +200,32 @@ public interface DeploymentManagement {
|
||||
Slice<Action> findActionsAll(@NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link Action} entities which match the given RSQL query.
|
||||
* <p/>
|
||||
* Retrieves all {@link Action} entities which match the given RSQL query.<p/>
|
||||
* No access control applied.
|
||||
*
|
||||
* @param rsqlParam RSQL query string
|
||||
* @param rsql RSQL query string
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @return a paged list of {@link Action}s.
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<Action> findActions(@NotNull String rsqlParam, @NotNull Pageable pageable);
|
||||
Slice<Action> findActions(@NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link Action}s assigned to a specific {@link Target} and a
|
||||
* given specification.
|
||||
* Retrieves all {@link Action}s assigned to a specific {@link Target} and a given specification.
|
||||
*
|
||||
* @param rsqlParam rsql query string
|
||||
* @param rsql rsql query string
|
||||
* @param controllerId the target which must be assigned to the actions
|
||||
* @param pageable the page request
|
||||
* @return a slice of actions assigned to the specific target and the
|
||||
* specification
|
||||
* @return a slice of actions assigned to the specific target and the specification
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<Action> findActionsByTarget(@NotNull String rsqlParam, @NotEmpty String controllerId,
|
||||
@NotNull Pageable pageable);
|
||||
Slice<Action> findActionsByTarget(@NotNull String rsql, @NotEmpty String controllerId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link Action}s which are referring the given
|
||||
* {@link Target}.
|
||||
* Retrieves all {@link Action}s which are referring the given {@link Target}.
|
||||
*
|
||||
* @param controllerId the target to find actions for
|
||||
* @param pageable the pageable request to limit, sort the actions
|
||||
@@ -255,16 +235,15 @@ public interface DeploymentManagement {
|
||||
Slice<Action> findActionsByTarget(@NotEmpty String controllerId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all the {@link ActionStatus} entries of the given
|
||||
* {@link Action}.
|
||||
* Retrieves all the {@link ActionStatus} entries of the given {@link Action}.
|
||||
*
|
||||
* @param pageReq pagination parameter
|
||||
* @param actionId to be filtered on
|
||||
* @param pageable pagination parameter
|
||||
* @return the corresponding {@link Page} of {@link ActionStatus}
|
||||
* @throws EntityNotFoundException if action with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<ActionStatus> findActionStatusByAction(@NotNull Pageable pageReq, long actionId);
|
||||
Page<ActionStatus> findActionStatusByAction(long actionId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Counts all the {@link ActionStatus} entries of the given {@link Action}.
|
||||
@@ -277,20 +256,18 @@ public interface DeploymentManagement {
|
||||
long countActionStatusByAction(long actionId);
|
||||
|
||||
/**
|
||||
* Retrieves all messages for an {@link ActionStatus}.
|
||||
* <p/>
|
||||
* Retrieves all messages for an {@link ActionStatus}.<p/>
|
||||
* No entity based access control applied.
|
||||
*
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @param actionStatusId the id of {@link ActionStatus} to retrieve the messages from
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @return a page of messages by a specific {@link ActionStatus} id
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<String> findMessagesByActionStatusId(@NotNull Pageable pageable, long actionStatusId);
|
||||
Page<String> findMessagesByActionStatusId(long actionStatusId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Get the {@link Action} entity for given actionId with all lazy attributes
|
||||
* (i.e. distributionSet, target, target.assignedDs).
|
||||
* Get the {@link Action} entity for given actionId with all lazy attributes (i.e. distributionSet, target, target.assignedDs).
|
||||
*
|
||||
* @param actionId to be id of the action
|
||||
* @return the corresponding {@link Action}
|
||||
@@ -301,28 +278,27 @@ public interface DeploymentManagement {
|
||||
/**
|
||||
* Retrieves all active {@link Action}s of a specific target.
|
||||
*
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @param controllerId the target associated with the actions
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @return a list of actions associated with the given target
|
||||
* @throws EntityNotFoundException if target with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<Action> findActiveActionsByTarget(@NotNull Pageable pageable, @NotEmpty String controllerId);
|
||||
Page<Action> findActiveActionsByTarget(@NotEmpty String controllerId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all inactive {@link Action}s of a specific target.
|
||||
*
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @param controllerId the target associated with the actions
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @return a list of actions associated with the given target
|
||||
* @throws EntityNotFoundException if target with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<Action> findInActiveActionsByTarget(@NotNull Pageable pageable, @NotEmpty String controllerId);
|
||||
Page<Action> findInActiveActionsByTarget(@NotEmpty String controllerId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves active {@link Action}s with highest weight that are assigned to a
|
||||
* {@link Target}.
|
||||
* Retrieves active {@link Action}s with highest weight that are assigned to a {@link Target}.
|
||||
*
|
||||
* @param controllerId identifies the target to retrieve the action from
|
||||
* @param maxActionCount max size of returned list
|
||||
@@ -332,8 +308,7 @@ public interface DeploymentManagement {
|
||||
List<Action> findActiveActionsWithHighestWeight(@NotEmpty String controllerId, int maxActionCount);
|
||||
|
||||
/**
|
||||
* Get weight of an Action. Returns the default value if the weight is null
|
||||
* according to the properties.
|
||||
* Get weight of an Action. Returns the default value if the weight is null according to the properties.
|
||||
*
|
||||
* @param action to extract the weight from
|
||||
* @return weight of the action
|
||||
@@ -341,10 +316,8 @@ public interface DeploymentManagement {
|
||||
int getWeightConsideringDefault(final Action action);
|
||||
|
||||
/**
|
||||
* Force cancels given {@link Action} for given {@link Target}. Force
|
||||
* canceling means that the action is marked as canceled on the SP server
|
||||
* and a cancel request is sent to the target. But however it's not tracked,
|
||||
* if the targets handles the cancel request or not.
|
||||
* Force cancels given {@link Action} for given {@link Target}. Force canceling means that the action is marked as canceled on the SP server
|
||||
* and a cancel request is sent to the target. But however it's not tracked, if the targets handles the cancel request or not.
|
||||
*
|
||||
* @param actionId to be canceled
|
||||
* @return quite {@link Action}
|
||||
@@ -355,8 +328,7 @@ public interface DeploymentManagement {
|
||||
Action forceQuitAction(long actionId);
|
||||
|
||||
/**
|
||||
* Updates a {@link Action} and forces the {@link Action} if it's not
|
||||
* already forced.
|
||||
* Updates a {@link Action} and forces the {@link Action} if it's not already forced.
|
||||
*
|
||||
* @param actionId the ID of the action
|
||||
* @return the updated or the found {@link Action}
|
||||
@@ -366,8 +338,7 @@ public interface DeploymentManagement {
|
||||
Action forceTargetAction(long actionId);
|
||||
|
||||
/**
|
||||
* Sets the status of inactive scheduled {@link Action}s for the specified
|
||||
* {@link Target}s to {@link Status#CANCELED}
|
||||
* Sets the status of inactive scheduled {@link Action}s for the specified {@link Target}s to {@link Status#CANCELED}
|
||||
*
|
||||
* @param targetIds ids of the {@link Target}s the actions belong to
|
||||
*/
|
||||
@@ -375,15 +346,12 @@ public interface DeploymentManagement {
|
||||
void cancelInactiveScheduledActionsForTargets(List<Long> targetIds);
|
||||
|
||||
/**
|
||||
* Starts all scheduled actions of an RolloutGroup parent.
|
||||
* <p/>
|
||||
* Starts all scheduled actions of an RolloutGroup parent.<p/>
|
||||
* No entity based access control applied.
|
||||
*
|
||||
* @param rolloutId the rollout the actions belong to
|
||||
* @param distributionSetId to assign
|
||||
* @param rolloutGroupParentId the parent rollout group the actions should reference. null
|
||||
* references the first group
|
||||
* @return the amount of started actions
|
||||
* @param rolloutGroupParentId the parent rollout group the actions should reference. null references the first group
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
void startScheduledActionsByRolloutGroupParent(long rolloutId, long distributionSetId, Long rolloutGroupParentId);
|
||||
@@ -407,8 +375,7 @@ public interface DeploymentManagement {
|
||||
Optional<DistributionSet> getAssignedDistributionSet(@NotEmpty String controllerId);
|
||||
|
||||
/**
|
||||
* Returns {@link DistributionSet} that is installed on given
|
||||
* {@link Target}.
|
||||
* Returns {@link DistributionSet} that is installed on given {@link Target}.
|
||||
*
|
||||
* @param controllerId of target
|
||||
* @return installed {@link DistributionSet}
|
||||
@@ -418,9 +385,8 @@ public interface DeploymentManagement {
|
||||
Optional<DistributionSet> getInstalledDistributionSet(@NotEmpty String controllerId);
|
||||
|
||||
/**
|
||||
* Deletes actions which match one of the given action status and which have
|
||||
* not been modified since the given (absolute) time-stamp. Used for obsolete actions cleanup.
|
||||
* <p/>
|
||||
* Deletes actions which match one of the given action status and which have not been modified since the given (absolute) time-stamp.
|
||||
* Used for obsolete actions cleanup.<p/>
|
||||
* No entity based access control applied.
|
||||
*
|
||||
* @param status Set of action status.
|
||||
@@ -431,8 +397,7 @@ public interface DeploymentManagement {
|
||||
int deleteActionsByStatusAndLastModifiedBefore(@NotNull Set<Action.Status> status, long lastModified);
|
||||
|
||||
/**
|
||||
* Checks if there is an action for the device with the given controller ID
|
||||
* that is in the {@link Action.Status#CANCELING} state.
|
||||
* Checks if there is an action for the device with the given controller ID that is in the {@link Action.Status#CANCELING} state.
|
||||
*
|
||||
* @param targetId of target
|
||||
* @return if actions in CANCELING state are present
|
||||
@@ -441,13 +406,11 @@ public interface DeploymentManagement {
|
||||
boolean hasPendingCancellations(@NotNull Long targetId);
|
||||
|
||||
/**
|
||||
* Cancels all actions that refer to a given distribution set. This method
|
||||
* is called when a distribution set is invalidated.
|
||||
* Cancels all actions that refer to a given distribution set. This method is called when a distribution set is invalidated.
|
||||
*
|
||||
* @param cancelationType defines if a force or soft cancel is executed
|
||||
* @param set the distribution set for that the actions should be canceled
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||
void cancelActionsForDistributionSet(final CancelationType cancelationType, final DistributionSet set);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -231,13 +231,13 @@ public interface DistributionSetManagement extends RepositoryManagement<Distribu
|
||||
/**
|
||||
* Finds all {@link DistributionSet}s based on completeness.
|
||||
*
|
||||
* @param pageable the pagination parameter
|
||||
* @param complete to <code>true</code> for returning only completed distribution sets or <code>false</code> for only incomplete ones nor
|
||||
* <code>null</code> to return both.
|
||||
* @param pageable the pagination parameter
|
||||
* @return all found {@link DistributionSet}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
Slice<DistributionSet> findByCompleted(@NotNull Pageable pageable, Boolean complete);
|
||||
Slice<DistributionSet> findByCompleted(Boolean complete, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves {@link DistributionSet}s by filtering on the given parameters.
|
||||
@@ -266,14 +266,14 @@ public interface DistributionSetManagement extends RepositoryManagement<Distribu
|
||||
/**
|
||||
* Retrieves {@link DistributionSet}s by filtering on the given parameters.
|
||||
*
|
||||
* @param rsqlParam rsql query string
|
||||
* @param rsql rsql query string
|
||||
* @param tagId of the tag the DS are assigned to
|
||||
* @param pageable page parameter
|
||||
* @return the page of found {@link DistributionSet}
|
||||
* @throws EntityNotFoundException of distribution set tag with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
Page<DistributionSet> findByRsqlAndTag(@NotNull String rsqlParam, long tagId, @NotNull Pageable pageable);
|
||||
Page<DistributionSet> findByRsqlAndTag(@NotNull String rsql, long tagId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Counts all {@link DistributionSet}s based on completeness.
|
||||
|
||||
@@ -43,13 +43,13 @@ public interface DistributionSetTagManagement extends RepositoryManagement<Distr
|
||||
/**
|
||||
* Finds all {@link TargetTag} assigned to given {@link Target}.
|
||||
*
|
||||
* @param pageable information for page size, offset and sort order.
|
||||
* @param distributionSetId of the {@link DistributionSet}
|
||||
* @param pageable information for page size, offset and sort order.
|
||||
* @return page of the found {@link TargetTag}s
|
||||
* @throws EntityNotFoundException if {@link DistributionSet} with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
Page<DistributionSetTag> findByDistributionSet(@NotNull Pageable pageable, long distributionSetId);
|
||||
Page<DistributionSetTag> findByDistributionSet(long distributionSetId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Deletes {@link DistributionSetTag} by given
|
||||
|
||||
@@ -119,7 +119,7 @@ public interface RepositoryManagement<T, C, U> {
|
||||
/**
|
||||
* Retrieves all {@link BaseEntity}s with a given specification.
|
||||
*
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @param pageable pagination parameter
|
||||
* @return the found {@link BaseEntity}s
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the given
|
||||
@@ -127,7 +127,7 @@ public interface RepositoryManagement<T, C, U> {
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
Page<T> findByRsql(@NotNull String rsqlParam, @NotNull Pageable pageable);
|
||||
Page<T> findByRsql(@NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Verifies that {@link BaseEntity} with given ID exists in the repository.
|
||||
|
||||
@@ -53,7 +53,7 @@ public interface RolloutGroupManagement {
|
||||
* Retrieves a page of {@link RolloutGroup}s filtered by a given {@link Rollout} and an RSQL filter.
|
||||
*
|
||||
* @param rolloutId the rollout to filter the {@link RolloutGroup}s
|
||||
* @param rsqlParam the specification to filter the result set based on attributes of the {@link RolloutGroup}
|
||||
* @param rsql the specification to filter the result set based on attributes of the {@link RolloutGroup}
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return a page of found {@link RolloutGroup}s
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
@@ -61,13 +61,13 @@ public interface RolloutGroupManagement {
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ)
|
||||
Page<RolloutGroup> findByRolloutAndRsql(long rolloutId, @NotNull String rsqlParam, @NotNull Pageable pageable);
|
||||
Page<RolloutGroup> findByRolloutAndRsql(long rolloutId, @NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves a page of {@link RolloutGroup}s filtered by a given {@link Rollout} and a rsql filter with detailed status.
|
||||
*
|
||||
* @param rolloutId the rollout to filter the {@link RolloutGroup}s
|
||||
* @param rsqlParam the specification to filter the result set based on attributes of the {@link RolloutGroup}
|
||||
* @param rsql the specification to filter the result set based on attributes of the {@link RolloutGroup}
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return a page of found {@link RolloutGroup}s
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
@@ -75,7 +75,7 @@ public interface RolloutGroupManagement {
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ)
|
||||
Page<RolloutGroup> findByRolloutAndRsqlWithDetailedStatus(long rolloutId, @NotNull String rsqlParam, @NotNull Pageable pageable);
|
||||
Page<RolloutGroup> findByRolloutAndRsqlWithDetailedStatus(long rolloutId, @NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves a page of {@link RolloutGroup}s filtered by a given {@link Rollout}.
|
||||
@@ -110,17 +110,16 @@ public interface RolloutGroupManagement {
|
||||
/**
|
||||
* Get targets of specified rollout group.
|
||||
*
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @param rolloutGroupId rollout group
|
||||
* @param rsqlParam the specification for filtering the targets of a rollout group
|
||||
* @param rsql the specification for filtering the targets of a rollout group
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return Page<Target> list of targets of a rollout group
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ_AND_TARGET_READ)
|
||||
Page<Target> findTargetsOfRolloutGroupByRsql(@NotNull Pageable pageable, long rolloutGroupId,
|
||||
@NotNull String rsqlParam);
|
||||
Page<Target> findTargetsOfRolloutGroupByRsql(long rolloutGroupId, @NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Get {@link RolloutGroup} by id.
|
||||
|
||||
@@ -180,50 +180,48 @@ public interface RolloutManagement {
|
||||
/**
|
||||
* Retrieves all rollouts.
|
||||
*
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @param deleted flag if deleted rollouts should be included
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return a page of found rollouts
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ)
|
||||
Page<Rollout> findAll(@NotNull Pageable pageable, boolean deleted);
|
||||
Page<Rollout> findAll(boolean deleted, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Get count of targets in different status in rollout.
|
||||
*
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @param deleted flag if deleted rollouts should be included
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return a list of rollouts with details of targets count for different
|
||||
* statuses
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ)
|
||||
Page<Rollout> findAllWithDetailedStatus(@NotNull Pageable pageable, boolean deleted);
|
||||
Page<Rollout> findAllWithDetailedStatus(boolean deleted, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all rollouts found by the given specification.
|
||||
*
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @param rsqlParam the specification to filter rollouts
|
||||
* @param rsql the specification to filter rollouts
|
||||
* @param deleted flag if deleted rollouts should be included
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return a page of found rollouts
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ)
|
||||
Page<Rollout> findByRsql(@NotNull Pageable pageable, @NotNull String rsqlParam, boolean deleted);
|
||||
Page<Rollout> findByRsql(@NotNull String rsql, boolean deleted, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Finds rollouts by given text in name or description.
|
||||
*
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @param searchText search text which matches name or description of rollout
|
||||
* @param rsql search text which matches name or description of rollout
|
||||
* @param deleted flag if deleted rollouts should be included
|
||||
* @return the founded rollout or {@code null} if rollout with given ID does
|
||||
* not exists
|
||||
* @param pageable the page request to sort and limit the result
|
||||
* @return the founded rollout or {@code null} if rollout with given ID does not exists
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ)
|
||||
Page<Rollout> findByRsqlWithDetailedStatus(@NotNull Pageable pageable, @NotEmpty String searchText,
|
||||
boolean deleted);
|
||||
Page<Rollout> findByRsqlWithDetailedStatus(@NotEmpty String rsql, boolean deleted, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Find rollouts which are still active and needs to be handled.
|
||||
|
||||
@@ -77,13 +77,13 @@ public interface SoftwareModuleManagement extends RepositoryManagement<SoftwareM
|
||||
/**
|
||||
* Finds all meta-data by the given software module id where {@link SoftwareModuleMetadata#isTargetVisible()}.
|
||||
*
|
||||
* @param pageable the page request to page the result
|
||||
* @param id the software module id to retrieve the meta-data from
|
||||
* @param pageable the page request to page the result
|
||||
* @return a paged result of all meta-data entries for a given software module id
|
||||
* @throws EntityNotFoundException if software module with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
Page<SoftwareModuleMetadata> findMetaDataBySoftwareModuleIdAndTargetVisible(@NotNull Pageable pageable, long id);
|
||||
Page<SoftwareModuleMetadata> findMetaDataBySoftwareModuleIdAndTargetVisible(long id, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Creates or updates a single software module meta-data entry.
|
||||
|
||||
@@ -106,12 +106,12 @@ public interface TargetFilterQueryManagement {
|
||||
* Retrieves all {@link TargetFilterQuery}s which match the given name
|
||||
* filter.
|
||||
*
|
||||
* @param pageable pagination parameter
|
||||
* @param name name filter
|
||||
* @param pageable pagination parameter
|
||||
* @return the page with the found {@link TargetFilterQuery}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<TargetFilterQuery> findByName(@NotNull Pageable pageable, @NotNull String name);
|
||||
Slice<TargetFilterQuery> findByName(@NotNull String name, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Counts all {@link TargetFilterQuery}s which match the given name filter.
|
||||
@@ -123,50 +123,47 @@ public interface TargetFilterQueryManagement {
|
||||
long countByName(@NotNull String name);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link TargetFilterQuery} which match the given RSQL
|
||||
* filter.
|
||||
* Retrieves all {@link TargetFilterQuery} which match the given RSQL filter.
|
||||
*
|
||||
* @param pageable pagination parameter
|
||||
* @param rsqlFilter RSQL filter string
|
||||
* @param pageable pagination parameter
|
||||
* @return the page with the found {@link TargetFilterQuery}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<TargetFilterQuery> findByRsql(@NotNull Pageable pageable, @NotNull String rsqlFilter);
|
||||
Page<TargetFilterQuery> findByRsql(@NotNull String rsqlFilter, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link TargetFilterQuery}s which match the given query.
|
||||
*
|
||||
* @param pageable pagination parameter
|
||||
* @param query the query saved in the target filter query
|
||||
* @param pageable pagination parameter
|
||||
* @return the page with the found {@link TargetFilterQuery}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<TargetFilterQuery> findByQuery(@NotNull Pageable pageable, @NotNull String query);
|
||||
Slice<TargetFilterQuery> findByQuery(@NotNull String query, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link TargetFilterQuery}s which match the given
|
||||
* auto-assign distribution set ID.
|
||||
* Retrieves all {@link TargetFilterQuery}s which match the given auto-assign distribution set ID.
|
||||
*
|
||||
* @param pageable pagination parameter
|
||||
* @param setId the auto assign distribution set
|
||||
* @param pageable pagination parameter
|
||||
* @return the page with the found {@link TargetFilterQuery}s
|
||||
* @throws EntityNotFoundException if DS with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<TargetFilterQuery> findByAutoAssignDistributionSetId(@NotNull Pageable pageable, long setId);
|
||||
Slice<TargetFilterQuery> findByAutoAssignDistributionSetId(long setId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link TargetFilterQuery}s which match the given
|
||||
* auto-assign distribution set and RSQL filter.
|
||||
* Retrieves all {@link TargetFilterQuery}s which match the given auto-assign distribution set and RSQL filter.
|
||||
*
|
||||
* @param pageable pagination parameter
|
||||
* @param setId the auto assign distribution set
|
||||
* @param rsqlParam RSQL filter
|
||||
* @param rsql RSQL filter
|
||||
* @param pageable pagination parameter
|
||||
* @return the page with the found {@link TargetFilterQuery}s
|
||||
* @throws EntityNotFoundException if DS with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<TargetFilterQuery> findByAutoAssignDSAndRsql(@NotNull Pageable pageable, long setId, String rsqlParam);
|
||||
Page<TargetFilterQuery> findByAutoAssignDSAndRsql(long setId, String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link TargetFilterQuery}s with an auto-assign distribution set.
|
||||
@@ -238,4 +235,4 @@ public interface TargetFilterQueryManagement {
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||
void cancelAutoAssignmentForDistributionSet(long setId);
|
||||
}
|
||||
}
|
||||
@@ -98,44 +98,44 @@ public interface TargetManagement {
|
||||
/**
|
||||
* Count {@link TargetFilterQuery}s for given target filter query.
|
||||
*
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @return the found number of {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countByRsql(@NotEmpty String rsqlParam);
|
||||
long countByRsql(@NotEmpty String rsql);
|
||||
|
||||
/**
|
||||
* Count {@link TargetFilterQuery}s for given target filter query with UPDATE permission.
|
||||
*
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @return the found number of {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countByRsqlAndUpdatable(@NotEmpty String rsqlParam);
|
||||
long countByRsqlAndUpdatable(@NotEmpty String rsql);
|
||||
|
||||
/**
|
||||
* Count all targets for given {@link TargetFilterQuery} and that are compatible
|
||||
* with the passed {@link DistributionSetType}.
|
||||
*
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @param distributionSetIdTypeId ID of the {@link DistributionSetType} the targets need to be
|
||||
* compatible with
|
||||
* @return the found number of{@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countByRsqlAndCompatible(@NotEmpty String rsqlParam, @NotNull Long distributionSetIdTypeId);
|
||||
long countByRsqlAndCompatible(@NotEmpty String rsql, @NotNull Long distributionSetIdTypeId);
|
||||
|
||||
/**
|
||||
* Count all targets for given {@link TargetFilterQuery} and that are compatible
|
||||
* with the passed {@link DistributionSetType} and UPDATE permission.
|
||||
*
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @param distributionSetIdTypeId ID of the {@link DistributionSetType} the targets need to be
|
||||
* compatible with
|
||||
* @return the found number of{@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countByRsqlAndCompatibleAndUpdatable(@NotEmpty String rsqlParam, @NotNull Long distributionSetIdTypeId);
|
||||
long countByRsqlAndCompatibleAndUpdatable(@NotEmpty String rsql, @NotNull Long distributionSetIdTypeId);
|
||||
|
||||
/**
|
||||
* Count all targets with failed actions for specific Rollout and that are
|
||||
@@ -174,8 +174,7 @@ public interface TargetManagement {
|
||||
* @param create to be created
|
||||
* @return the created {@link Target}
|
||||
* @throws EntityAlreadyExistsException given target already exists.
|
||||
* @throws ConstraintViolationException if fields are not filled as specified. Check {@link TargetCreate}
|
||||
* for field constraints.
|
||||
* @throws ConstraintViolationException if fields are not filled as specified. Check {@link TargetCreate} for field constraints.
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_CREATE_TARGET)
|
||||
Target create(@NotNull @Valid TargetCreate create);
|
||||
@@ -217,15 +216,15 @@ public interface TargetManagement {
|
||||
* that don't have the specified distribution set in their action history and
|
||||
* are compatible with the passed {@link DistributionSetType}.
|
||||
*
|
||||
* @param pageRequest the pageRequest to enhance the query for paging and sorting
|
||||
* @param distributionSetId id of the {@link DistributionSet}
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @param pageable the pageable to enhance the query for paging and sorting
|
||||
* @return a page of the found {@link Target}s
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_READ_TARGET)
|
||||
Slice<Target> findByTargetFilterQueryAndNonDSAndCompatibleAndUpdatable(
|
||||
@NotNull Pageable pageRequest, long distributionSetId, @NotNull String rsqlParam);
|
||||
long distributionSetId, @NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Counts all targets for all the given parameter {@link TargetFilterQuery} and
|
||||
@@ -233,34 +232,34 @@ public interface TargetManagement {
|
||||
* are compatible with the passed {@link DistributionSetType}.
|
||||
*
|
||||
* @param distributionSetId id of the {@link DistributionSet}
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @return the count of found {@link Target}s
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_READ_TARGET)
|
||||
long countByRsqlAndNonDSAndCompatibleAndUpdatable(long distributionSetId, @NotNull String rsqlParam);
|
||||
long countByRsqlAndNonDSAndCompatibleAndUpdatable(long distributionSetId, @NotNull String rsql);
|
||||
|
||||
/**
|
||||
* Finds all targets for all the given parameter {@link TargetFilterQuery} and
|
||||
* that are not assigned to one of the {@link RolloutGroup}s and are compatible
|
||||
* with the passed {@link DistributionSetType}.
|
||||
*
|
||||
* @param pageRequest the pageRequest to enhance the query for paging and sorting
|
||||
* @param groups the list of {@link RolloutGroup}s
|
||||
* @param targetFilterQuery filter definition in RSQL syntax
|
||||
* @param distributionSetType type of the {@link DistributionSet} the targets must be compatible
|
||||
* withs
|
||||
* @param pageable the pageable to enhance the query for paging and sorting
|
||||
* @return a page of the found {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ_AND_TARGET_READ)
|
||||
Slice<Target> findByTargetFilterQueryAndNotInRolloutAndCompatibleAndUpdatable(@NotNull Pageable pageRequest,
|
||||
@NotEmpty Collection<Long> groups, @NotNull String targetFilterQuery,
|
||||
@NotNull DistributionSetType distributionSetType);
|
||||
Slice<Target> findByTargetFilterQueryAndNotInRolloutAndCompatibleAndUpdatable(
|
||||
@NotEmpty Collection<Long> groups, @NotNull String targetFilterQuery, @NotNull DistributionSetType distributionSetType,
|
||||
@NotNull Pageable pageable);
|
||||
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ_AND_TARGET_READ)
|
||||
Slice<Target> findByTargetFilterQueryAndNoOverridingActionsAndNotInRolloutAndCompatibleAndUpdatable(
|
||||
@NotNull Pageable pageRequest, final long rolloutId, final int weight, final long firstGroupId, @NotNull String targetFilterQuery,
|
||||
@NotNull DistributionSetType distributionSetType);
|
||||
final long rolloutId, final int weight, final long firstGroupId, @NotNull String targetFilterQuery,
|
||||
@NotNull DistributionSetType distributionSetType, @NotNull Pageable pageable);
|
||||
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ_AND_TARGET_READ)
|
||||
long countByActionsInRolloutGroup(final long rolloutGroupId);
|
||||
@@ -270,29 +269,28 @@ public interface TargetManagement {
|
||||
* assigned to one of the retried {@link RolloutGroup}s and are compatible with
|
||||
* the passed {@link DistributionSetType}.
|
||||
*
|
||||
* @param pageRequest the pageRequest to enhance the query for paging and sorting
|
||||
* @param groups the list of {@link RolloutGroup}s
|
||||
* @param rolloutId rolloutId of the rollout to be retried.
|
||||
* @param groups the list of {@link RolloutGroup}s
|
||||
* @param pageable the pageable to enhance the query for paging and sorting
|
||||
* @return a page of the found {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ_AND_TARGET_READ)
|
||||
Slice<Target> findByFailedRolloutAndNotInRolloutGroups(@NotNull Pageable pageRequest,
|
||||
@NotEmpty Collection<Long> groups, @NotNull String rolloutId);
|
||||
Slice<Target> findByFailedRolloutAndNotInRolloutGroups(
|
||||
@NotNull String rolloutId, @NotEmpty Collection<Long> groups, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Counts all targets for all the given parameter {@link TargetFilterQuery} and
|
||||
* that are not assigned to one of the {@link RolloutGroup}s and are compatible
|
||||
* with the passed {@link DistributionSetType}.
|
||||
*
|
||||
* @param rsqlParam filter definition in RSQL syntax
|
||||
* @param rsql filter definition in RSQL syntax
|
||||
* @param groups the list of {@link RolloutGroup}s
|
||||
* @param distributionSetType type of the {@link DistributionSet} the targets must be compatible
|
||||
* with
|
||||
* @param distributionSetType type of the {@link DistributionSet} the targets must be compatible with
|
||||
* @return count of the found {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_READ_AND_TARGET_READ)
|
||||
long countByRsqlAndNotInRolloutGroupsAndCompatibleAndUpdatable(@NotNull String rsqlParam, @NotEmpty Collection<Long> groups,
|
||||
@NotNull DistributionSetType distributionSetType);
|
||||
long countByRsqlAndNotInRolloutGroupsAndCompatibleAndUpdatable(
|
||||
@NotNull String rsql, @NotEmpty Collection<Long> groups, @NotNull DistributionSetType distributionSetType);
|
||||
|
||||
/**
|
||||
* Counts all targets with failed actions for specific Rollout and that are not
|
||||
@@ -310,32 +308,31 @@ public interface TargetManagement {
|
||||
* Finds all targets of the provided {@link RolloutGroup} that have no Action
|
||||
* for the RolloutGroup.
|
||||
*
|
||||
* @param pageRequest the pageRequest to enhance the query for paging and sorting
|
||||
* @param group the {@link RolloutGroup}
|
||||
* @param pageable the pageable to enhance the query for paging and sorting
|
||||
* @return the found {@link Target}s
|
||||
* @throws EntityNotFoundException if rollout group with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<Target> findByInRolloutGroupWithoutAction(@NotNull Pageable pageRequest, long group);
|
||||
Slice<Target> findByInRolloutGroupWithoutAction(long group, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* retrieves {@link Target}s by the assigned {@link DistributionSet}.
|
||||
* Retrieves {@link Target}s by the assigned {@link DistributionSet}.
|
||||
*
|
||||
* @param pageReq page parameter
|
||||
* @param distributionSetId the ID of the {@link DistributionSet}
|
||||
* @param pageable page parameter
|
||||
* @return the found {@link Target}s
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_READ_TARGET)
|
||||
Page<Target> findByAssignedDistributionSet(@NotNull Pageable pageReq, long distributionSetId);
|
||||
Page<Target> findByAssignedDistributionSet(long distributionSetId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves {@link Target}s by the assigned {@link DistributionSet} possible
|
||||
* including additional filtering based on the given {@code spec}.
|
||||
* Retrieves {@link Target}s by the assigned {@link DistributionSet} possible including additional filtering based on the given {@code spec}.
|
||||
*
|
||||
* @param pageReq page parameter
|
||||
* @param distributionSetId the ID of the {@link DistributionSet}
|
||||
* @param rsqlParam the specification to filter the result set
|
||||
* @param rsql the specification to filter the result set
|
||||
* @param pageable page parameter
|
||||
* @return the found {@link Target}s, never {@code null}
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
@@ -343,8 +340,7 @@ public interface TargetManagement {
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_READ_TARGET)
|
||||
Page<Target> findByAssignedDistributionSetAndRsql(@NotNull Pageable pageReq, long distributionSetId,
|
||||
@NotNull String rsqlParam);
|
||||
Page<Target> findByAssignedDistributionSetAndRsql(long distributionSetId, @NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Find {@link Target}s based a given IDs.
|
||||
@@ -398,33 +394,33 @@ public interface TargetManagement {
|
||||
* Filter {@link Target}s for all the given parameters. If all parameters except
|
||||
* pageable are null, all available {@link Target}s are returned.
|
||||
*
|
||||
* @param pageable page parameters
|
||||
* @param filterParams the filters to apply; only filters are enabled that have non-null
|
||||
* value; filters are AND-gated
|
||||
* @param pageable page parameters
|
||||
* @return the found {@link Target}s
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<Target> findByFilters(@NotNull Pageable pageable, @NotNull FilterParams filterParams);
|
||||
Slice<Target> findByFilters(@NotNull FilterParams filterParams, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* retrieves {@link Target}s by the installed {@link DistributionSet}.
|
||||
*
|
||||
* @param pageReq page parameter
|
||||
* @param distributionSetId the ID of the {@link DistributionSet}
|
||||
* @param pageReq page parameter
|
||||
* @return the found {@link Target}s
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_READ_TARGET)
|
||||
Page<Target> findByInstalledDistributionSet(@NotNull Pageable pageReq, long distributionSetId);
|
||||
Page<Target> findByInstalledDistributionSet(long distributionSetId, @NotNull Pageable pageReq);
|
||||
|
||||
/**
|
||||
* retrieves {@link Target}s by the installed {@link DistributionSet} including
|
||||
* additional filtering based on the given {@code spec}.
|
||||
*
|
||||
* @param pageReq page parameter
|
||||
* @param distributionSetId the ID of the {@link DistributionSet}
|
||||
* @param rsqlParam the specification to filter the result
|
||||
* @param rsql the specification to filter the result
|
||||
* @param pageReq page parameter
|
||||
* @return the found {@link Target}s, never {@code null}
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
@@ -432,17 +428,17 @@ public interface TargetManagement {
|
||||
* @throws EntityNotFoundException if distribution set with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_READ_TARGET)
|
||||
Page<Target> findByInstalledDistributionSetAndRsql(@NotNull Pageable pageReq, long distributionSetId, @NotNull String rsqlParam);
|
||||
Page<Target> findByInstalledDistributionSetAndRsql(long distributionSetId, @NotNull String rsql, @NotNull Pageable pageReq);
|
||||
|
||||
/**
|
||||
* Retrieves the {@link Target} which have a certain {@link TargetUpdateStatus}.
|
||||
*
|
||||
* @param pageable page parameter
|
||||
* @param status the {@link TargetUpdateStatus} to be filtered on
|
||||
* @param pageable page parameter
|
||||
* @return the found {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<Target> findByUpdateStatus(@NotNull Pageable pageable, @NotNull TargetUpdateStatus status);
|
||||
Page<Target> findByUpdateStatus(@NotNull TargetUpdateStatus status, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all targets.
|
||||
@@ -456,21 +452,21 @@ public interface TargetManagement {
|
||||
/**
|
||||
* Retrieves all targets.
|
||||
*
|
||||
* @param rsql in RSQL notation
|
||||
* @param pageable pagination parameter
|
||||
* @param rsqlParam in RSQL notation
|
||||
* @return the found {@link Target}s, never {@code null}
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<Target> findByRsql(@NotNull Pageable pageable, @NotNull String rsqlParam);
|
||||
Slice<Target> findByRsql(@NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves all target based on {@link TargetFilterQuery}.
|
||||
*
|
||||
* @param pageable pagination parameter
|
||||
* @param targetFilterQueryId {@link TargetFilterQuery#getId()}
|
||||
* @param pageable pagination parameter
|
||||
* @return the found {@link Target}s, never {@code null}
|
||||
* @throws EntityNotFoundException if {@link TargetFilterQuery} with given ID does not exist.
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
@@ -478,25 +474,25 @@ public interface TargetManagement {
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<Target> findByTargetFilterQuery(@NotNull Pageable pageable, long targetFilterQueryId);
|
||||
Slice<Target> findByTargetFilterQuery(long targetFilterQueryId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Find targets by tag name.
|
||||
*
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @param tagId tag ID
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @return list of matching targets
|
||||
* @throws EntityNotFoundException if target tag with given ID does not exist
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<Target> findByTag(@NotNull Pageable pageable, long tagId);
|
||||
Page<Target> findByTag(long tagId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Find targets by tag name.
|
||||
*
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @param rsql in RSQL notation
|
||||
* @param tagId tag ID
|
||||
* @param rsqlParam in RSQL notation
|
||||
* @param pageable the page request parameter for paging and sorting the result
|
||||
* @return list of matching targets
|
||||
* @throws EntityNotFoundException if target tag with given ID does not exist
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
@@ -504,7 +500,7 @@ public interface TargetManagement {
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<Target> findByRsqlAndTag(@NotNull Pageable pageable, @NotNull String rsqlParam, long tagId);
|
||||
Page<Target> findByRsqlAndTag(@NotNull String rsql, long tagId, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Verify if a target matches a specific target filter query, does not have a
|
||||
@@ -688,11 +684,11 @@ public interface TargetManagement {
|
||||
* Retrieves {@link Target}s where
|
||||
* {@link #isControllerAttributesRequested(String)}.
|
||||
*
|
||||
* @param pageReq page parameter
|
||||
* @param pageable page parameter
|
||||
* @return the found {@link Target}s
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<Target> findByControllerAttributesRequested(@NotNull Pageable pageReq);
|
||||
Page<Target> findByControllerAttributesRequested(@NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Creates a list of target meta-data entries.
|
||||
|
||||
@@ -87,15 +87,14 @@ public interface TargetTagManagement {
|
||||
/**
|
||||
* Retrieves all target tags based on the given specification.
|
||||
*
|
||||
* @param rsql rsql query string
|
||||
* @param pageable pagination parameter
|
||||
* @param rsqlParam rsql query string
|
||||
* @return the found {@link Target}s, never {@code null}
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
* @throws RSQLParameterUnsupportedFieldException if a field in the RSQL string is used but not provided by the given {@code fieldNameProvider}
|
||||
* @throws RSQLParameterSyntaxException if the RSQL syntax is wrong
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<TargetTag> findByRsql(@NotNull Pageable pageable, @NotNull String rsqlParam);
|
||||
Page<TargetTag> findByRsql(@NotNull String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Find {@link TargetTag} based on given Name.
|
||||
|
||||
@@ -86,22 +86,22 @@ public interface TargetTypeManagement {
|
||||
Slice<TargetType> findAll(@NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* @param rsql query param
|
||||
* @param pageable Page
|
||||
* @param rsqlParam query param
|
||||
* @return Target type
|
||||
*/
|
||||
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Page<TargetType> findByRsql(@NotNull Pageable pageable, @NotEmpty String rsqlParam);
|
||||
Page<TargetType> findByRsql(@NotEmpty String rsql, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Retrieves {@link TargetType}s by filtering on the given parameters.
|
||||
*
|
||||
* @param pageable page parameter
|
||||
* @param name has text of filters to be applied.
|
||||
* @param pageable page parameter
|
||||
* @return the page of found {@link TargetType}
|
||||
*/
|
||||
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<TargetType> findByName(@NotNull Pageable pageable, String name);
|
||||
Slice<TargetType> findByName(String name, @NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* @param id Target type ID
|
||||
|
||||
Reference in New Issue
Block a user