diff --git a/3rd-dependencies/listDeps.sh b/3rd-dependencies/listDeps.sh
old mode 100755
new mode 100644
diff --git a/examples/hawkbit-example-app/pom.xml b/examples/hawkbit-example-app/pom.xml
index fccd835bc..86ce5d9eb 100644
--- a/examples/hawkbit-example-app/pom.xml
+++ b/examples/hawkbit-example-app/pom.xml
@@ -64,7 +64,12 @@
org.eclipse.hawkbit
- hawkbit-rest-resource
+ hawkbit-mgmt-resource
+ ${project.version}
+
+
+ org.eclipse.hawkbit
+ hawkbit-system-resource
${project.version}
diff --git a/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/Start.java b/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/Start.java
index 382d90c20..76d89af33 100644
--- a/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/Start.java
+++ b/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/Start.java
@@ -11,7 +11,8 @@ package org.eclipse.hawkbit.app;
import org.eclipse.hawkbit.RepositoryApplicationConfiguration;
import org.eclipse.hawkbit.autoconfigure.security.EnableHawkbitManagedSecurityConfiguration;
import org.eclipse.hawkbit.ddi.annotation.EnableDdiApi;
-import org.eclipse.hawkbit.rest.resource.EnableRestResources;
+import org.eclipse.hawkbit.mgmt.annotation.EnableMgmtApi;
+import org.eclipse.hawkbit.system.annotation.EnableSystemApi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
@@ -24,8 +25,9 @@ import org.springframework.context.annotation.Import;
@SpringBootApplication
@Import({ RepositoryApplicationConfiguration.class })
@EnableHawkbitManagedSecurityConfiguration
-@EnableRestResources
+@EnableMgmtApi
@EnableDdiApi
+@EnableSystemApi
public class Start {
/**
diff --git a/examples/hawkbit-mgmt-api-client/pom.xml b/examples/hawkbit-mgmt-api-client/pom.xml
index 9aaf53dc6..051252d12 100644
--- a/examples/hawkbit-mgmt-api-client/pom.xml
+++ b/examples/hawkbit-mgmt-api-client/pom.xml
@@ -57,7 +57,7 @@
org.eclipse.hawkbit
- hawkbit-rest-api
+ hawkbit-mgmt-api
${project.version}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetResourceClient.java
index 5ac11e012..11df8c323 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.DistributionSetRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtDistributionSetRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the DistributionSet resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/distributionsets")
-public interface DistributionSetResourceClient extends DistributionSetRestApi {
+public interface DistributionSetResourceClient extends MgmtDistributionSetRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTagResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTagResourceClient.java
index 5fbdaf857..628304e26 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTagResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTagResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.DistributionSetTagRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtDistributionSetTagRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the DistributionSetTag resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/distributionsettags")
-public interface DistributionSetTagResourceClient extends DistributionSetTagRestApi {
+public interface DistributionSetTagResourceClient extends MgmtDistributionSetTagRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTypeResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTypeResourceClient.java
index 300f8ddcb..871f79beb 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTypeResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/DistributionSetTypeResourceClient.java
@@ -8,7 +8,7 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.DistributionSetTypeRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtDistributionSetTypeRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
@@ -16,6 +16,6 @@ import org.springframework.cloud.netflix.feign.FeignClient;
*
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/distributionsettypes")
-public interface DistributionSetTypeResourceClient extends DistributionSetTypeRestApi {
+public interface DistributionSetTypeResourceClient extends MgmtDistributionSetTypeRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/RolloutResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/RolloutResourceClient.java
index aed3af7a2..0a40ab107 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/RolloutResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/RolloutResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.RolloutRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtRolloutRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the Rollout resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/rollouts")
-public interface RolloutResourceClient extends RolloutRestApi {
+public interface RolloutResourceClient extends MgmtRolloutRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleResourceClient.java
index 8610643ef..aaf589779 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.SoftwareModuleRestAPI;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtSoftwareModuleRestAPI;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the SoftwareModule resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/softwaremodules")
-public interface SoftwareModuleResourceClient extends SoftwareModuleRestAPI {
+public interface SoftwareModuleResourceClient extends MgmtSoftwareModuleRestAPI {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleTypeResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleTypeResourceClient.java
index 46410dd6c..5fe0012f6 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleTypeResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/SoftwareModuleTypeResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.SoftwareModuleTypeRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtSoftwareModuleTypeRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the oftwareModuleType resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/softwaremoduletypes")
-public interface SoftwareModuleTypeResourceClient extends SoftwareModuleTypeRestApi {
+public interface SoftwareModuleTypeResourceClient extends MgmtSoftwareModuleTypeRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetResourceClient.java
index 79385fea4..920666dd1 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.TargetRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the Target resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/targets")
-public interface TargetResourceClient extends TargetRestApi {
+public interface TargetResourceClient extends MgmtTargetRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetTagResourceClient.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetTagResourceClient.java
index 930931a87..ad6a1dab9 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetTagResourceClient.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/TargetTagResourceClient.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource;
-import org.eclipse.hawkbit.rest.resource.api.TargetTagRestApi;
+import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetTagRestApi;
import org.springframework.cloud.netflix.feign.FeignClient;
/**
* Client binding for the TargetTag resource of the management API.
*/
@FeignClient(url = "${hawkbit.url:localhost:8080}/rest/v1/targettags")
-public interface TargetTagResourceClient extends TargetTagRestApi {
+public interface TargetTagResourceClient extends MgmtTargetTagRestApi {
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetBuilder.java
index 2e2d91928..56c0ddbf8 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetBuilder.java
@@ -11,20 +11,20 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleAssigmentRest;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSetRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
import com.google.common.collect.Lists;
/**
- * Builder pattern for building {@link DistributionSetRequestBodyPost}.
+ * Builder pattern for building {@link MgmtDistributionSetRequestBodyPost}.
*/
public class DistributionSetBuilder {
private String name;
private String version;
private String type;
- private final List modules = new ArrayList<>();
+ private final List modules = new ArrayList<>();
/**
* @param name
@@ -37,7 +37,7 @@ public class DistributionSetBuilder {
}
public DistributionSetBuilder moduleByID(final Long id) {
- final SoftwareModuleAssigmentRest softwareModuleAssigmentRest = new SoftwareModuleAssigmentRest();
+ final MgmtSoftwareModuleAssigment softwareModuleAssigmentRest = new MgmtSoftwareModuleAssigment();
softwareModuleAssigmentRest.setId(id);
modules.add(softwareModuleAssigmentRest);
return this;
@@ -65,27 +65,27 @@ public class DistributionSetBuilder {
/**
* Builds a list with a single entry of
- * {@link DistributionSetRequestBodyPost} which can directly be used to post
+ * {@link MgmtDistributionSetRequestBodyPost} which can directly be used to post
* on the RESTful-API.
*
- * @return a single entry list of {@link DistributionSetRequestBodyPost}
+ * @return a single entry list of {@link MgmtDistributionSetRequestBodyPost}
*/
- public List build() {
+ public List build() {
return Lists.newArrayList(doBuild(name));
}
/**
- * Builds a list of multiple {@link DistributionSetRequestBodyPost} to
+ * Builds a list of multiple {@link MgmtDistributionSetRequestBodyPost} to
* create multiple distribution sets at once. An increasing number will be
* added to the name of the distribution set. The version and type will
* remain the same.
*
* @param count
* the amount of distribution sets body which should be created
- * @return a list of {@link DistributionSetRequestBodyPost}
+ * @return a list of {@link MgmtDistributionSetRequestBodyPost}
*/
- public List buildAsList(final int count) {
- final ArrayList bodyList = Lists.newArrayList();
+ public List buildAsList(final int count) {
+ final ArrayList bodyList = Lists.newArrayList();
for (int index = 0; index < count; index++) {
bodyList.add(doBuild(name + index));
}
@@ -93,8 +93,8 @@ public class DistributionSetBuilder {
return bodyList;
}
- private DistributionSetRequestBodyPost doBuild(final String prefixName) {
- final DistributionSetRequestBodyPost body = new DistributionSetRequestBodyPost();
+ private MgmtDistributionSetRequestBodyPost doBuild(final String prefixName) {
+ final MgmtDistributionSetRequestBodyPost body = new MgmtDistributionSetRequestBodyPost();
body.setName(prefixName);
body.setVersion(version);
body.setType(type);
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetTypeBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetTypeBuilder.java
index 752834c7d..909e08470 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetTypeBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/DistributionSetTypeBuilder.java
@@ -11,22 +11,22 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.distributionsettype.DistributionSetTypeRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeAssigmentRest;
+import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
import com.google.common.collect.Lists;
/**
*
- * Builder pattern for building {@link DistributionSetTypeRequestBodyPost}.
+ * Builder pattern for building {@link MgmtDistributionSetTypeRequestBodyPost}.
*
*/
public class DistributionSetTypeBuilder {
private String key;
private String name;
- private final List mandatorymodules = Lists.newArrayList();
- private final List optionalmodules = Lists.newArrayList();
+ private final List mandatorymodules = Lists.newArrayList();
+ private final List optionalmodules = Lists.newArrayList();
/**
* @param key
@@ -56,7 +56,7 @@ public class DistributionSetTypeBuilder {
*/
public DistributionSetTypeBuilder mandatorymodules(final Long... softwareModuleTypeIds) {
for (final Long id : softwareModuleTypeIds) {
- final SoftwareModuleTypeAssigmentRest softwareModuleTypeAssigmentRest = new SoftwareModuleTypeAssigmentRest();
+ final MgmtSoftwareModuleTypeAssigment softwareModuleTypeAssigmentRest = new MgmtSoftwareModuleTypeAssigment();
softwareModuleTypeAssigmentRest.setId(id);
this.mandatorymodules.add(softwareModuleTypeAssigmentRest);
}
@@ -72,7 +72,7 @@ public class DistributionSetTypeBuilder {
*/
public DistributionSetTypeBuilder optionalmodules(final Long... softwareModuleTypeIds) {
for (final Long id : softwareModuleTypeIds) {
- final SoftwareModuleTypeAssigmentRest softwareModuleTypeAssigmentRest = new SoftwareModuleTypeAssigmentRest();
+ final MgmtSoftwareModuleTypeAssigment softwareModuleTypeAssigmentRest = new MgmtSoftwareModuleTypeAssigment();
softwareModuleTypeAssigmentRest.setId(id);
this.optionalmodules.add(softwareModuleTypeAssigmentRest);
}
@@ -81,17 +81,17 @@ public class DistributionSetTypeBuilder {
/**
* Builds a list with a single entry of
- * {@link DistributionSetTypeRequestBodyPost} which can directly be used in
+ * {@link MgmtDistributionSetTypeRequestBodyPost} which can directly be used in
* the RESTful-API.
*
- * @return a single entry list of {@link DistributionSetTypeRequestBodyPost}
+ * @return a single entry list of {@link MgmtDistributionSetTypeRequestBodyPost}
*/
- public List build() {
+ public List build() {
return Lists.newArrayList(doBuild(name, key));
}
/**
- * Builds a list of multiple {@link DistributionSetTypeRequestBodyPost} to
+ * Builds a list of multiple {@link MgmtDistributionSetTypeRequestBodyPost} to
* create multiple distribution set types at once. An increasing number will
* be added to the name and key of the distribution set type. The optional
* and mandatory software module types will remain the same.
@@ -99,10 +99,10 @@ public class DistributionSetTypeBuilder {
* @param count
* the amount of distribution sets type body which should be
* created
- * @return a list of {@link DistributionSetTypeRequestBodyPost}
+ * @return a list of {@link MgmtDistributionSetTypeRequestBodyPost}
*/
- public List buildAsList(final int count) {
- final ArrayList bodyList = Lists.newArrayList();
+ public List buildAsList(final int count) {
+ final ArrayList bodyList = Lists.newArrayList();
for (int index = 0; index < count; index++) {
bodyList.add(doBuild(name + index, key + index));
}
@@ -110,8 +110,8 @@ public class DistributionSetTypeBuilder {
}
- private DistributionSetTypeRequestBodyPost doBuild(final String prefixName, final String prefixKey) {
- final DistributionSetTypeRequestBodyPost body = new DistributionSetTypeRequestBodyPost();
+ private MgmtDistributionSetTypeRequestBodyPost doBuild(final String prefixName, final String prefixKey) {
+ final MgmtDistributionSetTypeRequestBodyPost body = new MgmtDistributionSetTypeRequestBodyPost();
body.setKey(prefixKey);
body.setName(prefixName);
body.setMandatorymodules(mandatorymodules);
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/RolloutBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/RolloutBuilder.java
index 2e01e0ba2..e9f8431d8 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/RolloutBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/RolloutBuilder.java
@@ -8,13 +8,13 @@
*/
package org.eclipse.hawkbit.mgmt.client.resource.builder;
-import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutCondition;
-import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutCondition.Condition;
-import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutRestRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.rollout.MgmtRolloutCondition;
+import org.eclipse.hawkbit.mgmt.json.model.rollout.MgmtRolloutRestRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.rollout.MgmtRolloutCondition.Condition;
/**
*
- * Builder pattern for building {@link RolloutRestRequestBody}.
+ * Builder pattern for building {@link MgmtRolloutRestRequestBody}.
*
*/
public class RolloutBuilder {
@@ -95,18 +95,18 @@ public class RolloutBuilder {
*
* @return the rest request body for creating a rollout
*/
- public RolloutRestRequestBody build() {
+ public MgmtRolloutRestRequestBody build() {
return doBuild();
}
- private RolloutRestRequestBody doBuild() {
- final RolloutRestRequestBody body = new RolloutRestRequestBody();
+ private MgmtRolloutRestRequestBody doBuild() {
+ final MgmtRolloutRestRequestBody body = new MgmtRolloutRestRequestBody();
body.setName(name);
body.setAmountGroups(groupSize);
body.setTargetFilterQuery(targetFilterQuery);
body.setDistributionSetId(distributionSetId);
- body.setSuccessCondition(new RolloutCondition(Condition.THRESHOLD, successThreshold));
- body.setErrorCondition(new RolloutCondition(Condition.THRESHOLD, errorThreshold));
+ body.setSuccessCondition(new MgmtRolloutCondition(Condition.THRESHOLD, successThreshold));
+ body.setErrorCondition(new MgmtRolloutCondition(Condition.THRESHOLD, errorThreshold));
return body;
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleAssigmentBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleAssigmentBuilder.java
index 8d69db619..a6003e2c5 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleAssigmentBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleAssigmentBuilder.java
@@ -11,11 +11,11 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleAssigmentRest;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
/**
*
- * Builder pattern for building {@link SoftwareModuleAssigmentRest}.
+ * Builder pattern for building {@link MgmtSoftwareModuleAssigment}.
*
*/
public class SoftwareModuleAssigmentBuilder {
@@ -37,15 +37,15 @@ public class SoftwareModuleAssigmentBuilder {
}
/**
- * Builds a list with a single entry of {@link SoftwareModuleAssigmentRest}
+ * Builds a list with a single entry of {@link MgmtSoftwareModuleAssigment}
* which can directly be used in the RESTful-API.
*
- * @return a single entry list of {@link SoftwareModuleAssigmentRest}
+ * @return a single entry list of {@link MgmtSoftwareModuleAssigment}
*/
- public List build() {
- final List softwareModuleAssigmentRestList = new ArrayList<>();
+ public List build() {
+ final List softwareModuleAssigmentRestList = new ArrayList<>();
for (final Long id : ids) {
- final SoftwareModuleAssigmentRest softwareModuleAssigmentRest = new SoftwareModuleAssigmentRest();
+ final MgmtSoftwareModuleAssigment softwareModuleAssigmentRest = new MgmtSoftwareModuleAssigment();
softwareModuleAssigmentRest.setId(id);
softwareModuleAssigmentRestList.add(softwareModuleAssigmentRest);
}
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleBuilder.java
index 4bbfd92b4..d1b38b2b6 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleBuilder.java
@@ -11,14 +11,14 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.distributionsettype.DistributionSetTypeRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleRequestBodyPost;
import com.google.common.collect.Lists;
/**
*
- * Builder pattern for building {@link SoftwareModuleRequestBodyPost}.
+ * Builder pattern for building {@link MgmtSoftwareModuleRequestBodyPost}.
*
*/
public class SoftwareModuleBuilder {
@@ -60,27 +60,27 @@ public class SoftwareModuleBuilder {
/**
* Builds a list with a single entry of
- * {@link SoftwareModuleRequestBodyPost} which can directly be used in the
+ * {@link MgmtSoftwareModuleRequestBodyPost} which can directly be used in the
* RESTful-API.
*
- * @return a single entry list of {@link SoftwareModuleRequestBodyPost}
+ * @return a single entry list of {@link MgmtSoftwareModuleRequestBodyPost}
*/
- public List build() {
+ public List build() {
return Lists.newArrayList(doBuild(name));
}
/**
- * Builds a list of multiple {@link SoftwareModuleRequestBodyPost} to create
+ * Builds a list of multiple {@link MgmtSoftwareModuleRequestBodyPost} to create
* multiple software module at once. An increasing number will be added to
* the name of the software module. The version and type will remain the
* same.
*
* @param count
* the amount of software module body which should be created
- * @return a list of {@link DistributionSetTypeRequestBodyPost}
+ * @return a list of {@link MgmtDistributionSetTypeRequestBodyPost}
*/
- public List buildAsList(final int count) {
- final ArrayList bodyList = Lists.newArrayList();
+ public List buildAsList(final int count) {
+ final ArrayList bodyList = Lists.newArrayList();
for (int index = 0; index < count; index++) {
bodyList.add(doBuild(name + index));
}
@@ -88,8 +88,8 @@ public class SoftwareModuleBuilder {
return bodyList;
}
- private SoftwareModuleRequestBodyPost doBuild(final String prefixName) {
- final SoftwareModuleRequestBodyPost body = new SoftwareModuleRequestBodyPost();
+ private MgmtSoftwareModuleRequestBodyPost doBuild(final String prefixName) {
+ final MgmtSoftwareModuleRequestBodyPost body = new MgmtSoftwareModuleRequestBodyPost();
body.setName(prefixName);
body.setVersion(version);
body.setType(type);
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleTypeBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleTypeBuilder.java
index a6472f0a0..749546442 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleTypeBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/SoftwareModuleTypeBuilder.java
@@ -11,14 +11,14 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeRequestBodyPost;
import com.google.common.collect.Lists;
/**
*
- * Builder pattern for building {@link SoftwareModuleRequestBodyPost}.
+ * Builder pattern for building {@link MgmtSoftwareModuleRequestBodyPost}.
*
*/
public class SoftwareModuleTypeBuilder {
@@ -60,35 +60,35 @@ public class SoftwareModuleTypeBuilder {
/**
* Builds a list with a single entry of
- * {@link SoftwareModuleTypeRequestBodyPost} which can directly be used in
+ * {@link MgmtSoftwareModuleTypeRequestBodyPost} which can directly be used in
* the RESTful-API.
*
- * @return a single entry list of {@link SoftwareModuleTypeRequestBodyPost}
+ * @return a single entry list of {@link MgmtSoftwareModuleTypeRequestBodyPost}
*/
- public List build() {
+ public List build() {
return Lists.newArrayList(doBuild(key, name));
}
/**
- * Builds a list of multiple {@link SoftwareModuleTypeRequestBodyPost} to
+ * Builds a list of multiple {@link MgmtSoftwareModuleTypeRequestBodyPost} to
* create multiple software module types at once. An increasing number will
* be added to the name and key of the software module type.
*
* @param count
* the amount of software module type bodies which should be
* created
- * @return a list of {@link SoftwareModuleTypeRequestBodyPost}
+ * @return a list of {@link MgmtSoftwareModuleTypeRequestBodyPost}
*/
- public List buildAsList(final int count) {
- final ArrayList bodyList = Lists.newArrayList();
+ public List buildAsList(final int count) {
+ final ArrayList bodyList = Lists.newArrayList();
for (int index = 0; index < count; index++) {
bodyList.add(doBuild(key + index, name + index));
}
return bodyList;
}
- private SoftwareModuleTypeRequestBodyPost doBuild(final String prefixKey, final String prefixName) {
- final SoftwareModuleTypeRequestBodyPost body = new SoftwareModuleTypeRequestBodyPost();
+ private MgmtSoftwareModuleTypeRequestBodyPost doBuild(final String prefixKey, final String prefixName) {
+ final MgmtSoftwareModuleTypeRequestBodyPost body = new MgmtSoftwareModuleTypeRequestBodyPost();
body.setKey(prefixKey);
body.setName(prefixName);
body.setDescription(description);
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TagBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TagBuilder.java
index 6f2eb3248..6718e631e 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TagBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TagBuilder.java
@@ -11,12 +11,12 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.tag.TagRequestBodyPut;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtTagRequestBodyPut;
import com.google.common.collect.Lists;
/**
- * Builder pattern for building {@link TagRequestBodyPut}.
+ * Builder pattern for building {@link MgmtTagRequestBodyPut}.
*
*/
public class TagBuilder {
@@ -56,26 +56,26 @@ public class TagBuilder {
}
/**
- * Builds a list with a single entry of {@link TagRequestBodyPut} which can
+ * Builds a list with a single entry of {@link MgmtTagRequestBodyPut} which can
* directly be used in the RESTful-API.
*
- * @return a single entry list of {@link TagRequestBodyPut}
+ * @return a single entry list of {@link MgmtTagRequestBodyPut}
*/
- public List build() {
+ public List build() {
return Lists.newArrayList(doBuild(name));
}
/**
- * Builds a list of multiple {@link TagRequestBodyPut} to create multiple
+ * Builds a list of multiple {@link MgmtTagRequestBodyPut} to create multiple
* tags at once. An increasing number will be added to the name of the tag.
* The color and description will remain the same.
*
* @param count
* the amount of distribution sets body which should be created
- * @return a list of {@link TagRequestBodyPut}
+ * @return a list of {@link MgmtTagRequestBodyPut}
*/
- public List buildAsList(final int count) {
- final ArrayList bodyList = Lists.newArrayList();
+ public List buildAsList(final int count) {
+ final ArrayList bodyList = Lists.newArrayList();
for (int index = 0; index < count; index++) {
bodyList.add(doBuild(name + index));
}
@@ -83,8 +83,8 @@ public class TagBuilder {
return bodyList;
}
- private TagRequestBodyPut doBuild(final String prefixName) {
- final TagRequestBodyPut body = new TagRequestBodyPut();
+ private MgmtTagRequestBodyPut doBuild(final String prefixName) {
+ final MgmtTagRequestBodyPut body = new MgmtTagRequestBodyPut();
body.setName(prefixName);
body.setDescription(description);
body.setColour(color);
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TargetBuilder.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TargetBuilder.java
index e496407e1..09b20339b 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TargetBuilder.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/resource/builder/TargetBuilder.java
@@ -11,14 +11,14 @@ package org.eclipse.hawkbit.mgmt.client.resource.builder;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTargetRequestBody;
import com.google.common.collect.Lists;
/**
*
- * Builder pattern for building {@link TargetRequestBody}.
+ * Builder pattern for building {@link MgmtTargetRequestBody}.
*
*/
public class TargetBuilder {
@@ -58,35 +58,35 @@ public class TargetBuilder {
}
/**
- * Builds a list with a single entry of {@link TargetRequestBody} which can
+ * Builds a list with a single entry of {@link MgmtTargetRequestBody} which can
* directly be used in the RESTful-API.
*
- * @return a single entry list of {@link TargetRequestBody}
+ * @return a single entry list of {@link MgmtTargetRequestBody}
*/
- public List build() {
+ public List build() {
return Lists.newArrayList(doBuild(controllerId));
}
/**
- * Builds a list of multiple {@link TargetRequestBody} to create multiple
+ * Builds a list of multiple {@link MgmtTargetRequestBody} to create multiple
* targets at once. An increasing number will be added to the controllerId
* of the target. The name and description will remain.
*
* @param count
* the amount of software module type bodies which should be
* created
- * @return a list of {@link SoftwareModuleTypeRequestBodyPost}
+ * @return a list of {@link MgmtSoftwareModuleTypeRequestBodyPost}
*/
- public List buildAsList(final int count) {
- final ArrayList bodyList = Lists.newArrayList();
+ public List buildAsList(final int count) {
+ final ArrayList bodyList = Lists.newArrayList();
for (int index = 0; index < count; index++) {
bodyList.add(doBuild(controllerId + index));
}
return bodyList;
}
- private TargetRequestBody doBuild(final String prefixControllerId) {
- final TargetRequestBody body = new TargetRequestBody();
+ private MgmtTargetRequestBody doBuild(final String prefixControllerId) {
+ final MgmtTargetRequestBody body = new MgmtTargetRequestBody();
body.setControllerId(prefixControllerId);
body.setName(name);
body.setDescription(description);
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/CreateStartedRolloutExample.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/CreateStartedRolloutExample.java
index cd74c0474..0e1093f1d 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/CreateStartedRolloutExample.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/CreateStartedRolloutExample.java
@@ -23,10 +23,10 @@ import org.eclipse.hawkbit.mgmt.client.resource.builder.SoftwareModuleAssigmentB
import org.eclipse.hawkbit.mgmt.client.resource.builder.SoftwareModuleBuilder;
import org.eclipse.hawkbit.mgmt.client.resource.builder.SoftwareModuleTypeBuilder;
import org.eclipse.hawkbit.mgmt.client.resource.builder.TargetBuilder;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
-import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutResponseBody;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
+import org.eclipse.hawkbit.mgmt.json.model.rollout.MgmtRolloutResponseBody;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -67,7 +67,7 @@ public class CreateStartedRolloutExample {
public void run() {
// create three SoftwareModuleTypes
- final List createdSoftwareModuleTypes = softwareModuleTypeResource
+ final List createdSoftwareModuleTypes = softwareModuleTypeResource
.createSoftwareModuleTypes(new SoftwareModuleTypeBuilder().key(SM_MODULE_TYPE).name(SM_MODULE_TYPE)
.maxAssignments(1).build())
.getBody();
@@ -78,12 +78,12 @@ public class CreateStartedRolloutExample {
.getBody();
// create one DistributionSet
- final List distributionSetsRest = distributionSetResource.createDistributionSets(
+ final List distributionSetsRest = distributionSetResource.createDistributionSets(
new DistributionSetBuilder().name("rollout-example").version("1.0.0").type(DS_MODULE_TYPE).build())
.getBody();
// create three SoftwareModules
- final List softwareModulesRest = softwareModuleResource
+ final List softwareModulesRest = softwareModuleResource
.createSoftwareModules(
new SoftwareModuleBuilder().name("firmware").version("1.0.0").type(SM_MODULE_TYPE).build())
.getBody();
@@ -97,7 +97,7 @@ public class CreateStartedRolloutExample {
.description("Targets used for rollout example").buildAsList(10));
// create a Rollout
- final RolloutResponseBody rolloutResponseBody = rolloutResource
+ final MgmtRolloutResponseBody rolloutResponseBody = rolloutResource
.create(new RolloutBuilder().name("MyRollout").groupSize(2).targetFilterQuery("name==00-FF-AA-0*")
.distributionSetId(distributionSetsRest.get(0).getDsId()).successThreshold("80")
.errorThreshold("50").build())
diff --git a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/GettingStartedDefaultScenario.java b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/GettingStartedDefaultScenario.java
index 5873403f0..43a98aff4 100644
--- a/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/GettingStartedDefaultScenario.java
+++ b/examples/hawkbit-mgmt-api-client/src/main/java/org/eclipse/hawkbit/mgmt/client/scenarios/GettingStartedDefaultScenario.java
@@ -19,9 +19,9 @@ import org.eclipse.hawkbit.mgmt.client.resource.builder.DistributionSetTypeBuild
import org.eclipse.hawkbit.mgmt.client.resource.builder.SoftwareModuleAssigmentBuilder;
import org.eclipse.hawkbit.mgmt.client.resource.builder.SoftwareModuleBuilder;
import org.eclipse.hawkbit.mgmt.client.resource.builder.SoftwareModuleTypeBuilder;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -70,7 +70,7 @@ public class GettingStartedDefaultScenario {
// create one SoftwareModuleTypes
LOGGER.info("Creating software module type {}", SM_MODULE_TYPE);
- final List createdSoftwareModuleTypes = softwareModuleTypeResource
+ final List createdSoftwareModuleTypes = softwareModuleTypeResource
.createSoftwareModuleTypes(new SoftwareModuleTypeBuilder().key(SM_MODULE_TYPE).name(SM_MODULE_TYPE)
.maxAssignments(1).build())
.getBody();
@@ -86,17 +86,17 @@ public class GettingStartedDefaultScenario {
final String dsVersion3 = "2.1.0";
LOGGER.info("Creating distribution set {}:{}", DS_EXAMPLE_NAME, dsVersion1);
- final List distributionSetsRest1 = distributionSetResource.createDistributionSets(
+ final List distributionSetsRest1 = distributionSetResource.createDistributionSets(
new DistributionSetBuilder().name(DS_EXAMPLE_NAME).version(dsVersion1).type(DS_MODULE_TYPE).build())
.getBody();
LOGGER.info("Creating distribution set {}:{}", DS_EXAMPLE_NAME, dsVersion2);
- final List distributionSetsRest2 = distributionSetResource.createDistributionSets(
+ final List distributionSetsRest2 = distributionSetResource.createDistributionSets(
new DistributionSetBuilder().name(DS_EXAMPLE_NAME).version(dsVersion2).type(DS_MODULE_TYPE).build())
.getBody();
LOGGER.info("Creating distribution set {}:{}", DS_EXAMPLE_NAME, dsVersion3);
- final List distributionSetsRest3 = distributionSetResource.createDistributionSets(
+ final List distributionSetsRest3 = distributionSetResource.createDistributionSets(
new DistributionSetBuilder().name(DS_EXAMPLE_NAME).version(dsVersion3).type(DS_MODULE_TYPE).build())
.getBody();
@@ -106,15 +106,15 @@ public class GettingStartedDefaultScenario {
final String swVersion3 = "3";
LOGGER.info("Creating distribution set {}:{}", SM_EXAMPLE_NAME, swVersion1);
- final List softwareModulesRest1 = softwareModuleResource.createSoftwareModules(
+ final List softwareModulesRest1 = softwareModuleResource.createSoftwareModules(
new SoftwareModuleBuilder().name(SM_EXAMPLE_NAME).version(swVersion1).type(SM_MODULE_TYPE).build())
.getBody();
LOGGER.info("Creating distribution set {}:{}", SM_EXAMPLE_NAME, swVersion2);
- final List softwareModulesRest2 = softwareModuleResource.createSoftwareModules(
+ final List softwareModulesRest2 = softwareModuleResource.createSoftwareModules(
new SoftwareModuleBuilder().name(SM_EXAMPLE_NAME).version(swVersion2).type(SM_MODULE_TYPE).build())
.getBody();
LOGGER.info("Creating distribution set {}:{}", SM_EXAMPLE_NAME, swVersion3);
- final List softwareModulesRest3 = softwareModuleResource.createSoftwareModules(
+ final List softwareModulesRest3 = softwareModuleResource.createSoftwareModules(
new SoftwareModuleBuilder().name(SM_EXAMPLE_NAME).version(swVersion3).type(SM_MODULE_TYPE).build())
.getBody();
diff --git a/hawkbit-autoconfigure/pom.xml b/hawkbit-autoconfigure/pom.xml
index dcbb95920..3fb623978 100644
--- a/hawkbit-autoconfigure/pom.xml
+++ b/hawkbit-autoconfigure/pom.xml
@@ -64,13 +64,19 @@
org.eclipse.hawkbit
- hawkbit-rest-resource
+ hawkbit-ddi-resource
${project.version}
true
org.eclipse.hawkbit
- hawkbit-ddi-resource
+ hawkbit-system-resource
+ ${project.version}
+ true
+
+
+ org.eclipse.hawkbit
+ hawkbit-mgmt-resource
${project.version}
true
diff --git a/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityManagedConfiguration.java b/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityManagedConfiguration.java
index 9638377eb..d337658b8 100644
--- a/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityManagedConfiguration.java
+++ b/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityManagedConfiguration.java
@@ -29,7 +29,6 @@ import org.eclipse.hawkbit.im.authentication.UserAuthenticationFilter;
import org.eclipse.hawkbit.repository.ControllerManagement;
import org.eclipse.hawkbit.repository.SystemManagement;
import org.eclipse.hawkbit.repository.TenantConfigurationManagement;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
import org.eclipse.hawkbit.security.ControllerTenantAwareAuthenticationDetailsSource;
import org.eclipse.hawkbit.security.DdiSecurityProperties;
import org.eclipse.hawkbit.security.DosFilter;
@@ -41,6 +40,7 @@ import org.eclipse.hawkbit.security.HttpControllerPreAuthenticatedSecurityHeader
import org.eclipse.hawkbit.security.HttpDownloadAuthenticationFilter;
import org.eclipse.hawkbit.security.PreAuthTokenSourceTrustAuthenticationProvider;
import org.eclipse.hawkbit.security.SystemSecurityContext;
+import org.eclipse.hawkbit.system.rest.api.SystemRestConstant;
import org.eclipse.hawkbit.tenancy.TenantAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -292,8 +292,9 @@ public class SecurityManagedConfiguration {
new AuthenticationSuccessTenantMetadataCreationFilter(tenantAware, systemManagement),
RequestHeaderAuthenticationFilter.class)
.authorizeRequests().anyRequest().authenticated()
- .antMatchers(RestConstants.BASE_SYSTEM_MAPPING + "/admin/**")
- .hasAnyAuthority(SpPermission.SYSTEM_ADMIN).antMatchers(RestConstants.BASE_SYSTEM_MAPPING + "/**")
+ .antMatchers(SystemRestConstant.BASE_SYSTEM_MAPPING + "/admin/**")
+ .hasAnyAuthority(SpPermission.SYSTEM_ADMIN)
+ .antMatchers(SystemRestConstant.BASE_SYSTEM_MAPPING + "/**")
.hasAnyAuthority(SpPermission.SYSTEM_DIAG);
}
}
diff --git a/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/web/ResourceControllerAutoConfiguration.java b/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/web/ResourceControllerAutoConfiguration.java
index ef489049f..34ed5ddcd 100644
--- a/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/web/ResourceControllerAutoConfiguration.java
+++ b/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/web/ResourceControllerAutoConfiguration.java
@@ -9,20 +9,19 @@
package org.eclipse.hawkbit.autoconfigure.web;
import org.eclipse.hawkbit.ddi.annotation.EnableDdiApi;
-import org.eclipse.hawkbit.rest.resource.EnableRestResources;
+import org.eclipse.hawkbit.mgmt.annotation.EnableMgmtApi;
+import org.eclipse.hawkbit.system.annotation.EnableSystemApi;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
/**
* Auto-Configuration for enabling the REST-Resources.
- *
- *
*
*/
@Configuration
-@ConditionalOnClass({ EnableDdiApi.class, EnableRestResources.class })
-@Import({ EnableDdiApi.class, EnableRestResources.class })
+@ConditionalOnClass({ EnableDdiApi.class, EnableMgmtApi.class, EnableSystemApi.class })
+@Import({ EnableDdiApi.class, EnableMgmtApi.class, EnableSystemApi.class })
public class ResourceControllerAutoConfiguration {
}
diff --git a/hawkbit-ddi-api/pom.xml b/hawkbit-ddi-api/pom.xml
index 6dd30fdf9..e91053fc5 100644
--- a/hawkbit-ddi-api/pom.xml
+++ b/hawkbit-ddi-api/pom.xml
@@ -1,4 +1,14 @@
-
+
+
4.0.0
@@ -9,12 +19,19 @@
hawkbit-ddi-api
hawkBit :: DDI API
-
-
+
+
- org.eclipse.hawkbit
- hawkbit-rest-api
- ${project.version}
+ org.springframework.hateoas
+ spring-hateoas
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ javax.validation
+ validation-api
javax.servlet
@@ -22,17 +39,12 @@
provided
- commons-io
- commons-io
- 2.4
+ org.hibernate
+ hibernate-validator
org.springframework.security
spring-security-web
-
- org.hibernate
- hibernate-validator
-
-
+
diff --git a/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifact.java b/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifact.java
index d39a44daa..5fc911946 100644
--- a/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifact.java
+++ b/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifact.java
@@ -10,13 +10,13 @@ package org.eclipse.hawkbit.ddi.json.model;
import javax.validation.constraints.NotNull;
-import org.eclipse.hawkbit.rest.resource.model.artifact.ArtifactHash;
import org.springframework.hateoas.ResourceSupport;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Download information for all artifacts related to a specific {@link DdiChunk}.
+ * Download information for all artifacts related to a specific {@link DdiChunk}
+ * .
*/
public class DdiArtifact extends ResourceSupport {
@@ -25,16 +25,16 @@ public class DdiArtifact extends ResourceSupport {
private String filename;
@JsonProperty
- private ArtifactHash hashes;
+ private DdiArtifactHash hashes;
@JsonProperty
private Long size;
- public ArtifactHash getHashes() {
+ public DdiArtifactHash getHashes() {
return hashes;
}
- public void setHashes(final ArtifactHash hashes) {
+ public void setHashes(final DdiArtifactHash hashes) {
this.hashes = hashes;
}
diff --git a/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHash.java b/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHash.java
new file mode 100644
index 000000000..9541055f8
--- /dev/null
+++ b/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHash.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.eclipse.hawkbit.ddi.json.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Hashes for given Artifact.
+ *
+ *
+ */
+public class DdiArtifactHash {
+
+ @JsonProperty
+ private String sha1;
+
+ @JsonProperty
+ private String md5;
+
+ /**
+ * Default constructor.
+ */
+ public DdiArtifactHash() {
+ }
+
+ /**
+ * Public constructor.
+ *
+ * @param sha1
+ * @param md5
+ */
+ public DdiArtifactHash(final String sha1, final String md5) {
+ this.sha1 = sha1;
+ this.md5 = md5;
+ }
+
+ /**
+ * @return the sha1
+ */
+ public String getSha1() {
+ return sha1;
+ }
+
+ /**
+ * @return the md5
+ */
+ public String getMd5() {
+ return md5;
+ }
+
+}
diff --git a/hawkbit-ddi-resource/pom.xml b/hawkbit-ddi-resource/pom.xml
index bcc1b4932..cafcfdf70 100644
--- a/hawkbit-ddi-resource/pom.xml
+++ b/hawkbit-ddi-resource/pom.xml
@@ -1,4 +1,14 @@
-
+
+
4.0.0
@@ -10,31 +20,26 @@
hawkbit-ddi-resource
hawkBit :: DDI Resources
-
-
+
+
org.eclipse.hawkbit
hawkbit-ddi-api
${project.version}
-
+
org.eclipse.hawkbit
- hawkbit-rest-resource
+ hawkbit-rest-core
${project.version}
-
-
+
+
org.eclipse.hawkbit
hawkbit-repository
${project.version}
+
+
-
- org.eclipse.hawkbit
- hawkbit-rest-resource
- ${project.version}
- test
- tests
-
org.springframework.boot
spring-boot-starter
diff --git a/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/annotation/EnableDdiApi.java b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/annotation/EnableDdiApi.java
similarity index 100%
rename from hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/annotation/EnableDdiApi.java
rename to hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/annotation/EnableDdiApi.java
diff --git a/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/ArtifactStoreController.java b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/ArtifactStoreController.java
similarity index 98%
rename from hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/ArtifactStoreController.java
rename to hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/ArtifactStoreController.java
index 61f3fd465..2a6d544ab 100644
--- a/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/ArtifactStoreController.java
+++ b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/ArtifactStoreController.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import java.io.IOException;
import java.util.List;
@@ -24,7 +24,7 @@ import org.eclipse.hawkbit.repository.model.Action.Status;
import org.eclipse.hawkbit.repository.model.ActionStatus;
import org.eclipse.hawkbit.repository.model.LocalArtifact;
import org.eclipse.hawkbit.repository.model.Target;
-import org.eclipse.hawkbit.rest.resource.helper.RestResourceConversionHelper;
+import org.eclipse.hawkbit.rest.util.RestResourceConversionHelper;
import org.eclipse.hawkbit.security.HawkbitSecurityProperties;
import org.eclipse.hawkbit.util.IpUtil;
import org.slf4j.Logger;
diff --git a/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/DataConversionHelper.java b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/DataConversionHelper.java
similarity index 95%
rename from hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/DataConversionHelper.java
rename to hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/DataConversionHelper.java
index 8533c6eac..2fd151f6e 100644
--- a/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/DataConversionHelper.java
+++ b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/DataConversionHelper.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn;
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import org.eclipse.hawkbit.api.ArtifactUrlHandler;
import org.eclipse.hawkbit.api.UrlProtocol;
import org.eclipse.hawkbit.ddi.json.model.DdiArtifact;
+import org.eclipse.hawkbit.ddi.json.model.DdiArtifactHash;
import org.eclipse.hawkbit.ddi.json.model.DdiChunk;
import org.eclipse.hawkbit.ddi.json.model.DdiConfig;
import org.eclipse.hawkbit.ddi.json.model.DdiControllerBase;
@@ -30,7 +31,6 @@ import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.Action.Status;
import org.eclipse.hawkbit.repository.model.LocalArtifact;
import org.eclipse.hawkbit.repository.model.Target;
-import org.eclipse.hawkbit.rest.resource.model.artifact.ArtifactHash;
import org.eclipse.hawkbit.tenancy.TenantAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.Link;
@@ -85,7 +85,7 @@ public final class DataConversionHelper {
final List files = new ArrayList<>();
module.getLocalArtifacts().forEach(artifact -> {
final DdiArtifact file = new DdiArtifact();
- file.setHashes(new ArtifactHash(artifact.getSha1Hash(), artifact.getMd5Hash()));
+ file.setHashes(new DdiArtifactHash(artifact.getSha1Hash(), artifact.getMd5Hash()));
file.setFilename(artifact.getFilename());
file.setSize(artifact.getSize());
final String linkHttp = artifactUrlHandler.getUrl(targetid, artifact.getSoftwareModule().getId(),
@@ -104,7 +104,8 @@ public final class DataConversionHelper {
static DdiControllerBase fromTarget(final Target target, final List actions,
final String defaultControllerPollTime, final TenantAware tenantAware) {
- final DdiControllerBase result = new DdiControllerBase(new DdiConfig(new DdiPolling(defaultControllerPollTime)));
+ final DdiControllerBase result = new DdiControllerBase(
+ new DdiConfig(new DdiPolling(defaultControllerPollTime)));
boolean addedUpdate = false;
boolean addedCancel = false;
diff --git a/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/RootController.java b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/RootController.java
similarity index 99%
rename from hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/RootController.java
rename to hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/RootController.java
index e48e2ec5f..4f485984b 100644
--- a/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/resource/RootController.java
+++ b/hawkbit-ddi-resource/src/main/java/org/eclipse/hawkbit/ddi/rest/resource/RootController.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import java.io.IOException;
import java.util.List;
@@ -40,7 +40,7 @@ import org.eclipse.hawkbit.repository.model.LocalArtifact;
import org.eclipse.hawkbit.repository.model.SoftwareModule;
import org.eclipse.hawkbit.repository.model.Target;
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
-import org.eclipse.hawkbit.rest.resource.helper.RestResourceConversionHelper;
+import org.eclipse.hawkbit.rest.util.RestResourceConversionHelper;
import org.eclipse.hawkbit.security.HawkbitSecurityProperties;
import org.eclipse.hawkbit.tenancy.TenantAware;
import org.eclipse.hawkbit.util.IpUtil;
diff --git a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/ArtifactDownloadTest.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java
similarity index 99%
rename from hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/ArtifactDownloadTest.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java
index f7173f86e..af65b1351 100644
--- a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/ArtifactDownloadTest.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.junit.Assert.assertTrue;
@@ -60,10 +60,10 @@ import ru.yandex.qatools.allure.annotations.Stories;
@ActiveProfiles({ "im", "test" })
@Features("Component Tests - Direct Device Integration API")
@Stories("Artifact Download Resource")
-public class ArtifactDownloadTest extends AbstractIntegrationTestWithMongoDB {
+public class DdiArtifactDownloadTest extends AbstractIntegrationTestWithMongoDB {
- public ArtifactDownloadTest() {
- LOG = LoggerFactory.getLogger(ArtifactDownloadTest.class);
+ public DdiArtifactDownloadTest() {
+ LOG = LoggerFactory.getLogger(DdiArtifactDownloadTest.class);
}
private volatile int downLoadProgress = 0;
diff --git a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/CancelActionTest.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java
similarity index 99%
rename from hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/CancelActionTest.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java
index 3c236c196..27a7e7f1f 100644
--- a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/CancelActionTest.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -23,13 +23,11 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.hawkbit.AbstractIntegrationTest;
-import org.eclipse.hawkbit.MockMvcResultPrinter;
import org.eclipse.hawkbit.TestDataUtil;
import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.Action.Status;
import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.Target;
-import org.eclipse.hawkbit.rest.resource.JsonBuilder;
import org.junit.Test;
import org.springframework.hateoas.MediaTypes;
import org.springframework.http.MediaType;
@@ -45,7 +43,7 @@ import ru.yandex.qatools.allure.annotations.Stories;
@ActiveProfiles({ "im", "test" })
@Features("Component Tests - Direct Device Integration API")
@Stories("Cancel Action Resource")
-public class CancelActionTest extends AbstractIntegrationTest {
+public class DdiCancelActionTest extends AbstractIntegrationTest {
@Test
@Description("Test of the controller can continue a started update even after a cancel command if it so desires.")
diff --git a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/ConfigDataTest.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfigDataTest.java
similarity index 97%
rename from hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/ConfigDataTest.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfigDataTest.java
index ee40d6ded..b757f1f1a 100644
--- a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/ConfigDataTest.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfigDataTest.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -22,9 +22,7 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.hawkbit.AbstractIntegrationTest;
-import org.eclipse.hawkbit.MockMvcResultPrinter;
import org.eclipse.hawkbit.repository.model.Target;
-import org.eclipse.hawkbit.rest.resource.JsonBuilder;
import org.junit.Test;
import org.springframework.hateoas.MediaTypes;
import org.springframework.http.MediaType;
@@ -40,7 +38,7 @@ import ru.yandex.qatools.allure.annotations.Stories;
@ActiveProfiles({ "im", "test" })
@Features("Component Tests - Direct Device Integration API")
@Stories("Config Data Resource")
-public class ConfigDataTest extends AbstractIntegrationTest {
+public class DdiConfigDataTest extends AbstractIntegrationTest {
@Test
@Description("We verify that the config data (i.e. device attributes like serial number, hardware revision etc.) "
diff --git a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/DeploymentBaseTest.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java
similarity index 99%
rename from hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/DeploymentBaseTest.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java
index 4ba5c9cdf..dd2f66a04 100644
--- a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/DeploymentBaseTest.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -26,7 +26,6 @@ import java.util.List;
import org.apache.commons.lang3.RandomUtils;
import org.eclipse.hawkbit.AbstractIntegrationTestWithMongoDB;
-import org.eclipse.hawkbit.MockMvcResultPrinter;
import org.eclipse.hawkbit.TestDataUtil;
import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.Action.ActionType;
@@ -36,7 +35,6 @@ import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.LocalArtifact;
import org.eclipse.hawkbit.repository.model.Target;
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
-import org.eclipse.hawkbit.rest.resource.JsonBuilder;
import org.fest.assertions.core.Condition;
import org.junit.Test;
import org.springframework.data.domain.PageRequest;
@@ -57,7 +55,7 @@ import ru.yandex.qatools.allure.annotations.Stories;
@ActiveProfiles({ "im", "test" })
@Features("Component Tests - Direct Device Integration API")
@Stories("Deployment Action Resource")
-public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
+public class DdiDeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
@Test()
@Description("Ensures that artifacts are not found, when softare module does not exists.")
diff --git a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/RootControllerTest.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java
similarity index 98%
rename from hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/RootControllerTest.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java
index be390959a..f291393b9 100644
--- a/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/resource/RootControllerTest.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.ddi.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -23,7 +23,6 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.hawkbit.AbstractIntegrationTestWithMongoDB;
-import org.eclipse.hawkbit.MockMvcResultPrinter;
import org.eclipse.hawkbit.TestDataUtil;
import org.eclipse.hawkbit.WithSpringAuthorityRule;
import org.eclipse.hawkbit.WithUser;
@@ -33,7 +32,6 @@ import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.Target;
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
-import org.eclipse.hawkbit.rest.resource.JsonBuilder;
import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationKey;
import org.eclipse.hawkbit.util.IpUtil;
import org.junit.Test;
@@ -51,7 +49,7 @@ import ru.yandex.qatools.allure.annotations.Stories;
@ActiveProfiles({ "im", "test" })
@Features("Component Tests - Direct Device Integration API")
@Stories("Root Poll Resource")
-public class RootControllerTest extends AbstractIntegrationTestWithMongoDB {
+public class DdiRootControllerTest extends AbstractIntegrationTestWithMongoDB {
@Test
@Description("Ensures that targets cannot be created e.g. in plug'n play scenarios when tenant does not exists but can be created if the tenant exists.")
diff --git a/hawkbit-rest-resource/src/test/java/org/eclipse/hawkbit/rest/resource/JsonBuilder.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/JsonBuilder.java
similarity index 99%
rename from hawkbit-rest-resource/src/test/java/org/eclipse/hawkbit/rest/resource/JsonBuilder.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/JsonBuilder.java
index dec0bb070..cf791bcf8 100644
--- a/hawkbit-rest-resource/src/test/java/org/eclipse/hawkbit/rest/resource/JsonBuilder.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/JsonBuilder.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource;
+package org.eclipse.hawkbit.ddi.rest.resource;
import java.util.ArrayList;
import java.util.List;
diff --git a/hawkbit-rest-resource/src/test/java/org/eclipse/hawkbit/MockMvcResultPrinter.java b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/MockMvcResultPrinter.java
similarity index 97%
rename from hawkbit-rest-resource/src/test/java/org/eclipse/hawkbit/MockMvcResultPrinter.java
rename to hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/MockMvcResultPrinter.java
index b01bb4e9f..ba5020c58 100644
--- a/hawkbit-rest-resource/src/test/java/org/eclipse/hawkbit/MockMvcResultPrinter.java
+++ b/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/MockMvcResultPrinter.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit;
+package org.eclipse.hawkbit.ddi.rest.resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/hawkbit-mgmt-api/pom.xml b/hawkbit-mgmt-api/pom.xml
new file mode 100644
index 000000000..4c99cd7bc
--- /dev/null
+++ b/hawkbit-mgmt-api/pom.xml
@@ -0,0 +1,53 @@
+
+
+ 4.0.0
+
+ org.eclipse.hawkbit
+ hawkbit-parent
+ 0.2.0-SNAPSHOT
+
+ hawkbit-mgmt-api
+ hawkBit :: Mgmt REST API
+
+
+
+ org.springframework.hateoas
+ spring-hateoas
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ javax.validation
+ validation-api
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+
+
+ org.easytesting
+ fest-assert
+ test
+
+
+ ru.yandex.qatools.allure
+ allure-junit-adaptor
+ test
+
+
+
\ No newline at end of file
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/MetadataRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MetadataRest.java
similarity index 96%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/MetadataRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MetadataRest.java
index a5c24c4a9..70cfff0d0 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/MetadataRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MetadataRest.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model;
+package org.eclipse.hawkbit.mgmt.json.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/BaseEntityRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java
similarity index 94%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/BaseEntityRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java
index 6d80a407c..728734050 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/BaseEntityRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model;
+package org.eclipse.hawkbit.mgmt.json.model;
import org.springframework.hateoas.ResourceSupport;
@@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* A json annotated rest model for BaseEntity to RESTful API representation.
*
*/
-public abstract class BaseEntityRest extends ResourceSupport {
+public abstract class MgmtBaseEntity extends ResourceSupport {
@JsonProperty
private String createdBy;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/IdRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtId.java
similarity index 92%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/IdRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtId.java
index d15114d4e..e83c43d52 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/IdRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtId.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model;
+package org.eclipse.hawkbit.mgmt.json.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -18,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
-public class IdRest {
+public class MgmtId {
@JsonProperty
private Long id;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/NamedEntityRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java
similarity index 91%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/NamedEntityRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java
index d82d14f75..d335261ad 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/NamedEntityRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model;
+package org.eclipse.hawkbit.mgmt.json.model;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* A json annotated rest model for NamedEntity to RESTful API representation.
*
*/
-public abstract class NamedEntityRest extends BaseEntityRest {
+public abstract class MgmtNamedEntity extends MgmtBaseEntity {
@JsonProperty(required = true)
private String name;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/PollStatusRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java
similarity index 95%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/PollStatusRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java
index d66d02512..5e5163a6a 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/PollStatusRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model;
+package org.eclipse.hawkbit.mgmt.json.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class PollStatusRest {
+public class MgmtPollStatus {
@JsonProperty
private Long lastRequestAt;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/PagedList.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java
similarity index 97%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/PagedList.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java
index 9d5cc458c..173f3ce31 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/PagedList.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model;
+package org.eclipse.hawkbit.mgmt.json.model;
import java.util.List;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/action/ActionRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java
similarity index 92%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/action/ActionRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java
index 630bcb993..5b63b5f69 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/action/ActionRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.action;
+package org.eclipse.hawkbit.mgmt.json.model.action;
-import org.eclipse.hawkbit.rest.resource.model.BaseEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ActionRest extends BaseEntityRest {
+public class MgmtAction extends MgmtBaseEntity {
/**
* API definition for {@link UpdateAction}.
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/action/ActionStatusRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java
similarity index 97%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/action/ActionStatusRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java
index e5af39bac..26120d2d5 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/action/ActionStatusRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.action;
+package org.eclipse.hawkbit.mgmt.json.model.action;
import java.util.List;
@@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ActionStatusRest {
+public class MgmtActionStatus {
/**
* Action is finished successfully for this target.
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/artifact/ArtifactRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java
similarity index 90%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/artifact/ArtifactRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java
index f32a32ed8..35ad382e7 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/artifact/ArtifactRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.artifact;
+package org.eclipse.hawkbit.mgmt.json.model.artifact;
-import org.eclipse.hawkbit.rest.resource.model.BaseEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -22,7 +22,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ArtifactRest extends BaseEntityRest {
+public class MgmtArtifact extends MgmtBaseEntity {
+
@JsonProperty(required = true)
private ArtifactType type;
@@ -30,7 +31,7 @@ public class ArtifactRest extends BaseEntityRest {
private Long artifactId;
@JsonProperty
- private ArtifactHash hashes;
+ private MgmtArtifactHash hashes;
@JsonProperty
private String providedFilename;
@@ -51,7 +52,7 @@ public class ArtifactRest extends BaseEntityRest {
* the hashes to set
*/
@JsonIgnore
- public void setHashes(final ArtifactHash hashes) {
+ public void setHashes(final MgmtArtifactHash hashes) {
this.hashes = hashes;
}
@@ -81,7 +82,7 @@ public class ArtifactRest extends BaseEntityRest {
/**
* @return the hashes
*/
- public ArtifactHash getHashes() {
+ public MgmtArtifactHash getHashes() {
return hashes;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/artifact/ArtifactHash.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifactHash.java
similarity index 83%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/artifact/ArtifactHash.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifactHash.java
index 58b81d8fd..d43ae4339 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/artifact/ArtifactHash.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifactHash.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.artifact;
+package org.eclipse.hawkbit.mgmt.json.model.artifact;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
*
*/
-public class ArtifactHash {
+public class MgmtArtifactHash {
@JsonProperty
private String sha1;
@@ -26,7 +26,7 @@ public class ArtifactHash {
/**
* Default constructor.
*/
- public ArtifactHash() {
+ public MgmtArtifactHash() {
}
/**
@@ -35,7 +35,7 @@ public class ArtifactHash {
* @param sha1
* @param md5
*/
- public ArtifactHash(final String sha1, final String md5) {
+ public MgmtArtifactHash(final String sha1, final String md5) {
super();
this.sha1 = sha1;
this.md5 = md5;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/ActionTypeRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionType.java
similarity index 85%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/ActionTypeRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionType.java
index bf6a649a0..98017d18a 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/ActionTypeRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionType.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionset;
+package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
*
*
*/
-public enum ActionTypeRest {
+public enum MgmtActionType {
/**
* The soft action type.
*/
@@ -35,7 +35,7 @@ public enum ActionTypeRest {
private final String name;
- private ActionTypeRest(final String name) {
+ private MgmtActionType(final String name) {
this.name = name;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java
similarity index 86%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java
index 2ff764eba..7caaf4cdd 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java
@@ -6,13 +6,13 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionset;
+package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class DistributionSetRest extends NamedEntityRest {
+public class MgmtDistributionSet extends MgmtNamedEntity {
@JsonProperty(value = "id", required = true)
private Long dsId;
@@ -39,7 +39,7 @@ public class DistributionSetRest extends NamedEntityRest {
private String version;
@JsonProperty
- private List modules = new ArrayList<>();
+ private List modules = new ArrayList<>();
@JsonProperty
private boolean requiredMigrationStep;
@@ -99,7 +99,7 @@ public class DistributionSetRest extends NamedEntityRest {
/**
* @return the modules
*/
- public List getModules() {
+ public List getModules() {
return modules;
}
@@ -107,7 +107,7 @@ public class DistributionSetRest extends NamedEntityRest {
* @param modules
* the modules to set
*/
- public void setModules(final List modules) {
+ public void setModules(final List modules) {
this.modules = modules;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRequestBodyPost.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java
similarity index 67%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRequestBodyPost.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java
index bf5470d72..a56b5aaba 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRequestBodyPost.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java
@@ -6,11 +6,11 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionset;
+package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleAssigmentRest;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -23,22 +23,22 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPut {
+public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetRequestBodyPut {
// deprecated format from the time where os, application and runtime where
// statically defined
@JsonProperty
- private SoftwareModuleAssigmentRest os;
+ private MgmtSoftwareModuleAssigment os;
@JsonProperty
- private SoftwareModuleAssigmentRest runtime;
+ private MgmtSoftwareModuleAssigment runtime;
@JsonProperty
- private SoftwareModuleAssigmentRest application;
+ private MgmtSoftwareModuleAssigment application;
// deprecated format - END
@JsonProperty
- private List modules;
+ private List modules;
@JsonProperty
private boolean requiredMigrationStep;
@@ -49,7 +49,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
/**
* @return the os
*/
- public SoftwareModuleAssigmentRest getOs() {
+ public MgmtSoftwareModuleAssigment getOs() {
return os;
}
@@ -59,7 +59,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
*
* @return updated body
*/
- public DistributionSetRequestBodyPost setOs(final SoftwareModuleAssigmentRest os) {
+ public MgmtDistributionSetRequestBodyPost setOs(final MgmtSoftwareModuleAssigment os) {
this.os = os;
return this;
}
@@ -67,7 +67,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
/**
* @return the runtime
*/
- public SoftwareModuleAssigmentRest getRuntime() {
+ public MgmtSoftwareModuleAssigment getRuntime() {
return runtime;
}
@@ -77,7 +77,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
*
* @return updated body
*/
- public DistributionSetRequestBodyPost setRuntime(final SoftwareModuleAssigmentRest runtime) {
+ public MgmtDistributionSetRequestBodyPost setRuntime(final MgmtSoftwareModuleAssigment runtime) {
this.runtime = runtime;
return this;
@@ -86,7 +86,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
/**
* @return the application
*/
- public SoftwareModuleAssigmentRest getApplication() {
+ public MgmtSoftwareModuleAssigment getApplication() {
return application;
}
@@ -96,7 +96,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
*
* @return updated body
*/
- public DistributionSetRequestBodyPost setApplication(final SoftwareModuleAssigmentRest application) {
+ public MgmtDistributionSetRequestBodyPost setApplication(final MgmtSoftwareModuleAssigment application) {
this.application = application;
return this;
@@ -115,7 +115,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
*
* @return updated body
*/
- public DistributionSetRequestBodyPost setRequiredMigrationStep(final boolean requiredMigrationStep) {
+ public MgmtDistributionSetRequestBodyPost setRequiredMigrationStep(final boolean requiredMigrationStep) {
this.requiredMigrationStep = requiredMigrationStep;
return this;
@@ -124,7 +124,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
/**
* @return the modules
*/
- public List getModules() {
+ public List getModules() {
return modules;
}
@@ -134,7 +134,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
*
* @return updated body
*/
- public DistributionSetRequestBodyPost setModules(final List modules) {
+ public MgmtDistributionSetRequestBodyPost setModules(final List modules) {
this.modules = modules;
return this;
@@ -153,7 +153,7 @@ public class DistributionSetRequestBodyPost extends DistributionSetRequestBodyPu
*
* @return updated body
*/
- public DistributionSetRequestBodyPost setType(final String type) {
+ public MgmtDistributionSetRequestBodyPost setType(final String type) {
this.type = type;
return this;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRequestBodyPut.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPut.java
similarity index 82%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRequestBodyPut.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPut.java
index 2f19625f3..4494dd8a8 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/DistributionSetRequestBodyPut.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPut.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionset;
+package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class DistributionSetRequestBodyPut {
+public class MgmtDistributionSetRequestBodyPut {
@JsonProperty
private String name;
@@ -43,7 +43,7 @@ public class DistributionSetRequestBodyPut {
*
* @return updated body
*/
- public DistributionSetRequestBodyPut setName(final String name) {
+ public MgmtDistributionSetRequestBodyPut setName(final String name) {
this.name = name;
return this;
}
@@ -61,7 +61,7 @@ public class DistributionSetRequestBodyPut {
*
* @return updated body
*/
- public DistributionSetRequestBodyPut setDescription(final String description) {
+ public MgmtDistributionSetRequestBodyPut setDescription(final String description) {
this.description = description;
return this;
@@ -80,7 +80,7 @@ public class DistributionSetRequestBodyPut {
*
* @return updated body
*/
- public DistributionSetRequestBodyPut setVersion(final String version) {
+ public MgmtDistributionSetRequestBodyPut setVersion(final String version) {
this.version = version;
return this;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/TargetAssignmentRequestBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentRequestBody.java
similarity index 85%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/TargetAssignmentRequestBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentRequestBody.java
index 5135a977c..46c43ac8b 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/TargetAssignmentRequestBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentRequestBody.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionset;
+package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -16,14 +16,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
-public class TargetAssignmentRequestBody {
+public class MgmtTargetAssignmentRequestBody {
@JsonProperty
private String id;
private long forcetime;
- private ActionTypeRest type;
+ private MgmtActionType type;
/**
* @return the id
@@ -43,7 +43,7 @@ public class TargetAssignmentRequestBody {
/**
* @return the type
*/
- public ActionTypeRest getType() {
+ public MgmtActionType getType() {
return type;
}
@@ -51,7 +51,7 @@ public class TargetAssignmentRequestBody {
* @param type
* the type to set
*/
- public void setType(final ActionTypeRest type) {
+ public void setType(final MgmtActionType type) {
this.type = type;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/TargetAssignmentResponseBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java
similarity index 93%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/TargetAssignmentResponseBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java
index 77676f844..d5247c577 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionset/TargetAssignmentResponseBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionset;
+package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class TargetAssignmentResponseBody {
+public class MgmtTargetAssignmentResponseBody {
private int assigned;
private int alreadyAssigned;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRequestBodyPost.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java
similarity index 68%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRequestBodyPost.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java
index ba0f548f6..82ecb2cc5 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRequestBodyPost.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java
@@ -6,11 +6,11 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionsettype;
+package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeAssigmentRest;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -18,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request Body for DistributionSetType POST.
*
*/
-public class DistributionSetTypeRequestBodyPost {
+public class MgmtDistributionSetTypeRequestBodyPost {
@JsonProperty(required = true)
private String name;
@@ -30,10 +30,10 @@ public class DistributionSetTypeRequestBodyPost {
private String key;
@JsonProperty
- private List mandatorymodules;
+ private List mandatorymodules;
@JsonProperty
- private List optionalmodules;
+ private List optionalmodules;
/**
* @return the name
@@ -48,7 +48,7 @@ public class DistributionSetTypeRequestBodyPost {
*
* @return updated body
*/
- public DistributionSetTypeRequestBodyPost setName(final String name) {
+ public MgmtDistributionSetTypeRequestBodyPost setName(final String name) {
this.name = name;
return this;
}
@@ -66,7 +66,7 @@ public class DistributionSetTypeRequestBodyPost {
*
* @return updated body
*/
- public DistributionSetTypeRequestBodyPost setDescription(final String description) {
+ public MgmtDistributionSetTypeRequestBodyPost setDescription(final String description) {
this.description = description;
return this;
}
@@ -84,7 +84,7 @@ public class DistributionSetTypeRequestBodyPost {
*
* @return updated body
*/
- public DistributionSetTypeRequestBodyPost setKey(final String key) {
+ public MgmtDistributionSetTypeRequestBodyPost setKey(final String key) {
this.key = key;
return this;
}
@@ -92,7 +92,7 @@ public class DistributionSetTypeRequestBodyPost {
/**
* @return the mandatory modules
*/
- public List getMandatorymodules() {
+ public List getMandatorymodules() {
return mandatorymodules;
}
@@ -102,8 +102,8 @@ public class DistributionSetTypeRequestBodyPost {
*
* @return updated body
*/
- public DistributionSetTypeRequestBodyPost setMandatorymodules(
- final List mandatorymodules) {
+ public MgmtDistributionSetTypeRequestBodyPost setMandatorymodules(
+ final List mandatorymodules) {
this.mandatorymodules = mandatorymodules;
return this;
}
@@ -111,7 +111,7 @@ public class DistributionSetTypeRequestBodyPost {
/**
* @return the optional modules
*/
- public List getOptionalmodules() {
+ public List getOptionalmodules() {
return optionalmodules;
}
@@ -121,8 +121,8 @@ public class DistributionSetTypeRequestBodyPost {
*
* @return updated body
*/
- public DistributionSetTypeRequestBodyPost setOptionalmodules(
- final List optionalmodules) {
+ public MgmtDistributionSetTypeRequestBodyPost setOptionalmodules(
+ final List optionalmodules) {
this.optionalmodules = optionalmodules;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRequestBodyPut.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java
similarity index 79%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRequestBodyPut.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java
index 6bf21b93f..220f58e4d 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRequestBodyPut.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionsettype;
+package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request Body for DistributionSetType PUT, i.e. update.
*
*/
-public class DistributionSetTypeRequestBodyPut {
+public class MgmtDistributionSetTypeRequestBodyPut {
@JsonProperty
private String description;
@@ -32,7 +32,7 @@ public class DistributionSetTypeRequestBodyPut {
*
* @return updated body
*/
- public DistributionSetTypeRequestBodyPut setDescription(final String description) {
+ public MgmtDistributionSetTypeRequestBodyPut setDescription(final String description) {
this.description = description;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRest.java
similarity index 87%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRest.java
index e282b2924..5717863d1 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/distributionsettype/DistributionSetTypeRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRest.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.distributionsettype;
+package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class DistributionSetTypeRest extends NamedEntityRest {
+public class MgmtDistributionSetTypeRest extends MgmtNamedEntity {
@JsonProperty(value = "id", required = true)
private Long moduleId;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutCondition.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java
similarity index 84%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutCondition.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java
index 914a5d5c2..d83585415 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutCondition.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.rollout;
+package org.eclipse.hawkbit.mgmt.json.model.rollout;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class RolloutCondition {
+public class MgmtRolloutCondition {
private Condition condition = Condition.THRESHOLD;
private String expression = "100";
@@ -25,10 +25,11 @@ public class RolloutCondition {
/**
*
*/
- public RolloutCondition() {
+ public MgmtRolloutCondition() {
+ // needed for jackson json creator.
}
- public RolloutCondition(final Condition condition, final String expression) {
+ public MgmtRolloutCondition(final Condition condition, final String expression) {
this.condition = condition;
this.expression = expression;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutErrorAction.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java
similarity index 93%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutErrorAction.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java
index 2ed6077e6..71fdf3ac9 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutErrorAction.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.rollout;
+package org.eclipse.hawkbit.mgmt.json.model.rollout;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class RolloutErrorAction {
+public class MgmtRolloutErrorAction {
private ErrorAction action = ErrorAction.PAUSE;
private String expression = null;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutResponseBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java
similarity index 94%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutResponseBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java
index dd1296cfd..79455f501 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutResponseBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java
@@ -6,12 +6,12 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.rollout;
+package org.eclipse.hawkbit.mgmt.json.model.rollout;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class RolloutResponseBody extends NamedEntityRest {
+public class MgmtRolloutResponseBody extends MgmtNamedEntity {
private String targetFilterQuery;
private Long distributionSetId;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutRestRequestBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java
similarity index 72%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutRestRequestBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java
index 0b83948ff..f3bdb2665 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutRestRequestBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java
@@ -6,10 +6,10 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.rollout;
+package org.eclipse.hawkbit.mgmt.json.model.rollout;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.ActionTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -21,26 +21,26 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class RolloutRestRequestBody extends NamedEntityRest {
+public class MgmtRolloutRestRequestBody extends MgmtNamedEntity {
private String targetFilterQuery;
private long distributionSetId;
private int amountGroups = 1;
- private RolloutCondition successCondition = new RolloutCondition();
- private RolloutSuccessAction successAction = new RolloutSuccessAction();
- private RolloutCondition errorCondition = null;
- private RolloutErrorAction errorAction = null;
+ private MgmtRolloutCondition successCondition = new MgmtRolloutCondition();
+ private MgmtRolloutSuccessAction successAction = new MgmtRolloutSuccessAction();
+ private MgmtRolloutCondition errorCondition = null;
+ private MgmtRolloutErrorAction errorAction = null;
private Long forcetime;
- private ActionTypeRest type;
+ private MgmtActionType type;
/**
* @return the finishCondition
*/
- public RolloutCondition getSuccessCondition() {
+ public MgmtRolloutCondition getSuccessCondition() {
return successCondition;
}
@@ -48,14 +48,14 @@ public class RolloutRestRequestBody extends NamedEntityRest {
* @param successCondition
* the finishCondition to set
*/
- public void setSuccessCondition(final RolloutCondition successCondition) {
+ public void setSuccessCondition(final MgmtRolloutCondition successCondition) {
this.successCondition = successCondition;
}
/**
* @return the successAction
*/
- public RolloutSuccessAction getSuccessAction() {
+ public MgmtRolloutSuccessAction getSuccessAction() {
return successAction;
}
@@ -63,14 +63,14 @@ public class RolloutRestRequestBody extends NamedEntityRest {
* @param successAction
* the successAction to set
*/
- public void setSuccessAction(final RolloutSuccessAction successAction) {
+ public void setSuccessAction(final MgmtRolloutSuccessAction successAction) {
this.successAction = successAction;
}
/**
* @return the errorCondition
*/
- public RolloutCondition getErrorCondition() {
+ public MgmtRolloutCondition getErrorCondition() {
return errorCondition;
}
@@ -78,7 +78,7 @@ public class RolloutRestRequestBody extends NamedEntityRest {
* @param errorCondition
* the errorCondition to set
*/
- public void setErrorCondition(final RolloutCondition errorCondition) {
+ public void setErrorCondition(final MgmtRolloutCondition errorCondition) {
this.errorCondition = errorCondition;
}
@@ -145,7 +145,7 @@ public class RolloutRestRequestBody extends NamedEntityRest {
/**
* @return the type
*/
- public ActionTypeRest getType() {
+ public MgmtActionType getType() {
return type;
}
@@ -153,14 +153,14 @@ public class RolloutRestRequestBody extends NamedEntityRest {
* @param type
* the type to set
*/
- public void setType(final ActionTypeRest type) {
+ public void setType(final MgmtActionType type) {
this.type = type;
}
/**
* @return the errorAction
*/
- public RolloutErrorAction getErrorAction() {
+ public MgmtRolloutErrorAction getErrorAction() {
return errorAction;
}
@@ -168,7 +168,7 @@ public class RolloutRestRequestBody extends NamedEntityRest {
* @param errorAction
* the errorAction to set
*/
- public void setErrorAction(final RolloutErrorAction errorAction) {
+ public void setErrorAction(final MgmtRolloutErrorAction errorAction) {
this.errorAction = errorAction;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutSuccessAction.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java
similarity index 84%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutSuccessAction.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java
index f14e9a8bf..174aa63fa 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rollout/RolloutSuccessAction.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.rollout;
+package org.eclipse.hawkbit.mgmt.json.model.rollout;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class RolloutSuccessAction {
+public class MgmtRolloutSuccessAction {
private SuccessAction action = SuccessAction.NEXTGROUP;
private String expression = null;
@@ -25,10 +25,11 @@ public class RolloutSuccessAction {
/**
*
*/
- public RolloutSuccessAction() {
+ public MgmtRolloutSuccessAction() {
+ // needed for json creator
}
- public RolloutSuccessAction(final SuccessAction action, final String expression) {
+ public MgmtRolloutSuccessAction(final SuccessAction action, final String expression) {
this.action = action;
this.expression = expression;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rolloutgroup/RolloutGroupResponseBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java
similarity index 88%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rolloutgroup/RolloutGroupResponseBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java
index bb1b0116e..5e740a1fb 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/rolloutgroup/RolloutGroupResponseBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.rolloutgroup;
+package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class RolloutGroupResponseBody extends NamedEntityRest {
+public class MgmtRolloutGroupResponseBody extends MgmtNamedEntity {
@JsonProperty(value = "id", required = true)
private Long rolloutGroupId;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java
similarity index 93%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java
index a5ab41c8b..fe47347a9 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremodule;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class SoftwareModuleRest extends NamedEntityRest {
+public class MgmtSoftwareModule extends MgmtNamedEntity {
/**
* API definition for {@link SoftwareModule.Type#RUNTIME}.
*/
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleAssigmentRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleAssigment.java
similarity index 73%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleAssigmentRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleAssigment.java
index 3c866dca6..79bc31ad3 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleAssigmentRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleAssigment.java
@@ -6,20 +6,17 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremodule;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
-import org.eclipse.hawkbit.rest.resource.model.IdRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Request Body of SoftwareModule for assignment operations (ID only).
*
- *
- *
- *
*/
@JsonIgnoreProperties(ignoreUnknown = true)
-public class SoftwareModuleAssigmentRest extends IdRest {
+public class MgmtSoftwareModuleAssigment extends MgmtId {
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRequestBodyPost.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java
similarity index 80%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRequestBodyPost.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java
index 08638c10f..e39413915 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRequestBodyPost.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremodule;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request Body for SoftwareModule POST.
*
*/
-public class SoftwareModuleRequestBodyPost {
+public class MgmtSoftwareModuleRequestBodyPost {
@JsonProperty(required = true)
private String name;
@@ -44,7 +44,7 @@ public class SoftwareModuleRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPost setName(final String name) {
+ public MgmtSoftwareModuleRequestBodyPost setName(final String name) {
this.name = name;
return this;
}
@@ -62,7 +62,7 @@ public class SoftwareModuleRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPost setVersion(final String version) {
+ public MgmtSoftwareModuleRequestBodyPost setVersion(final String version) {
this.version = version;
return this;
}
@@ -80,7 +80,7 @@ public class SoftwareModuleRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPost setType(final String type) {
+ public MgmtSoftwareModuleRequestBodyPost setType(final String type) {
this.type = type;
return this;
}
@@ -98,7 +98,7 @@ public class SoftwareModuleRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPost setDescription(final String description) {
+ public MgmtSoftwareModuleRequestBodyPost setDescription(final String description) {
this.description = description;
return this;
}
@@ -116,7 +116,7 @@ public class SoftwareModuleRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPost setVendor(final String vendor) {
+ public MgmtSoftwareModuleRequestBodyPost setVendor(final String vendor) {
this.vendor = vendor;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRequestBodyPut.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java
similarity index 80%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRequestBodyPut.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java
index 1ee547886..52c097e39 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremodule/SoftwareModuleRequestBodyPut.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremodule;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request Body for SoftwareModule PUT.
*
*/
-public class SoftwareModuleRequestBodyPut {
+public class MgmtSoftwareModuleRequestBodyPut {
@JsonProperty
private String description;
@@ -35,7 +35,7 @@ public class SoftwareModuleRequestBodyPut {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPut setDescription(final String description) {
+ public MgmtSoftwareModuleRequestBodyPut setDescription(final String description) {
this.description = description;
return this;
}
@@ -53,7 +53,7 @@ public class SoftwareModuleRequestBodyPut {
*
* @return updated body
*/
- public SoftwareModuleRequestBodyPut setVendor(final String vendor) {
+ public MgmtSoftwareModuleRequestBodyPut setVendor(final String vendor) {
this.vendor = vendor;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java
similarity index 90%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java
index ed05c1ee4..c0cda4994 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremoduletype;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class SoftwareModuleTypeRest extends NamedEntityRest {
+public class MgmtSoftwareModuleType extends MgmtNamedEntity {
@JsonProperty(value = "id", required = true)
private Long moduleId;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeAssigmentRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeAssigment.java
similarity index 73%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeAssigmentRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeAssigment.java
index 68709650b..43bdc157e 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeAssigmentRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeAssigment.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremoduletype;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
-import org.eclipse.hawkbit.rest.resource.model.IdRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -17,6 +17,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
-public class SoftwareModuleTypeAssigmentRest extends IdRest {
+public class MgmtSoftwareModuleTypeAssigment extends MgmtId {
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRequestBodyPost.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPost.java
similarity index 79%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRequestBodyPost.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPost.java
index 3528f6b98..836c39d19 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRequestBodyPost.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPost.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremoduletype;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request Body for SoftwareModuleType POST.
*
*/
-public class SoftwareModuleTypeRequestBodyPost {
+public class MgmtSoftwareModuleTypeRequestBodyPost {
@JsonProperty(required = true)
private String name;
@@ -41,7 +41,7 @@ public class SoftwareModuleTypeRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleTypeRequestBodyPost setName(final String name) {
+ public MgmtSoftwareModuleTypeRequestBodyPost setName(final String name) {
this.name = name;
return this;
}
@@ -59,7 +59,7 @@ public class SoftwareModuleTypeRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleTypeRequestBodyPost setDescription(final String description) {
+ public MgmtSoftwareModuleTypeRequestBodyPost setDescription(final String description) {
this.description = description;
return this;
}
@@ -76,7 +76,7 @@ public class SoftwareModuleTypeRequestBodyPost {
* the key to set
* @return updated body
*/
- public SoftwareModuleTypeRequestBodyPost setKey(final String key) {
+ public MgmtSoftwareModuleTypeRequestBodyPost setKey(final String key) {
this.key = key;
return this;
}
@@ -94,7 +94,7 @@ public class SoftwareModuleTypeRequestBodyPost {
*
* @return updated body
*/
- public SoftwareModuleTypeRequestBodyPost setMaxAssignments(final int maxAssignments) {
+ public MgmtSoftwareModuleTypeRequestBodyPost setMaxAssignments(final int maxAssignments) {
this.maxAssignments = maxAssignments;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRequestBodyPut.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java
similarity index 79%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRequestBodyPut.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java
index 107a3cd2b..ecc8c9f65 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/softwaremoduletype/SoftwareModuleTypeRequestBodyPut.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.softwaremoduletype;
+package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request Body for SoftwareModuleType PUT.
*
*/
-public class SoftwareModuleTypeRequestBodyPut {
+public class MgmtSoftwareModuleTypeRequestBodyPut {
@JsonProperty
private String description;
@@ -32,7 +32,7 @@ public class SoftwareModuleTypeRequestBodyPut {
*
* @return updated body
*/
- public SoftwareModuleTypeRequestBodyPut setDescription(final String description) {
+ public MgmtSoftwareModuleTypeRequestBodyPut setDescription(final String description) {
this.description = description;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/AssignedDistributionSetRequestBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java
similarity index 81%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/AssignedDistributionSetRequestBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java
index 2bfd6cbf8..469780abf 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/AssignedDistributionSetRequestBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.tag;
+package org.eclipse.hawkbit.mgmt.json.model.tag;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class AssignedDistributionSetRequestBody {
+public class MgmtAssignedDistributionSetRequestBody {
@JsonProperty(value = "id", required = true)
private Long distributionSetId;
@@ -28,7 +28,7 @@ public class AssignedDistributionSetRequestBody {
return distributionSetId;
}
- public AssignedDistributionSetRequestBody setDistributionSetId(final Long distributionSetId) {
+ public MgmtAssignedDistributionSetRequestBody setDistributionSetId(final Long distributionSetId) {
this.distributionSetId = distributionSetId;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/AssignedTargetRequestBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java
similarity index 83%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/AssignedTargetRequestBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java
index 2147c2697..6df1d10d7 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/AssignedTargetRequestBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.tag;
+package org.eclipse.hawkbit.mgmt.json.model.tag;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class AssignedTargetRequestBody {
+public class MgmtAssignedTargetRequestBody {
@JsonProperty(required = true)
private String controllerId;
@@ -28,7 +28,7 @@ public class AssignedTargetRequestBody {
return controllerId;
}
- public AssignedTargetRequestBody setControllerId(final String controllerId) {
+ public MgmtAssignedTargetRequestBody setControllerId(final String controllerId) {
this.controllerId = controllerId;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/DistributionSetTagAssigmentResultRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java
similarity index 61%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/DistributionSetTagAssigmentResultRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java
index 2078fe891..892bac453 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/DistributionSetTagAssigmentResultRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java
@@ -6,11 +6,11 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.tag;
+package org.eclipse.hawkbit.mgmt.json.model.tag;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -24,27 +24,27 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class DistributionSetTagAssigmentResultRest {
+public class MgmtDistributionSetTagAssigmentResult {
@JsonProperty
- private List assignedDistributionSets;
+ private List assignedDistributionSets;
@JsonProperty
- private List unassignedDistributionSets;
+ private List unassignedDistributionSets;
- public List getAssignedDistributionSets() {
+ public List getAssignedDistributionSets() {
return assignedDistributionSets;
}
- public List getUnassignedDistributionSets() {
+ public List getUnassignedDistributionSets() {
return unassignedDistributionSets;
}
- public void setAssignedDistributionSets(final List assignedDistributionSets) {
+ public void setAssignedDistributionSets(final List assignedDistributionSets) {
this.assignedDistributionSets = assignedDistributionSets;
}
- public void setUnassignedDistributionSets(final List unassignedDistributionSets) {
+ public void setUnassignedDistributionSets(final List unassignedDistributionSets) {
this.unassignedDistributionSets = unassignedDistributionSets;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TagRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java
similarity index 87%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TagRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java
index 54d3c5064..82c33b434 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TagRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java
@@ -6,9 +6,9 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.tag;
+package org.eclipse.hawkbit.mgmt.json.model.tag;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class TagRest extends NamedEntityRest {
+public class MgmtTag extends MgmtNamedEntity {
@JsonProperty(value = "id", required = true)
private Long tagId;
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TagRequestBodyPut.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java
similarity index 80%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TagRequestBodyPut.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java
index 2165bcfc0..e7037af2b 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TagRequestBodyPut.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.tag;
+package org.eclipse.hawkbit.mgmt.json.model.tag;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class TagRequestBodyPut {
+public class MgmtTagRequestBodyPut {
@JsonProperty
private String colour;
@@ -34,7 +34,7 @@ public class TagRequestBodyPut {
return name;
}
- public TagRequestBodyPut setName(final String name) {
+ public MgmtTagRequestBodyPut setName(final String name) {
this.name = name;
return this;
}
@@ -43,12 +43,12 @@ public class TagRequestBodyPut {
return description;
}
- public TagRequestBodyPut setDescription(final String description) {
+ public MgmtTagRequestBodyPut setDescription(final String description) {
this.description = description;
return this;
}
- public TagRequestBodyPut setColour(final String colour) {
+ public MgmtTagRequestBodyPut setColour(final String colour) {
this.colour = colour;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TargetTagAssigmentResultRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java
similarity index 67%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TargetTagAssigmentResultRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java
index 30d47cc90..61625e59d 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/tag/TargetTagAssigmentResultRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java
@@ -6,11 +6,11 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.model.tag;
+package org.eclipse.hawkbit.mgmt.json.model.tag;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -24,27 +24,27 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class TargetTagAssigmentResultRest {
+public class MgmtTargetTagAssigmentResult {
@JsonProperty
- private List assignedTargets;
+ private List assignedTargets;
@JsonProperty
- private List unassignedTargets;
+ private List unassignedTargets;
- public void setAssignedTargets(final List assignedTargets) {
+ public void setAssignedTargets(final List assignedTargets) {
this.assignedTargets = assignedTargets;
}
- public List getAssignedTargets() {
+ public List getAssignedTargets() {
return assignedTargets;
}
- public void setUnassignedTargets(final List unassignedTargets) {
+ public void setUnassignedTargets(final List unassignedTargets) {
this.unassignedTargets = unassignedTargets;
}
- public List getUnassignedTargets() {
+ public List getUnassignedTargets() {
return unassignedTargets;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/DistributionSetAssigmentRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtDistributionSetAssigment.java
similarity index 64%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/DistributionSetAssigmentRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtDistributionSetAssigment.java
index c2dc7f4a9..edfcc5687 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/DistributionSetAssigmentRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtDistributionSetAssigment.java
@@ -1,23 +1,23 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
-package org.eclipse.hawkbit.rest.resource.model.target;
+package org.eclipse.hawkbit.mgmt.json.model.target;
-import org.eclipse.hawkbit.rest.resource.model.IdRest;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.ActionTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
/**
* Request Body of DistributionSet for assignment operations (ID only).
*
*/
-public class DistributionSetAssigmentRest extends IdRest {
+public class MgmtDistributionSetAssigment extends MgmtId {
private long forcetime;
- private ActionTypeRest type;
+ private MgmtActionType type;
/**
* @return the type
*/
- public ActionTypeRest getType() {
+ public MgmtActionType getType() {
return type;
}
@@ -25,7 +25,7 @@ public class DistributionSetAssigmentRest extends IdRest {
* @param type
* the type to set
*/
- public void setType(final ActionTypeRest type) {
+ public void setType(final MgmtActionType type) {
this.type = type;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetRest.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java
similarity index 90%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetRest.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java
index 37baeeec9..40dd553a5 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetRest.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java
@@ -1,12 +1,12 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
-package org.eclipse.hawkbit.rest.resource.model.target;
+package org.eclipse.hawkbit.mgmt.json.model.target;
import java.net.URI;
-import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
-import org.eclipse.hawkbit.rest.resource.model.PollStatusRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class TargetRest extends NamedEntityRest {
+public class MgmtTarget extends MgmtNamedEntity {
@JsonProperty(required = true)
private String controllerId;
@@ -41,7 +41,7 @@ public class TargetRest extends NamedEntityRest {
private String address;
@JsonProperty
- private PollStatusRest pollStatus;
+ private MgmtPollStatus pollStatus;
@JsonProperty
private String securityToken;
@@ -111,7 +111,7 @@ public class TargetRest extends NamedEntityRest {
/**
* @return the pollStatus
*/
- public PollStatusRest getPollStatus() {
+ public MgmtPollStatus getPollStatus() {
return pollStatus;
}
@@ -120,7 +120,7 @@ public class TargetRest extends NamedEntityRest {
* the pollStatus to set
*/
@JsonIgnore
- public void setPollStatus(final PollStatusRest pollStatus) {
+ public void setPollStatus(final MgmtPollStatus pollStatus) {
this.pollStatus = pollStatus;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetAttributes.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAttributes.java
similarity index 63%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetAttributes.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAttributes.java
index 821be6b45..dad8e868f 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetAttributes.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAttributes.java
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
-package org.eclipse.hawkbit.rest.resource.model.target;
+package org.eclipse.hawkbit.mgmt.json.model.target;
import java.util.HashMap;
import java.util.Map;
@@ -10,6 +10,6 @@ import java.util.Map;
* {@link Map} with attributes of SP Target.
*
*/
-public class TargetAttributes extends HashMap {
+public class MgmtTargetAttributes extends HashMap {
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetRequestBody.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java
similarity index 78%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetRequestBody.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java
index bc1ca8a63..bc40326e4 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/model/target/TargetRequestBody.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
-package org.eclipse.hawkbit.rest.resource.model.target;
+package org.eclipse.hawkbit.mgmt.json.model.target;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* Request body for target PUT/POST commands.
*
*/
-public class TargetRequestBody {
+public class MgmtTargetRequestBody {
@JsonProperty(required = true)
private String name;
@@ -43,7 +43,7 @@ public class TargetRequestBody {
* @param name
* the name to set
*/
- public TargetRequestBody setName(final String name) {
+ public MgmtTargetRequestBody setName(final String name) {
this.name = name;
return this;
}
@@ -52,7 +52,7 @@ public class TargetRequestBody {
* @param description
* the description to set
*/
- public TargetRequestBody setDescription(final String description) {
+ public MgmtTargetRequestBody setDescription(final String description) {
this.description = description;
return this;
}
@@ -61,7 +61,7 @@ public class TargetRequestBody {
* @param controllerId
* the controllerId to set
*/
- public TargetRequestBody setControllerId(final String controllerId) {
+ public MgmtTargetRequestBody setControllerId(final String controllerId) {
this.controllerId = controllerId;
return this;
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java
similarity index 76%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java
index 80caefc94..26788760e 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java
@@ -7,21 +7,20 @@
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.MetadataRest;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRequestBodyPut;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.TargetAssignmentRequestBody;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.TargetAssignmentResponseBody;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleAssigmentRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
+import org.eclipse.hawkbit.mgmt.json.model.MetadataRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSetRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSetRequestBodyPut;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtTargetAssignmentRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtTargetAssignmentResponseBody;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -33,8 +32,8 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* REST Resource handling for DistributionSet CRUD operations.
*/
-@RequestMapping(RestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING)
-public interface DistributionSetRestApi {
+@RequestMapping(MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING)
+public interface MgmtDistributionSetRestApi {
/**
* Handles the GET request of retrieving all DistributionSets .
@@ -56,11 +55,11 @@ public interface DistributionSetRestApi {
* JsonResponseExceptionHandler is handling the response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getDistributionSets(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ public ResponseEntity> getDistributionSets(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single DistributionSet .
@@ -75,7 +74,7 @@ public interface DistributionSetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getDistributionSet(
+ public ResponseEntity getDistributionSet(
@PathVariable("distributionSetId") final Long distributionSetId);
/**
@@ -91,8 +90,8 @@ public interface DistributionSetRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE,
"application/hal+json" }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createDistributionSets(
- @RequestBody final List sets);
+ public ResponseEntity> createDistributionSets(
+ @RequestBody final List sets);
/**
* Handles the DELETE request for a single DistributionSet .
@@ -118,9 +117,9 @@ public interface DistributionSetRestApi {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{distributionSetId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity updateDistributionSet(
+ public ResponseEntity updateDistributionSet(
@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestBody final DistributionSetRequestBodyPut toUpdate);
+ @RequestBody final MgmtDistributionSetRequestBodyPut toUpdate);
/**
* Handles the GET request of retrieving assigned targets to a specific
@@ -146,12 +145,12 @@ public interface DistributionSetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}/assignedTargets", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> getAssignedTargets(
+ public ResponseEntity> getAssignedTargets(
@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving installed targets to a specific
@@ -177,12 +176,12 @@ public interface DistributionSetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}/installedTargets", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> getInstalledTargets(
+ public ResponseEntity> getInstalledTargets(
@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the POST request of assigning multiple targets to a single
@@ -200,9 +199,9 @@ public interface DistributionSetRestApi {
@RequestMapping(method = RequestMethod.POST, value = "/{distributionSetId}/assignedTargets", consumes = {
"application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity createAssignedTarget(
+ public ResponseEntity createAssignedTarget(
@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestBody final List targetIds);
+ @RequestBody final List targetIds);
/**
* Gets a paged list of meta data for a distribution set.
@@ -228,10 +227,10 @@ public interface DistributionSetRestApi {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
public ResponseEntity> getMetadata(
@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Gets a single meta data value for a specific key of a distribution set.
@@ -311,7 +310,7 @@ public interface DistributionSetRestApi {
MediaType.APPLICATION_JSON_VALUE,
"application/hal+json" }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
public ResponseEntity assignSoftwareModules(@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestBody final List softwareModuleIDs);
+ @RequestBody final List softwareModuleIDs);
/**
* Deletes the assignment of the software module form the distribution set.
@@ -355,9 +354,9 @@ public interface DistributionSetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}/assignedSM", produces = {
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getAssignedSoftwareModules(
+ public ResponseEntity> getAssignedSoftwareModules(
@PathVariable("distributionSetId") final Long distributionSetId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam);
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam);
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetTagRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetTagRestApi.java
similarity index 72%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetTagRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetTagRestApi.java
index 83f29bb17..316f2a56e 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetTagRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetTagRestApi.java
@@ -2,21 +2,20 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
-import org.eclipse.hawkbit.rest.resource.model.tag.AssignedDistributionSetRequestBody;
-import org.eclipse.hawkbit.rest.resource.model.tag.DistributionSetTagAssigmentResultRest;
-import org.eclipse.hawkbit.rest.resource.model.tag.TagRequestBodyPut;
-import org.eclipse.hawkbit.rest.resource.model.tag.TagRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtAssignedDistributionSetRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtDistributionSetTagAssigmentResult;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtTag;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtTagRequestBodyPut;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -29,8 +28,8 @@ import org.springframework.web.bind.annotation.RequestParam;
* REST Resource handling for DistributionSetTag CRUD operations.
*
*/
-@RequestMapping(RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING)
-public interface DistributionSetTagRestApi {
+@RequestMapping(MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING)
+public interface MgmtDistributionSetTagRestApi {
/**
* Handles the GET request of retrieving all DistributionSet tags.
*
@@ -52,11 +51,11 @@ public interface DistributionSetTagRestApi {
* JsonResponseExceptionHandler is handling the response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getDistributionSetTags(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getDistributionSetTags(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single distribution set tag.
@@ -71,7 +70,7 @@ public interface DistributionSetTagRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionsetTagId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getDistributionSetTag(
+ ResponseEntity getDistributionSetTag(
@PathVariable("distributionsetTagId") final Long distributionsetTagId);
/**
@@ -86,7 +85,7 @@ public interface DistributionSetTagRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createDistributionSetTags(@RequestBody final List tags);
+ ResponseEntity> createDistributionSetTags(@RequestBody final List tags);
/**
*
@@ -104,9 +103,9 @@ public interface DistributionSetTagRestApi {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{distributionsetTagId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity updateDistributionSetTag(
+ ResponseEntity updateDistributionSetTag(
@PathVariable("distributionsetTagId") final Long distributionsetTagId,
- @RequestBody final TagRequestBodyPut restDSTagRest);
+ @RequestBody final MgmtTagRequestBodyPut restDSTagRest);
/**
* Handles the DELETE request for a single distribution set tag.
@@ -120,7 +119,7 @@ public interface DistributionSetTagRestApi {
*
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{distributionsetTagId}")
- public ResponseEntity deleteDistributionSetTag(
+ ResponseEntity deleteDistributionSetTag(
@PathVariable("distributionsetTagId") final Long distributionsetTagId);
/**
@@ -135,8 +134,8 @@ public interface DistributionSetTagRestApi {
* in case the given {@code distributionsetTagId} doesn't
* exists.
*/
- @RequestMapping(method = RequestMethod.GET, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
- public ResponseEntity> getAssignedDistributionSets(
+ @RequestMapping(method = RequestMethod.GET, value = MgmtRestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
+ ResponseEntity> getAssignedDistributionSets(
@PathVariable("distributionsetTagId") final Long distributionsetTagId);
/**
@@ -154,11 +153,11 @@ public interface DistributionSetTagRestApi {
* in case the given {@code distributionsetTagId} doesn't
* exists.
*/
- @RequestMapping(method = RequestMethod.POST, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING
+ @RequestMapping(method = RequestMethod.POST, value = MgmtRestConstants.DISTRIBUTIONSET_REQUEST_MAPPING
+ "/toggleTagAssignment")
- public ResponseEntity toggleTagAssignment(
+ ResponseEntity toggleTagAssignment(
@PathVariable("distributionsetTagId") final Long distributionsetTagId,
- @RequestBody final List assignedDSRequestBodies);
+ @RequestBody final List assignedDSRequestBodies);
/**
* Handles the POST request to assign distribution sets to the given tag id.
@@ -173,10 +172,10 @@ public interface DistributionSetTagRestApi {
* in case the given {@code distributionsetTagId} doesn't
* exists.
*/
- @RequestMapping(method = RequestMethod.POST, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
- public ResponseEntity> assignDistributionSets(
+ @RequestMapping(method = RequestMethod.POST, value = MgmtRestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
+ ResponseEntity> assignDistributionSets(
@PathVariable("distributionsetTagId") final Long distributionsetTagId,
- @RequestBody final List assignedDSRequestBodies);
+ @RequestBody final List assignedDSRequestBodies);
/**
* Handles the DELETE request to unassign all distribution set from the
@@ -189,8 +188,8 @@ public interface DistributionSetTagRestApi {
* in case the given {@code distributionsetTagId} doesn't
* exists.
*/
- @RequestMapping(method = RequestMethod.DELETE, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
- public ResponseEntity unassignDistributionSets(
+ @RequestMapping(method = RequestMethod.DELETE, value = MgmtRestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
+ ResponseEntity unassignDistributionSets(
@PathVariable("distributionsetTagId") final Long distributionsetTagId);
/**
@@ -206,9 +205,8 @@ public interface DistributionSetTagRestApi {
* in case the given {@code distributionsetTagId} doesn't
* exists.
*/
- @RequestMapping(method = RequestMethod.DELETE, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING
+ @RequestMapping(method = RequestMethod.DELETE, value = MgmtRestConstants.DISTRIBUTIONSET_REQUEST_MAPPING
+ "/{distributionsetId}")
- public ResponseEntity unassignDistributionSet(
- @PathVariable("distributionsetTagId") final Long distributionsetTagId,
+ ResponseEntity unassignDistributionSet(@PathVariable("distributionsetTagId") final Long distributionsetTagId,
@PathVariable("distributionsetId") final Long distributionsetId);
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetTypeRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetTypeRestApi.java
similarity index 72%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetTypeRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetTypeRestApi.java
index 1900d8d7d..28af107f7 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/DistributionSetTypeRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetTypeRestApi.java
@@ -2,21 +2,20 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.IdRest;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.distributionsettype.DistributionSetTypeRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.distributionsettype.DistributionSetTypeRequestBodyPut;
-import org.eclipse.hawkbit.rest.resource.model.distributionsettype.DistributionSetTypeRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRequestBodyPut;
+import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleType;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -30,8 +29,8 @@ import org.springframework.web.bind.annotation.RequestParam;
* operations.
*
*/
-@RequestMapping(RestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING)
-public interface DistributionSetTypeRestApi {
+@RequestMapping(MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING)
+public interface MgmtDistributionSetTypeRestApi {
/**
* Handles the GET request of retrieving all DistributionSetTypes.
@@ -55,11 +54,11 @@ public interface DistributionSetTypeRestApi {
* response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getDistributionSetTypes(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getDistributionSetTypes(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single DistributionSetType
@@ -74,7 +73,7 @@ public interface DistributionSetTypeRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getDistributionSetType(
+ ResponseEntity getDistributionSetType(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId);
/**
@@ -86,7 +85,7 @@ public interface DistributionSetTypeRestApi {
*
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{distributionSetTypeId}")
- public ResponseEntity deleteDistributionSetType(
+ ResponseEntity deleteDistributionSetType(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId);
/**
@@ -100,9 +99,9 @@ public interface DistributionSetTypeRestApi {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{distributionSetTypeId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity updateDistributionSetType(
+ ResponseEntity updateDistributionSetType(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
- @RequestBody final DistributionSetTypeRequestBodyPut restDistributionSetType);
+ @RequestBody final MgmtDistributionSetTypeRequestBodyPut restDistributionSetType);
/**
* Handles the POST request of creating new DistributionSetTypes. The
@@ -117,8 +116,8 @@ public interface DistributionSetTypeRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createDistributionSetTypes(
- @RequestBody final List distributionSetTypes);
+ ResponseEntity> createDistributionSetTypes(
+ @RequestBody final List distributionSetTypes);
/**
* Handles the GET request of retrieving the list of mandatory software
@@ -129,9 +128,9 @@ public interface DistributionSetTypeRestApi {
* @return Unpaged list of module types and OK in case of success.
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, produces = { "application/hal+json",
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getMandatoryModules(
+ ResponseEntity> getMandatoryModules(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId);
/**
@@ -145,9 +144,9 @@ public interface DistributionSetTypeRestApi {
* @return Unpaged list of module types and OK in case of success.
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES
+ "/{softwareModuleTypeId}", produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getMandatoryModule(
+ ResponseEntity getMandatoryModule(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId);
@@ -162,9 +161,9 @@ public interface DistributionSetTypeRestApi {
* @return Unpaged list of module types and OK in case of success.
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES
+ "/{softwareModuleTypeId}", produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getOptionalModule(
+ ResponseEntity getOptionalModule(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId);
@@ -177,9 +176,9 @@ public interface DistributionSetTypeRestApi {
* @return Unpaged list of module types and OK in case of success.
*/
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, produces = { "application/hal+json",
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getOptionalModules(
+ ResponseEntity> getOptionalModules(
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId);
/**
@@ -194,10 +193,9 @@ public interface DistributionSetTypeRestApi {
* @return OK if the request was successful
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES
+ "/{softwareModuleTypeId}", produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity removeMandatoryModule(
- @PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
+ ResponseEntity removeMandatoryModule(@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId);
/**
@@ -212,10 +210,9 @@ public interface DistributionSetTypeRestApi {
* @return OK if the request was successful
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES
+ "/{softwareModuleTypeId}", produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity removeOptionalModule(
- @PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
+ ResponseEntity removeOptionalModule(@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId);
/**
@@ -230,11 +227,11 @@ public interface DistributionSetTypeRestApi {
* @return OK if the request was successful
*/
@RequestMapping(method = RequestMethod.POST, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, consumes = { "application/hal+json",
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity addMandatoryModule(
- @PathVariable("distributionSetTypeId") final Long distributionSetTypeId, @RequestBody final IdRest smtId);
+ ResponseEntity addMandatoryModule(@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
+ @RequestBody final MgmtId smtId);
/**
* Handles the POST request for adding an optional software module type to a
@@ -248,10 +245,10 @@ public interface DistributionSetTypeRestApi {
* @return OK if the request was successful
*/
@RequestMapping(method = RequestMethod.POST, value = "/{distributionSetTypeId}/"
- + RestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, consumes = { "application/hal+json",
+ + MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity addOptionalModule(
- @PathVariable("distributionSetTypeId") final Long distributionSetTypeId, @RequestBody final IdRest smtId);
+ ResponseEntity addOptionalModule(@PathVariable("distributionSetTypeId") final Long distributionSetTypeId,
+ @RequestBody final MgmtId smtId);
}
diff --git a/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java
new file mode 100644
index 000000000..e07d77f2f
--- /dev/null
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.eclipse.hawkbit.mgmt.rest.api;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ *
+ */
+@RequestMapping(MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING)
+public interface MgmtDownloadArtifactRestApi {
+
+ /**
+ * Handles the GET request for downloading an artifact.
+ *
+ * @param softwareModuleId
+ * of the parent SoftwareModule
+ * @param artifactId
+ * of the related LocalArtifact
+ * @param servletResponse
+ * of the servlet
+ * @param request
+ * of the client
+ *
+ * @return responseEntity with status ok if successful
+ */
+ @RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}/artifacts/{artifactId}/download")
+ @ResponseBody
+ ResponseEntity downloadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ @PathVariable("artifactId") final Long artifactId, final HttpServletResponse servletResponse,
+ final HttpServletRequest request);
+
+}
diff --git a/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadRestApi.java
new file mode 100644
index 000000000..c7caed01b
--- /dev/null
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadRestApi.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.eclipse.hawkbit.mgmt.rest.api;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * A resource for download artifacts.
+ *
+ */
+@RequestMapping(MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE)
+public interface MgmtDownloadRestApi {
+
+ /**
+ * Handles the GET request for downloading an artifact.
+ *
+ * @param downloadId
+ * the generated download id
+ * @param response
+ * of the servlet
+ * @return {@link ResponseEntity} with status {@link HttpStatus#OK} if
+ * successful
+ */
+ @RequestMapping(method = RequestMethod.GET, value = MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING)
+ @ResponseBody
+ ResponseEntity downloadArtifactByDownloadId(@PathVariable final String downloadId,
+ final HttpServletResponse response);
+
+}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/RestConstants.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRestConstants.java
similarity index 92%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/RestConstants.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRestConstants.java
index bde96f7a8..d8f395568 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/RestConstants.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRestConstants.java
@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource;
+package org.eclipse.hawkbit.mgmt.rest.api;
/**
* Constants for RESTful API.
@@ -14,23 +14,13 @@ package org.eclipse.hawkbit.rest.resource;
*
*
*/
-public final class RestConstants {
+public final class MgmtRestConstants {
/**
* API version definition. We are using only major versions.
*/
public static final String API_VERSION = "v1";
- /**
- * The base URL mapping for the spring acuator management context path.
- */
- public static final String BASE_SYSTEM_MAPPING = "/system";
-
- /**
- * URL mapping for system admin operations.
- */
- public static final String SYSTEM_ADMIN_MAPPING = BASE_SYSTEM_MAPPING + "/admin";
-
/**
* The base URL mapping of the SP rest resources.
*/
@@ -50,6 +40,64 @@ public final class RestConstants {
*/
public static final String REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT = "50";
+ /**
+ * The software module URL mapping rest resource.
+ */
+ public static final String SOFTWAREMODULE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremodules";
+
+ public static final String DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE = "/api/" + API_VERSION + "/downloadserver/";
+ public static final String DOWNLOAD_ID_V1_REQUEST_MAPPING = "downloadId/{downloadId}";
+
+ /**
+ * The target URL mapping, href link for assigned distribution set.
+ */
+ public static final String TARGET_V1_ASSIGNED_DISTRIBUTION_SET = "assignedDS";
+ /**
+ * The target URL mapping, href link for installed distribution set.
+ */
+ public static final String TARGET_V1_INSTALLED_DISTRIBUTION_SET = "installedDS";
+ /**
+ * The target URL mapping, href link for target attributes.
+ */
+ public static final String TARGET_V1_ATTRIBUTES = "attributes";
+ /**
+ * The target URL mapping, href link for target actions.
+ */
+ public static final String TARGET_V1_ACTIONS = "actions";
+ /**
+ * The target URL mapping, href link for canceled actions.
+ */
+ public static final String TARGET_V1_CANCELED_ACTION = "canceledaction";
+ /**
+ * The target URL mapping, href link for canceled actions.
+ */
+ public static final String TARGET_V1_ACTION_STATUS = "status";
+
+ /**
+ * The target URL mapping rest resource.
+ */
+ public static final String TARGET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targets";
+
+ /**
+ * The tag URL mapping rest resource.
+ */
+ public static final String TARGET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targettags";
+ /**
+ * The tag URL mapping rest resource.
+ */
+ public static final String TARGET_TAG_TAGERTS_REQUEST_MAPPING = "/{targetTagId}/targets";
+
+ /**
+ * The tag URL mapping rest resource.
+ */
+ public static final String DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING
+ + "/distributionsettags";
+
+ /**
+ * The tag URL mapping rest resource.
+ */
+ public static final String DISTRIBUTIONSET_REQUEST_MAPPING = "/{distributionsetTagId}/distributionsets";
+
/**
* The default offset parameter in case the offset parameter is not present
* in the request.
@@ -87,62 +135,6 @@ public final class RestConstants {
*/
public static final String REQUEST_PARAMETER_SEARCH = "q";
- /**
- * The target URL mapping, href link for assigned distribution set.
- */
- public static final String TARGET_V1_ASSIGNED_DISTRIBUTION_SET = "assignedDS";
- /**
- * The target URL mapping, href link for installed distribution set.
- */
- public static final String TARGET_V1_INSTALLED_DISTRIBUTION_SET = "installedDS";
- /**
- * The target URL mapping, href link for target attributes.
- */
- public static final String TARGET_V1_ATTRIBUTES = "attributes";
- /**
- * The target URL mapping, href link for target actions.
- */
- public static final String TARGET_V1_ACTIONS = "actions";
- /**
- * The target URL mapping, href link for canceled actions.
- */
- public static final String TARGET_V1_CANCELED_ACTION = "canceledaction";
- /**
- * The target URL mapping, href link for canceled actions.
- */
- public static final String TARGET_V1_ACTION_STATUS = "status";
-
- /**
- * The target URL mapping rest resource.
- */
- public static final String TARGET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targets";
-
- public static final String SYSTEM_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/system";
- /**
- * The software module URL mapping rest resource.
- */
- public static final String SOFTWAREMODULE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremodules";
-
- /**
- * The tag URL mapping rest resource.
- */
- public static final String TARGET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targettags";
- /**
- * The tag URL mapping rest resource.
- */
- public static final String TARGET_TAG_TAGERTS_REQUEST_MAPPING = "/{targetTagId}/targets";
-
- /**
- * The tag URL mapping rest resource.
- */
- public static final String DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING
- + "/distributionsettags";
-
- /**
- * The tag URL mapping rest resource.
- */
- public static final String DISTRIBUTIONSET_REQUEST_MAPPING = "/{distributionsetTagId}/distributionsets";
-
/**
* The software module type URL mapping rest resource.
*/
@@ -184,11 +176,8 @@ public final class RestConstants {
public static final String DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES = "mandatorymoduletypes";
- public static final String DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE = "/api/" + API_VERSION + "/downloadserver/";
- public static final String DOWNLOAD_ID_V1_REQUEST_MAPPING = "downloadId/{downloadId}";
-
// constant class, private constructor.
- private RestConstants() {
+ private MgmtRestConstants() {
}
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/RolloutRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java
similarity index 69%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/RolloutRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java
index 9f76b6bce..ea4578cad 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/RolloutRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java
@@ -2,18 +2,17 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutResponseBody;
-import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutRestRequestBody;
-import org.eclipse.hawkbit.rest.resource.model.rolloutgroup.RolloutGroupResponseBody;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.rollout.MgmtRolloutResponseBody;
+import org.eclipse.hawkbit.mgmt.json.model.rollout.MgmtRolloutRestRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroupResponseBody;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -26,8 +25,8 @@ import org.springframework.web.bind.annotation.RequestParam;
* REST Resource handling rollout CRUD operations.
*
*/
-@RequestMapping(RestConstants.ROLLOUT_V1_REQUEST_MAPPING)
-public interface RolloutRestApi {
+@RequestMapping(MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING)
+public interface MgmtRolloutRestApi {
/**
* Handles the GET request of retrieving all rollouts.
@@ -49,11 +48,11 @@ public interface RolloutRestApi {
* JsonResponseExceptionHandler is handling the response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> getRollouts(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getRollouts(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single rollout.
@@ -66,7 +65,7 @@ public interface RolloutRestApi {
*/
@RequestMapping(value = "/{rolloutId}", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE,
"application/hal+json" })
- public ResponseEntity getRollout(@PathVariable("rolloutId") final Long rolloutId);
+ ResponseEntity getRollout(@PathVariable("rolloutId") final Long rolloutId);
/**
* Handles the POST request for creating rollout.
@@ -81,7 +80,7 @@ public interface RolloutRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity create(@RequestBody final RolloutRestRequestBody rolloutRequestBody);
+ ResponseEntity create(@RequestBody final MgmtRolloutRestRequestBody rolloutRequestBody);
/**
* Handles the POST request for starting a rollout.
@@ -96,8 +95,8 @@ public interface RolloutRestApi {
*/
@RequestMapping(method = RequestMethod.POST, value = "/{rolloutId}/start", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity start(@PathVariable("rolloutId") final Long rolloutId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_ASYNC, defaultValue = "false") final boolean startAsync);
+ ResponseEntity start(@PathVariable("rolloutId") final Long rolloutId,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_ASYNC, defaultValue = "false") final boolean startAsync);
/**
* Handles the POST request for pausing a rollout.
@@ -112,7 +111,7 @@ public interface RolloutRestApi {
*/
@RequestMapping(method = RequestMethod.POST, value = "/{rolloutId}/pause", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity pause(@PathVariable("rolloutId") final Long rolloutId);
+ ResponseEntity pause(@PathVariable("rolloutId") final Long rolloutId);
/**
* Handles the POST request for resuming a rollout.
@@ -127,7 +126,7 @@ public interface RolloutRestApi {
*/
@RequestMapping(method = RequestMethod.POST, value = "/{rolloutId}/resume", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity resume(@PathVariable("rolloutId") final Long rolloutId);
+ ResponseEntity resume(@PathVariable("rolloutId") final Long rolloutId);
/**
* Handles the GET request of retrieving all rollout groups referred to a
@@ -153,12 +152,12 @@ public interface RolloutRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{rolloutId}/deploygroups", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> getRolloutGroups(
+ ResponseEntity> getRolloutGroups(
@PathVariable("rolloutId") final Long rolloutId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request for retrieving a single rollout group.
@@ -167,12 +166,12 @@ public interface RolloutRestApi {
* the rolloutId to retrieve the group from
* @param groupId
* the groupId to retrieve the rollout group
- * @return the OK response containing the RolloutGroupResponseBody
+ * @return the OK response containing the MgmtRolloutGroupResponseBody
* @throws EntityNotFoundException
*/
@RequestMapping(method = RequestMethod.GET, value = "/{rolloutId}/deploygroups/{groupId}", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity getRolloutGroup(@PathVariable("rolloutId") final Long rolloutId,
+ ResponseEntity getRolloutGroup(@PathVariable("rolloutId") final Long rolloutId,
@PathVariable("groupId") final Long groupId);
/**
@@ -200,10 +199,10 @@ public interface RolloutRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{rolloutId}/deploygroups/{groupId}/targets", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> getRolloutGroupTargets(@PathVariable("rolloutId") final Long rolloutId,
+ ResponseEntity> getRolloutGroupTargets(@PathVariable("rolloutId") final Long rolloutId,
@PathVariable("groupId") final Long groupId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/SoftwareModuleRestAPI.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtSoftwareModuleRestAPI.java
similarity index 74%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/SoftwareModuleRestAPI.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtSoftwareModuleRestAPI.java
index 0eb874489..e452eb9a3 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/SoftwareModuleRestAPI.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtSoftwareModuleRestAPI.java
@@ -2,21 +2,20 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.MetadataRest;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.artifact.ArtifactRest;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRequestBodyPut;
-import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
+import org.eclipse.hawkbit.mgmt.json.model.MetadataRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.artifact.MgmtArtifact;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleRequestBodyPut;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -32,8 +31,8 @@ import org.springframework.web.multipart.MultipartFile;
* operations.
*
*/
-@RequestMapping(RestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING)
-public interface SoftwareModuleRestAPI {
+@RequestMapping(MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING)
+public interface MgmtSoftwareModuleRestAPI {
/**
* Handles POST request for artifact upload.
@@ -56,7 +55,7 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.POST, value = "/{softwareModuleId}/artifacts", produces = {
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity uploadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity uploadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
@RequestParam("file") final MultipartFile file,
@RequestParam(value = "filename", required = false) final String optionalFileName,
@RequestParam(value = "md5sum", required = false) final String md5Sum,
@@ -76,8 +75,7 @@ public interface SoftwareModuleRestAPI {
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}/artifacts", produces = {
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
@ResponseBody
- public ResponseEntity> getArtifacts(
- @PathVariable("softwareModuleId") final Long softwareModuleId);
+ ResponseEntity> getArtifacts(@PathVariable("softwareModuleId") final Long softwareModuleId);
/**
* Handles the GET request of retrieving a single Artifact meta data
@@ -93,7 +91,7 @@ public interface SoftwareModuleRestAPI {
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}/artifacts/{artifactId}", produces = {
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
@ResponseBody
- public ResponseEntity getArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity getArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId);
/**
@@ -108,7 +106,7 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{softwareModuleId}/artifacts/{artifactId}")
@ResponseBody
- public ResponseEntity deleteArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity deleteArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId);
/**
@@ -132,11 +130,11 @@ public interface SoftwareModuleRestAPI {
* JsonResponseExceptionHandler is handling the response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getSoftwareModules(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getSoftwareModules(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single software module.
@@ -150,8 +148,7 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getSoftwareModule(
- @PathVariable("softwareModuleId") final Long softwareModuleId);
+ ResponseEntity getSoftwareModule(@PathVariable("softwareModuleId") final Long softwareModuleId);
/**
* Handles the POST request of creating new softwaremodules. The request
@@ -166,8 +163,8 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createSoftwareModules(
- @RequestBody final List softwareModules);
+ ResponseEntity> createSoftwareModules(
+ @RequestBody final List softwareModules);
/**
* Handles the PUT request of updating a software module.
@@ -180,9 +177,9 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{softwareModuleId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity updateSoftwareModule(
+ ResponseEntity updateSoftwareModule(
@PathVariable("softwareModuleId") final Long softwareModuleId,
- @RequestBody final SoftwareModuleRequestBodyPut restSoftwareModule);
+ @RequestBody final MgmtSoftwareModuleRequestBodyPut restSoftwareModule);
/**
* Handles the DELETE request for a single software module.
@@ -193,7 +190,7 @@ public interface SoftwareModuleRestAPI {
*
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{softwareModuleId}")
- public ResponseEntity deleteSoftwareModule(@PathVariable("softwareModuleId") final Long softwareModuleId);
+ ResponseEntity deleteSoftwareModule(@PathVariable("softwareModuleId") final Long softwareModuleId);
/**
* Gets a paged list of meta data for a software module.
@@ -217,12 +214,11 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}/metadata", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> getMetadata(
- @PathVariable("softwareModuleId") final Long softwareModuleId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Gets a single meta data value for a specific key of a software module.
@@ -236,7 +232,7 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}/metadata/{metadataKey}", produces = {
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getMetadataValue(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity getMetadataValue(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("metadataKey") final String metadataKey);
/**
@@ -251,7 +247,7 @@ public interface SoftwareModuleRestAPI {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{softwareModuleId}/metadata/{metadataKey}", produces = {
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity updateMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity updateMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("metadataKey") final String metadataKey, @RequestBody final MetadataRest metadata);
/**
@@ -264,7 +260,7 @@ public interface SoftwareModuleRestAPI {
* @return status OK if the delete request is successful
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{softwareModuleId}/metadata/{metadataKey}")
- public ResponseEntity deleteMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity deleteMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("metadataKey") final String metadataKey);
/**
@@ -280,8 +276,7 @@ public interface SoftwareModuleRestAPI {
@RequestMapping(method = RequestMethod.POST, value = "/{softwareModuleId}/metadata", consumes = {
MediaType.APPLICATION_JSON_VALUE,
"application/hal+json" }, produces = { MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
- public ResponseEntity> createMetadata(
- @PathVariable("softwareModuleId") final Long softwareModuleId,
+ ResponseEntity> createMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
@RequestBody final List metadataRest);
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/SoftwareModuleTypeRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtSoftwareModuleTypeRestApi.java
similarity index 70%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/SoftwareModuleTypeRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtSoftwareModuleTypeRestApi.java
index a98e35a32..6c7252d62 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/SoftwareModuleTypeRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtSoftwareModuleTypeRestApi.java
@@ -2,19 +2,18 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRequestBodyPost;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRequestBodyPut;
-import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleType;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeRequestBodyPost;
+import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeRequestBodyPut;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -28,8 +27,8 @@ import org.springframework.web.bind.annotation.RequestParam;
* operations.
*
*/
-@RequestMapping(RestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING)
-public interface SoftwareModuleTypeRestApi {
+@RequestMapping(MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING)
+public interface MgmtSoftwareModuleTypeRestApi {
/**
* Handles the GET request of retrieving all SoftwareModuleTypes .
*
@@ -51,11 +50,11 @@ public interface SoftwareModuleTypeRestApi {
* JsonResponseExceptionHandler is handling the response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getTypes(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getTypes(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single software module type .
@@ -69,7 +68,7 @@ public interface SoftwareModuleTypeRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleTypeId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getSoftwareModuleType(
+ ResponseEntity getSoftwareModuleType(
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId);
/**
@@ -81,7 +80,7 @@ public interface SoftwareModuleTypeRestApi {
*
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{softwareModuleTypeId}")
- public ResponseEntity deleteSoftwareModuleType(
+ ResponseEntity deleteSoftwareModuleType(
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId);
/**
@@ -95,9 +94,9 @@ public interface SoftwareModuleTypeRestApi {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{softwareModuleTypeId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity updateSoftwareModuleType(
+ ResponseEntity updateSoftwareModuleType(
@PathVariable("softwareModuleTypeId") final Long softwareModuleTypeId,
- @RequestBody final SoftwareModuleTypeRequestBodyPut restSoftwareModuleType);
+ @RequestBody final MgmtSoftwareModuleTypeRequestBodyPut restSoftwareModuleType);
/**
* Handles the POST request of creating new SoftwareModuleTypes. The request
@@ -112,7 +111,7 @@ public interface SoftwareModuleTypeRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createSoftwareModuleTypes(
- @RequestBody final List softwareModuleTypes);
+ ResponseEntity> createSoftwareModuleTypes(
+ @RequestBody final List softwareModuleTypes);
}
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/TargetRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtTargetRestApi.java
similarity index 72%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/TargetRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtTargetRestApi.java
index 48e242f81..572dcf500 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/TargetRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtTargetRestApi.java
@@ -2,23 +2,22 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.action.ActionRest;
-import org.eclipse.hawkbit.rest.resource.model.action.ActionStatusRest;
-import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
-import org.eclipse.hawkbit.rest.resource.model.target.DistributionSetAssigmentRest;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetAttributes;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRequestBody;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.action.MgmtAction;
+import org.eclipse.hawkbit.mgmt.json.model.action.MgmtActionStatus;
+import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtDistributionSetAssigment;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTargetAttributes;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTargetRequestBody;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -30,8 +29,8 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* Api for handling target operations.
*/
-@RequestMapping(RestConstants.TARGET_V1_REQUEST_MAPPING)
-public interface TargetRestApi {
+@RequestMapping(MgmtRestConstants.TARGET_V1_REQUEST_MAPPING)
+public interface MgmtTargetRestApi {
/**
* Handles the GET request of retrieving a single target.
@@ -45,7 +44,7 @@ public interface TargetRestApi {
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getTarget(@PathVariable("targetId") final String targetId);
+ ResponseEntity getTarget(@PathVariable("targetId") final String targetId);
/**
* Handles the GET request of retrieving all targets.
@@ -68,11 +67,11 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getTargets(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getTargets(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the POST request of creating new targets. The request body must
@@ -87,7 +86,7 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createTargets(@RequestBody final List targets);
+ ResponseEntity> createTargets(@RequestBody final List targets);
/**
* Handles the PUT request of updating a target. The ID is within the URL
@@ -105,8 +104,8 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{targetId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity updateTarget(@PathVariable("targetId") final String targetId,
- @RequestBody final TargetRequestBody targetRest);
+ ResponseEntity updateTarget(@PathVariable("targetId") final String targetId,
+ @RequestBody final MgmtTargetRequestBody targetRest);
/**
* Handles the DELETE request of deleting a target.
@@ -119,7 +118,7 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{targetId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity deleteTarget(@PathVariable("targetId") final String targetId);
+ ResponseEntity deleteTarget(@PathVariable("targetId") final String targetId);
/**
* Handles the GET request of retrieving the attributes of a specific
@@ -133,7 +132,7 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/attributes", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getAttributes(@PathVariable("targetId") final String targetId);
+ ResponseEntity getAttributes(@PathVariable("targetId") final String targetId);
/**
* Handles the GET request of retrieving the Actions of a specific target.
@@ -158,11 +157,11 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/actions", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getActionHistory(@PathVariable("targetId") final String targetId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getActionHistory(@PathVariable("targetId") final String targetId,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a specific Actions of a specific
@@ -176,7 +175,7 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/actions/{actionId}", produces = {
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getAction(@PathVariable("targetId") final String targetId,
+ ResponseEntity getAction(@PathVariable("targetId") final String targetId,
@PathVariable("actionId") final Long actionId);
/**
@@ -196,7 +195,7 @@ public interface TargetRestApi {
* if the target or the action is not found
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{targetId}/actions/{actionId}")
- public ResponseEntity cancelAction(@PathVariable("targetId") final String targetId,
+ ResponseEntity cancelAction(@PathVariable("targetId") final String targetId,
@PathVariable("actionId") final Long actionId,
@RequestParam(value = "force", required = false, defaultValue = "false") final boolean force);
@@ -223,11 +222,11 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/actions/{actionId}/status", produces = {
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getActionStatusList(
- @PathVariable("targetId") final String targetId, @PathVariable("actionId") final Long actionId,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam);
+ ResponseEntity> getActionStatusList(@PathVariable("targetId") final String targetId,
+ @PathVariable("actionId") final Long actionId,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam);
/**
* Handles the GET request of retrieving the assigned distribution set of an
@@ -242,8 +241,7 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/assignedDS", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getAssignedDistributionSet(
- @PathVariable("targetId") final String targetId);
+ ResponseEntity getAssignedDistributionSet(@PathVariable("targetId") final String targetId);
/**
* Changes the assigned distribution set of a target.
@@ -260,8 +258,8 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.POST, value = "/{targetId}/assignedDS", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity postAssignedDistributionSet(@PathVariable("targetId") final String targetId,
- @RequestBody final DistributionSetAssigmentRest dsId);
+ ResponseEntity postAssignedDistributionSet(@PathVariable("targetId") final String targetId,
+ @RequestBody final MgmtDistributionSetAssigment dsId);
/**
* Handles the GET request of retrieving the installed distribution set of
@@ -276,7 +274,6 @@ public interface TargetRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/installedDS", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getInstalledDistributionSet(
- @PathVariable("targetId") final String targetId);
+ ResponseEntity getInstalledDistributionSet(@PathVariable("targetId") final String targetId);
}
\ No newline at end of file
diff --git a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/TargetTagRestApi.java b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtTargetTagRestApi.java
similarity index 67%
rename from hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/TargetTagRestApi.java
rename to hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtTargetTagRestApi.java
index 940b578d4..90646a562 100644
--- a/hawkbit-rest-api/src/main/java/org/eclipse/hawkbit/rest/resource/api/TargetTagRestApi.java
+++ b/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtTargetTagRestApi.java
@@ -2,21 +2,20 @@
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
-package org.eclipse.hawkbit.rest.resource.api;
+package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List;
-import org.eclipse.hawkbit.rest.resource.RestConstants;
-import org.eclipse.hawkbit.rest.resource.model.PagedList;
-import org.eclipse.hawkbit.rest.resource.model.tag.AssignedTargetRequestBody;
-import org.eclipse.hawkbit.rest.resource.model.tag.TagRequestBodyPut;
-import org.eclipse.hawkbit.rest.resource.model.tag.TagRest;
-import org.eclipse.hawkbit.rest.resource.model.tag.TargetTagAssigmentResultRest;
-import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
+import org.eclipse.hawkbit.mgmt.json.model.PagedList;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtAssignedTargetRequestBody;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtTag;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtTagRequestBodyPut;
+import org.eclipse.hawkbit.mgmt.json.model.tag.MgmtTargetTagAssigmentResult;
+import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -29,8 +28,8 @@ import org.springframework.web.bind.annotation.RequestParam;
* REST Resource handling for TargetTag CRUD operations.
*
*/
-@RequestMapping(RestConstants.TARGET_TAG_V1_REQUEST_MAPPING)
-public interface TargetTagRestApi {
+@RequestMapping(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING)
+public interface MgmtTargetTagRestApi {
/**
* Handles the GET request of retrieving all target tags.
@@ -52,11 +51,11 @@ public interface TargetTagRestApi {
* JsonResponseExceptionHandler is handling the response.
*/
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> getTargetTags(
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = RestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
- @RequestParam(value = RestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
+ ResponseEntity> getTargetTags(
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) final int pagingOffsetParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) final int pagingLimitParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) final String sortParam,
+ @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) final String rsqlParam);
/**
* Handles the GET request of retrieving a single target tag.
@@ -70,7 +69,7 @@ public interface TargetTagRestApi {
*/
@RequestMapping(method = RequestMethod.GET, value = "/{targetTagId}", produces = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity getTargetTag(@PathVariable("targetTagId") final Long targetTagId);
+ ResponseEntity getTargetTag(@PathVariable("targetTagId") final Long targetTagId);
/**
* Handles the POST request of creating new target tag. The request body
@@ -84,7 +83,7 @@ public interface TargetTagRestApi {
*/
@RequestMapping(method = RequestMethod.POST, consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity> createTargetTags(@RequestBody final List tags);
+ ResponseEntity> createTargetTags(@RequestBody final List tags);
/**
*
@@ -100,8 +99,8 @@ public interface TargetTagRestApi {
*/
@RequestMapping(method = RequestMethod.PUT, value = "/{targetTagId}", consumes = { "application/hal+json",
MediaType.APPLICATION_JSON_VALUE }, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
- public ResponseEntity updateTagretTag(@PathVariable("targetTagId") final Long targetTagId,
- @RequestBody final TagRequestBodyPut restTargetTagRest);
+ ResponseEntity updateTagretTag(@PathVariable("targetTagId") final Long targetTagId,
+ @RequestBody final MgmtTagRequestBodyPut restTargetTagRest);
/**
* Handles the DELETE request for a single target tag.
@@ -114,7 +113,7 @@ public interface TargetTagRestApi {
*
*/
@RequestMapping(method = RequestMethod.DELETE, value = "/{targetTagId}")
- public ResponseEntity deleteTargetTag(@PathVariable("targetTagId") final Long targetTagId);
+ ResponseEntity deleteTargetTag(@PathVariable("targetTagId") final Long targetTagId);
/**
* Handles the GET request of retrieving all assigned targets by the given
@@ -127,8 +126,8 @@ public interface TargetTagRestApi {
* @throws EntityNotFoundException
* in case the given {@code targetTagId} doesn't exists.
*/
- @RequestMapping(method = RequestMethod.GET, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
- public ResponseEntity> getAssignedTargets(@PathVariable("targetTagId") final Long targetTagId);
+ @RequestMapping(method = RequestMethod.GET, value = MgmtRestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
+ ResponseEntity> getAssignedTargets(@PathVariable("targetTagId") final Long targetTagId);
/**
* Handles the POST request to toggle the assignment of targets by the given
@@ -143,11 +142,11 @@ public interface TargetTagRestApi {
* @throws EntityNotFoundException
* in case the given {@code targetTagId} doesn't exists.
*/
- @RequestMapping(method = RequestMethod.POST, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING
+ @RequestMapping(method = RequestMethod.POST, value = MgmtRestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING
+ "/toggleTagAssignment")
- public ResponseEntity toggleTagAssignment(
+ ResponseEntity toggleTagAssignment(
@PathVariable("targetTagId") final Long targetTagId,
- @RequestBody final List assignedTargetRequestBodies);
+ @RequestBody final List assignedTargetRequestBodies);
/**
* Handles the POST request to assign targets to the given tag id.
@@ -161,9 +160,9 @@ public interface TargetTagRestApi {
* @throws EntityNotFoundException
* in case the given {@code targetTagId} doesn't exists.
*/
- @RequestMapping(method = RequestMethod.POST, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
- public ResponseEntity> assignTargets(@PathVariable("targetTagId") final Long targetTagId,
- @RequestBody final List assignedTargetRequestBodies);
+ @RequestMapping(method = RequestMethod.POST, value = MgmtRestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
+ ResponseEntity> assignTargets(@PathVariable("targetTagId") final Long targetTagId,
+ @RequestBody final List assignedTargetRequestBodies);
/**
* Handles the DELETE request to unassign all targets from the given tag id.
@@ -174,8 +173,8 @@ public interface TargetTagRestApi {
* @throws EntityNotFoundException
* in case the given {@code targetTagId} doesn't exists.
*/
- @RequestMapping(method = RequestMethod.DELETE, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
- public ResponseEntity unassignTargets(@PathVariable("targetTagId") final Long targetTagId);
+ @RequestMapping(method = RequestMethod.DELETE, value = MgmtRestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
+ ResponseEntity unassignTargets(@PathVariable("targetTagId") final Long targetTagId);
/**
* Handles the DELETE request to unassign one target from the given tag id.
@@ -188,8 +187,8 @@ public interface TargetTagRestApi {
* @throws EntityNotFoundException
* in case the given {@code targetTagId} doesn't exists.
*/
- @RequestMapping(method = RequestMethod.DELETE, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING
+ @RequestMapping(method = RequestMethod.DELETE, value = MgmtRestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING
+ "/{controllerId}")
- public ResponseEntity unassignTarget(@PathVariable("targetTagId") final Long targetTagId,
+ ResponseEntity