Feature/java11 build (#1280)
* hawkBit on Java 11 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Preparing java 11 build - Update eclipse-link maven plugin dependencies - Fixing warnings, adopt to java-11 style Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Preparing java 11 build - Fixing warnings, adapt to java-11 style - Added since to deprecated Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixing sonar warnings - removed deprecated API Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixing sonar warnings & failing test - Added suppressWarning - added WithSpringAuthorityRule to clean-up listener Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Compile warnings - Test if final causes issues in tests Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Removed deprecated code Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Reverted changes Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Removed final as this causes invalid reflective access exceptions - The eclipselink generated classes seem to modify the field directly - update plugin version Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Upgrade eclipselink from 2.7.9 to 2.7.10 * Remove @deprecated endpoints from MgmtTargetTagResource * Remove dependencies already defined in eclipselink-maven-plugin * Try eclipselink 2.7.11-RC1 * Set project encoding to UTF-8 * Upgrade surefire and failsafe plugins to 3.0.0-M7 * Try fixed string instead of a random generated one * Replace JsonBuilder by Jackson ObjectMapper usage * Use JsonBuilder again * Use APPLICATION_JSON_UTF8 instead of APPLICATION_JSON * Try to replace com.vaadin.external.google:android-json by org.json:json * Add debugging outputs * Improve debugging outputs * Improve debugging outputs * Use Jackson instead of JsonBuilder * Use Jackson instead of JsonBuilder 2nd part * Use Spring json dependency * Use eclipselink 2.7.11 * Fix RootControllerDocumentationTest * Improve helper methods of AbstractDDiApiIntegrationTest * Upgrade SpringBoot and SpringCloud versions * Improve deprecation notice for 0.3.0M8 * Fix BaseAmqpServiceTest * Fix SpecificationsBuilderTest * Removed deprecated code * Define maven-enforcer-plugin version * Remove com.google.code.findbugs.jsr305 Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> * Update circleci image to openjdk:openjdk:11.0.13-jdk-buster Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> * Fix javadoc generation and license check Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> * Fix review findings Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> Co-authored-by: Dominic Schabel <dominic.schabel@bosch.io> Co-authored-by: Peter Vigier <Peter.Vigier@bosch.io> Co-authored-by: Markus Block <markus.block@bosch-si.com>
This commit is contained in:
committed by
GitHub
parent
537548defb
commit
32718676a4
@@ -32,6 +32,7 @@ public interface ArtifactEncryption {
|
||||
*
|
||||
* @return secrets key/value pairs
|
||||
* @throws ArtifactEncryptionFailedException
|
||||
* thrown in case of an error while generating secrets
|
||||
*/
|
||||
Map<String, String> generateSecrets();
|
||||
|
||||
@@ -44,6 +45,7 @@ public interface ArtifactEncryption {
|
||||
* artifact stream to encrypt
|
||||
* @return encrypted input stream
|
||||
* @throws ArtifactEncryptionFailedException
|
||||
* thrown in case of an error while encrypting the provided stream
|
||||
*/
|
||||
InputStream encryptStream(final Map<String, String> secrets, final InputStream stream);
|
||||
|
||||
@@ -56,6 +58,7 @@ public interface ArtifactEncryption {
|
||||
* artifact stream to decrypt
|
||||
* @return decrypted input stream
|
||||
* @throws ArtifactEncryptionFailedException
|
||||
* thrown in case of an error while decrypting the provided stream
|
||||
*/
|
||||
InputStream decryptStream(final Map<String, String> secrets, final InputStream stream);
|
||||
|
||||
|
||||
@@ -206,6 +206,7 @@ public interface TargetFilterQueryManagement {
|
||||
*
|
||||
* @return the page with the found {@link TargetFilterQuery}s
|
||||
* @param pageable
|
||||
* pagination information
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
Slice<TargetFilterQuery> findWithAutoAssignDS(@NotNull Pageable pageable);
|
||||
|
||||
@@ -66,59 +66,16 @@ public interface TargetManagement {
|
||||
List<Target> assignTag(@NotEmpty Collection<String> controllerIds, long tagId);
|
||||
|
||||
/**
|
||||
* Counts number of targets with given
|
||||
* {@link Target#getAssignedDistributionSet()}.
|
||||
*
|
||||
* @param distId
|
||||
* to search for
|
||||
* Counts number of targets with the given distribution set assigned.
|
||||
*
|
||||
* @param distId to search for
|
||||
* @return number of found {@link Target}s.
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if distribution set with given ID does not exist
|
||||
* @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)
|
||||
long countByAssignedDistributionSet(long distId);
|
||||
|
||||
/**
|
||||
* Count {@link Target}s for all the given filter parameters.
|
||||
*
|
||||
* @param status
|
||||
* find targets having one of these {@link TargetUpdateStatus}s.
|
||||
* Set to <code>null</code> in case this is not required.
|
||||
* @param overdueState
|
||||
* find targets that are overdue (targets that did not respond
|
||||
* during the configured intervals: poll_itvl + overdue_itvl).
|
||||
* Set to <code>null</code> in case this is not required.
|
||||
* @param searchText
|
||||
* to find targets having the text anywhere in name or
|
||||
* description. Set <code>null</code> in case this is not
|
||||
* required.
|
||||
* @param installedOrAssignedDistributionSetId
|
||||
* to find targets having the {@link DistributionSet} as
|
||||
* installed or assigned. Set to <code>null</code> in case this
|
||||
* is not required.
|
||||
* @param tagNames
|
||||
* to find targets which are having any one in this tag names.
|
||||
* Set <code>null</code> in case this is not required.
|
||||
* @param selectTargetWithNoTag
|
||||
* flag to select targets with no tag assigned
|
||||
*
|
||||
* @return the found number of {@link Target}s
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if distribution set with given ID does not exist
|
||||
*
|
||||
* @deprecated this method
|
||||
* {@link TargetManagement#countByFilters(FilterParams)} should
|
||||
* be used instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
|
||||
long countByFilters(Collection<TargetUpdateStatus> status, Boolean overdueState, String searchText,
|
||||
Long installedOrAssignedDistributionSetId, Boolean selectTargetWithNoTag, String... tagNames);
|
||||
|
||||
/**
|
||||
* Count {@link Target}s for all the given filter parameters.
|
||||
*
|
||||
@@ -135,14 +92,11 @@ public interface TargetManagement {
|
||||
long countByFilters(@NotNull final FilterParams filterParams);
|
||||
|
||||
/**
|
||||
* Counts number of targets with given with given distribution set Id
|
||||
* Get the count of targets with the given distribution set id.
|
||||
*
|
||||
* @param distId
|
||||
* to search for
|
||||
* @param distId to search for
|
||||
* @return number of found {@link Target}s.
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if distribution set with given ID does not exist
|
||||
* @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)
|
||||
@@ -152,12 +106,9 @@ public interface TargetManagement {
|
||||
* Checks if there is already a {@link Target} that has the given
|
||||
* distribution set Id assigned or installed.
|
||||
*
|
||||
* @param distId
|
||||
* to search for
|
||||
* @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
|
||||
* @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)
|
||||
@@ -226,8 +177,8 @@ public interface TargetManagement {
|
||||
Target create(@NotNull @Valid TargetCreate create);
|
||||
|
||||
/**
|
||||
* creates multiple {@link Target}s. If some of the given {@link Target}s
|
||||
* already exists in the DB a {@link EntityAlreadyExistsException} is
|
||||
* creates multiple {@link Target}s. If the given {@link Target}s
|
||||
* already exists in the DB an {@link EntityAlreadyExistsException} is
|
||||
* thrown. {@link Target}s contain all objects of the parameter targets,
|
||||
* including duplicates.
|
||||
*
|
||||
@@ -546,28 +497,27 @@ public interface TargetManagement {
|
||||
Slice<Target> findByTargetFilterQuery(@NotNull Pageable pageable, long targetFilterQueryId);
|
||||
|
||||
/**
|
||||
* method retrieves all {@link Target}s from the repo in the following
|
||||
* order:
|
||||
* method retrieves all {@link Target}s from the repo in the following order:
|
||||
* <p>
|
||||
* 1) {@link Target}s which have the given {@link DistributionSet} as
|
||||
* {@link Target#getTarget()} {@link Target#getInstalledDistributionSet()}
|
||||
* <p>
|
||||
* 2) {@link Target}s which have the given {@link DistributionSet} as
|
||||
* {@link Target#getAssignedDistributionSet()}
|
||||
* <p>
|
||||
* 3) {@link Target}s which have no connection to the given
|
||||
* {@link DistributionSet}.
|
||||
* <ol>
|
||||
* <li>{@link Target}s which have the given {@link DistributionSet} as installed
|
||||
* distribution set</li>
|
||||
* <li>{@link Target}s which have the given {@link DistributionSet} as assigned
|
||||
* distribution set</li>
|
||||
* <li>{@link Target}s which have no connection to the given
|
||||
* {@link DistributionSet}</li>
|
||||
* </ol>
|
||||
*
|
||||
* @param pageable
|
||||
* the page request to page the result set
|
||||
* @param orderByDistributionId
|
||||
* {@link DistributionSet#getId()} to be ordered by
|
||||
* @param filterParams
|
||||
* the filters to apply; only filters are enabled that have
|
||||
* non-null value; filters are AND-gated
|
||||
* the filters to apply; only filters are enabled that have non-null
|
||||
* value; filters are AND-gated
|
||||
* @return a paged result {@link Page} of the {@link Target}s in a defined
|
||||
* order.
|
||||
*
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if distribution set with given ID does not exist
|
||||
*/
|
||||
@@ -614,17 +564,16 @@ public interface TargetManagement {
|
||||
Page<Target> findByRsqlAndTag(@NotNull Pageable pageable, @NotNull String rsqlParam, long tagId);
|
||||
|
||||
/**
|
||||
* Toggles {@link TargetTag} assignment to given {@link Target}s by means
|
||||
* that if some (or all) of the targets in the list have the {@link Tag} not
|
||||
* yet assigned, they will be. Only if all of theme have the tag already
|
||||
* assigned they will be removed instead.
|
||||
* Toggles {@link TargetTag} assignment to given {@link Target}s by means that
|
||||
* if some (or all) of the targets in the list have the {@link Tag} not yet
|
||||
* assigned, they will be. Only if all of them have the tag already assigned
|
||||
* they will be removed instead.
|
||||
*
|
||||
* @param controllerIds
|
||||
* to toggle for
|
||||
* @param tagName
|
||||
* to toggle
|
||||
* @return TagAssigmentResult with all meta data of the assignment outcome.
|
||||
*
|
||||
* @return TagAssigmentResult with all metadata of the assignment outcome.
|
||||
* @throws EntityNotFoundException
|
||||
* if tag with given name does not exist
|
||||
*/
|
||||
@@ -641,7 +590,7 @@ public interface TargetManagement {
|
||||
* to set the type to
|
||||
* @param typeId
|
||||
* to assign targets to
|
||||
* @return {@link TargetTypeAssignmentResult} with all meta data of the
|
||||
* @return {@link TargetTypeAssignmentResult} with all metadata of the
|
||||
* assignment outcome.
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
@@ -656,7 +605,7 @@ public interface TargetManagement {
|
||||
*
|
||||
* @param controllerIds
|
||||
* to remove the type from
|
||||
* @return {@link TargetTypeAssignmentResult} with all meta data of the
|
||||
* @return {@link TargetTypeAssignmentResult} with all metadata of the
|
||||
* assignment outcome.
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||
@@ -827,15 +776,15 @@ public interface TargetManagement {
|
||||
* for
|
||||
* @param metadata
|
||||
* the meta data entries to create or update
|
||||
* @return the updated or created target meta data entries
|
||||
*
|
||||
* @return the updated or created target metadata entries
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if given target does not exist
|
||||
*
|
||||
*
|
||||
* @throws EntityAlreadyExistsException
|
||||
* in case one of the meta data entry already exists for the
|
||||
* in case one of the metadata entry already exists for the
|
||||
* specific key
|
||||
*
|
||||
*
|
||||
* @throws AssignmentQuotaExceededException
|
||||
* if the maximum number of {@link MetaData} entries is exceeded
|
||||
* for the addressed {@link Target}
|
||||
@@ -847,10 +796,10 @@ public interface TargetManagement {
|
||||
* Deletes a target meta data entry.
|
||||
*
|
||||
* @param controllerId
|
||||
* where meta data has to be deleted
|
||||
* where metadata has to be deleted
|
||||
* @param key
|
||||
* of the meta data element
|
||||
*
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if given target does not exist
|
||||
*/
|
||||
@@ -863,10 +812,10 @@ public interface TargetManagement {
|
||||
* @param pageable
|
||||
* the page request to page the result
|
||||
* @param controllerId
|
||||
* the controller id to retrieve the meta data from
|
||||
* the controller id to retrieve the metadata from
|
||||
*
|
||||
* @return a paged result of all meta data entries for a given target id
|
||||
*
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if target with given ID does not exist
|
||||
*/
|
||||
@@ -875,12 +824,12 @@ public interface TargetManagement {
|
||||
|
||||
/**
|
||||
* Counts all meta data by the given target id.
|
||||
*
|
||||
*
|
||||
* @param controllerId
|
||||
* the controller id to retrieve the meta data from
|
||||
*
|
||||
* @return count of all meta data entries for a given target id
|
||||
*
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* if target with given ID does not exist
|
||||
*/
|
||||
@@ -888,17 +837,17 @@ public interface TargetManagement {
|
||||
long countMetaDataByControllerId(@NotEmpty String controllerId);
|
||||
|
||||
/**
|
||||
* Finds all meta data by the given target id and query.
|
||||
*
|
||||
* Finds all metadata by the given target id and query.
|
||||
*
|
||||
* @param pageable
|
||||
* the page request to page the result
|
||||
* @param controllerId
|
||||
* the controller id to retrieve the meta data from
|
||||
* the controller id to retrieve the metadata from
|
||||
* @param rsqlParam
|
||||
* rsql query string
|
||||
*
|
||||
* @return a paged result of all meta data entries for a given target id
|
||||
*
|
||||
*
|
||||
* @throws RSQLParameterUnsupportedFieldException
|
||||
* if a field in the RSQL string is used but not provided by the
|
||||
* given {@code fieldNameProvider}
|
||||
@@ -932,14 +881,14 @@ public interface TargetManagement {
|
||||
* Updates a target meta data value if corresponding entry exists.
|
||||
*
|
||||
* @param controllerId
|
||||
* {@link Target} controller id of the meta data entry to be
|
||||
* {@link Target} controller id of the metadata entry to be
|
||||
* updated
|
||||
* @param metadata
|
||||
* meta data entry to be updated
|
||||
* @return the updated meta data entry
|
||||
*
|
||||
*
|
||||
* @throws EntityNotFoundException
|
||||
* in case the meta data entry does not exists and cannot be
|
||||
* in case the metadata entry does not exist and cannot be
|
||||
* updated
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_REPOSITORY)
|
||||
|
||||
@@ -56,8 +56,10 @@ public interface TargetType extends NamedEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unassigns a distribution set type from target types
|
||||
* Unassigns a {@link DistributionSetType} from {@link TargetType}
|
||||
*
|
||||
* @param dsTypeId
|
||||
* that will be removed from {@link TargetType}
|
||||
* @return the resulting target type
|
||||
*/
|
||||
TargetType removeDistributionSetType(final Long dsTypeId);
|
||||
|
||||
@@ -29,6 +29,7 @@ public class TenantUsage {
|
||||
* Constructor.
|
||||
*
|
||||
* @param tenantName
|
||||
* name of the tenant
|
||||
*/
|
||||
public TenantUsage(final String tenantName) {
|
||||
this.tenantName = tenantName;
|
||||
|
||||
Reference in New Issue
Block a user