Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
- Loading branch information
1 parent
94576bd
commit 9e76223
Showing
34 changed files
with
629 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 47 additions & 24 deletions
71
...est/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
109 changes: 67 additions & 42 deletions
109
...c/test/java/org/eclipse/hawkbit/integration/AmqpMessageHandlerServiceIntegrationTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...pository-api/src/main/java/org/eclipse/hawkbit/repository/exception/DeletedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.hawkbit.repository.exception; | ||
|
||
import org.eclipse.hawkbit.exception.AbstractServerRtException; | ||
import org.eclipse.hawkbit.exception.SpServerError; | ||
import org.eclipse.hawkbit.repository.model.BaseEntity; | ||
|
||
import java.io.Serial; | ||
|
||
/** | ||
* Thrown if assignment quota is exceeded | ||
*/ | ||
public class DeletedException extends AbstractServerRtException { | ||
|
||
@Serial | ||
private static final long serialVersionUID = 1L; | ||
|
||
private static final SpServerError THIS_ERROR = SpServerError.SP_DELETED; | ||
|
||
public DeletedException( | ||
final Class<? extends BaseEntity> type, final Object entityId) { | ||
super(type.getSimpleName() + " with given identifier {" + entityId + "} is soft-deleted!", | ||
THIS_ERROR); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...y/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/TestHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.hawkbit.repository.jpa; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
import org.eclipse.hawkbit.repository.jpa.model.JpaDistributionSet; | ||
import org.eclipse.hawkbit.repository.jpa.model.JpaSoftwareModule; | ||
import org.eclipse.hawkbit.repository.model.DistributionSet; | ||
import org.eclipse.hawkbit.repository.model.SoftwareModule; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class TestHelper { | ||
|
||
public static void implicitLock(final DistributionSet set) { | ||
((JpaDistributionSet) set).setOptLockRevision(set.getOptLockRevision() + 1); | ||
} | ||
|
||
public static void implicitLock(final SoftwareModule module) { | ||
((JpaSoftwareModule) module).setOptLockRevision(module.getOptLockRevision() + 1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.