Remove REST API boilerplate
Was used in the past for Swagger generation.
This commit is contained in:
@@ -14,16 +14,15 @@ 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.MetadataRestPageList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetPagedList;
|
||||
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.DistributionSetsRest;
|
||||
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.SoftwareModulePagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetPagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -58,7 +57,7 @@ public interface DistributionSetRestApi {
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<DistributionSetPagedList> getDistributionSets(
|
||||
public ResponseEntity<PagedList<DistributionSetRest>> 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,
|
||||
@@ -93,7 +92,7 @@ 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<DistributionSetsRest> createDistributionSets(
|
||||
public ResponseEntity<List<DistributionSetRest>> createDistributionSets(
|
||||
@RequestBody final List<DistributionSetRequestBodyPost> sets);
|
||||
|
||||
/**
|
||||
@@ -148,7 +147,7 @@ public interface DistributionSetRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}/assignedTargets", produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
|
||||
public ResponseEntity<TargetPagedList> getAssignedTargets(
|
||||
public ResponseEntity<PagedList<TargetRest>> 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,
|
||||
@@ -179,7 +178,7 @@ public interface DistributionSetRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}/installedTargets", produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
|
||||
public ResponseEntity<TargetPagedList> getInstalledTargets(
|
||||
public ResponseEntity<PagedList<TargetRest>> 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,
|
||||
@@ -357,7 +356,7 @@ public interface DistributionSetRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetId}/assignedSM", produces = {
|
||||
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<SoftwareModulePagedList> getAssignedSoftwareModules(
|
||||
public ResponseEntity<PagedList<SoftwareModuleRest>> 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,
|
||||
|
||||
@@ -11,7 +11,7 @@ package org.eclipse.hawkbit.rest.resource.api;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetsRest;
|
||||
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.TagPagedList;
|
||||
@@ -137,7 +137,7 @@ public interface DistributionSetTagRestApi {
|
||||
* exists.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
|
||||
public ResponseEntity<DistributionSetsRest> getAssignedDistributionSets(
|
||||
public ResponseEntity<List<DistributionSetRest>> getAssignedDistributionSets(
|
||||
@PathVariable("distributionsetTagId") final Long distributionsetTagId);
|
||||
|
||||
/**
|
||||
@@ -175,7 +175,7 @@ public interface DistributionSetTagRestApi {
|
||||
* exists.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.POST, value = RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
|
||||
public ResponseEntity<DistributionSetsRest> assignDistributionSets(
|
||||
public ResponseEntity<List<DistributionSetRest>> assignDistributionSets(
|
||||
@PathVariable("distributionsetTagId") final Long distributionsetTagId,
|
||||
@RequestBody final List<AssignedDistributionSetRequestBody> assignedDSRequestBodies);
|
||||
|
||||
|
||||
@@ -12,13 +12,11 @@ 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.distributionsettype.DistributionSetTypePagedList;
|
||||
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.distributionsettype.DistributionSetTypesRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypesRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -57,7 +55,7 @@ public interface DistributionSetTypeRestApi {
|
||||
* response.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<DistributionSetTypePagedList> getDistributionSetTypes(
|
||||
public ResponseEntity<PagedList<DistributionSetTypeRest>> 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,
|
||||
@@ -119,7 +117,7 @@ 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<DistributionSetTypesRest> createDistributionSetTypes(
|
||||
public ResponseEntity<List<DistributionSetTypeRest>> createDistributionSetTypes(
|
||||
@RequestBody final List<DistributionSetTypeRequestBodyPost> distributionSetTypes);
|
||||
|
||||
/**
|
||||
@@ -133,7 +131,7 @@ public interface DistributionSetTypeRestApi {
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}/"
|
||||
+ RestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, produces = { "application/hal+json",
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<SoftwareModuleTypesRest> getMandatoryModules(
|
||||
public ResponseEntity<List<SoftwareModuleTypeRest>> getMandatoryModules(
|
||||
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId);
|
||||
|
||||
/**
|
||||
@@ -181,7 +179,7 @@ public interface DistributionSetTypeRestApi {
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{distributionSetTypeId}/"
|
||||
+ RestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, produces = { "application/hal+json",
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<SoftwareModuleTypesRest> getOptionalModules(
|
||||
public ResponseEntity<List<SoftwareModuleTypeRest>> getOptionalModules(
|
||||
@PathVariable("distributionSetTypeId") final Long distributionSetTypeId);
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
package org.eclipse.hawkbit.rest.resource.api;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.rollout.RolloutPagedList;
|
||||
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.RolloutGroupPagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.rolloutgroup.RolloutGroupResponseBody;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetPagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -154,7 +154,8 @@ public interface RolloutRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{rolloutId}/deploygroups", produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
|
||||
public ResponseEntity<RolloutGroupPagedList> getRolloutGroups(@PathVariable("rolloutId") final Long rolloutId,
|
||||
public ResponseEntity<PagedList<RolloutGroupResponseBody>> 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,
|
||||
@@ -200,7 +201,7 @@ public interface RolloutRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{rolloutId}/deploygroups/{groupId}/targets", produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE, "application/hal+json" })
|
||||
public ResponseEntity<TargetPagedList> getRolloutGroupTargets(@PathVariable("rolloutId") final Long rolloutId,
|
||||
public ResponseEntity<PagedList<TargetRest>> 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,
|
||||
|
||||
@@ -13,13 +13,11 @@ 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.MetadataRestPageList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.artifact.ArtifactRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.artifact.ArtifactsRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModulePagedList;
|
||||
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.rest.resource.model.softwaremodule.SoftwareModulesRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -79,7 +77,8 @@ public interface SoftwareModuleRestAPI {
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{softwareModuleId}/artifacts", produces = {
|
||||
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
@ResponseBody
|
||||
public ResponseEntity<ArtifactsRest> getArtifacts(@PathVariable("softwareModuleId") final Long softwareModuleId);
|
||||
public ResponseEntity<List<ArtifactRest>> getArtifacts(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving a single Artifact meta data
|
||||
@@ -134,7 +133,7 @@ public interface SoftwareModuleRestAPI {
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<SoftwareModulePagedList> getSoftwareModules(
|
||||
public ResponseEntity<PagedList<SoftwareModuleRest>> 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,
|
||||
@@ -168,7 +167,7 @@ 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<SoftwareModulesRest> createSoftwareModules(
|
||||
public ResponseEntity<List<SoftwareModuleRest>> createSoftwareModules(
|
||||
@RequestBody final List<SoftwareModuleRequestBodyPost> softwareModules);
|
||||
|
||||
/**
|
||||
@@ -187,7 +186,7 @@ public interface SoftwareModuleRestAPI {
|
||||
@RequestBody final SoftwareModuleRequestBodyPut restSoftwareModule);
|
||||
|
||||
/**
|
||||
* Handles the DELETE request for a single softwaremodule.
|
||||
* Handles the DELETE request for a single software module.
|
||||
*
|
||||
* @param softwareModuleId
|
||||
* the ID of the module to retrieve
|
||||
|
||||
@@ -11,11 +11,10 @@ package org.eclipse.hawkbit.rest.resource.api;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypePagedList;
|
||||
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.rest.resource.model.softwaremoduletype.SoftwareModuleTypesRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -52,7 +51,7 @@ public interface SoftwareModuleTypeRestApi {
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<SoftwareModuleTypePagedList> getTypes(
|
||||
public ResponseEntity<PagedList<SoftwareModuleTypeRest>> 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,
|
||||
@@ -113,7 +112,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<SoftwareModuleTypesRest> createSoftwareModuleTypes(
|
||||
public ResponseEntity<List<SoftwareModuleTypeRest>> createSoftwareModuleTypes(
|
||||
@RequestBody final List<SoftwareModuleTypeRequestBodyPost> softwareModuleTypes);
|
||||
|
||||
}
|
||||
|
||||
@@ -11,16 +11,14 @@ package org.eclipse.hawkbit.rest.resource.api;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.action.ActionPagedList;
|
||||
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.ActionStatusPagedList;
|
||||
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.TargetPagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRequestBody;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetsRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -70,7 +68,7 @@ public interface TargetRestApi {
|
||||
*/
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, produces = { "application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<TargetPagedList> getTargets(
|
||||
public ResponseEntity<PagedList<TargetRest>> 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,
|
||||
@@ -89,7 +87,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<TargetsRest> createTargets(@RequestBody final List<TargetRequestBody> targets);
|
||||
public ResponseEntity<List<TargetRest>> createTargets(@RequestBody final List<TargetRequestBody> targets);
|
||||
|
||||
/**
|
||||
* Handles the PUT request of updating a target. The ID is within the URL
|
||||
@@ -160,7 +158,7 @@ public interface TargetRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/actions", produces = { "application/hal+json",
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<ActionPagedList> getActionHistory(@PathVariable("targetId") final String targetId,
|
||||
public ResponseEntity<PagedList<ActionRest>> 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,
|
||||
@@ -225,8 +223,8 @@ public interface TargetRestApi {
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/{targetId}/actions/{actionId}/status", produces = {
|
||||
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
||||
public ResponseEntity<ActionStatusPagedList> getActionStatusList(@PathVariable("targetId") final String targetId,
|
||||
@PathVariable("actionId") final Long actionId,
|
||||
public ResponseEntity<PagedList<ActionStatusRest>> 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);
|
||||
|
||||
@@ -17,7 +17,7 @@ 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.TagsRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TargetTagAssigmentResultRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetsRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -129,7 +129,7 @@ public interface TargetTagRestApi {
|
||||
* in case the given {@code targetTagId} doesn't exists.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
|
||||
public ResponseEntity<TargetsRest> getAssignedTargets(@PathVariable("targetTagId") final Long targetTagId);
|
||||
public ResponseEntity<List<TargetRest>> getAssignedTargets(@PathVariable("targetTagId") final Long targetTagId);
|
||||
|
||||
/**
|
||||
* Handles the POST request to toggle the assignment of targets by the given
|
||||
@@ -163,7 +163,7 @@ public interface TargetTagRestApi {
|
||||
* in case the given {@code targetTagId} doesn't exists.
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.POST, value = RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
|
||||
public ResponseEntity<TargetsRest> assignTargets(@PathVariable("targetTagId") final Long targetTagId,
|
||||
public ResponseEntity<List<TargetRest>> assignTargets(@PathVariable("targetTagId") final Long targetTagId,
|
||||
@RequestBody final List<AssignedTargetRequestBody> assignedTargetRequestBodies);
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,19 +20,18 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
|
||||
/**
|
||||
* A list representation with meta data for pagination, e.g. containing the
|
||||
* total elements. The content of the acutal list is stored in the
|
||||
* {@link #content} field.
|
||||
* total elements and size of content. The content of the actual list is stored
|
||||
* in the {@link #content} field.
|
||||
*
|
||||
* @param <T>
|
||||
* the type of elements in this list
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
public class PagedList<T> extends ResourceSupport {
|
||||
|
||||
private final List<T> content;
|
||||
private final long totalElements;
|
||||
private final int size;
|
||||
|
||||
@@ -50,6 +49,7 @@ public class PagedList<T> extends ResourceSupport {
|
||||
public PagedList(@NotNull final List<T> content, final long total) {
|
||||
this.size = content.size();
|
||||
this.totalElements = total;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,4 +65,9 @@ public class PagedList<T> extends ResourceSupport {
|
||||
public long getTotal() {
|
||||
return totalElements;
|
||||
}
|
||||
|
||||
public List<T> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
/**
|
||||
* Paged list rest model for {@link ErrorAction} to RESTful API representation.
|
||||
*
|
||||
*/
|
||||
public class ActionPagedList extends PagedList<ActionRest> {
|
||||
|
||||
private final List<ActionRest> content;
|
||||
|
||||
/**
|
||||
* Empty default constructor.
|
||||
*/
|
||||
public ActionPagedList() {
|
||||
super(Collections.emptyList(), 0);
|
||||
this.content = Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
public ActionPagedList(final List<ActionRest> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<ActionRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
/**
|
||||
* Paged list rest model for ActionStatus to RESTful API representation.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ActionStatusPagedList extends PagedList<ActionStatusRest> {
|
||||
|
||||
private final List<ActionStatusRest> content;
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
public ActionStatusPagedList(final List<ActionStatusRest> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
public ActionStatusPagedList() {
|
||||
super(Collections.emptyList(), 0);
|
||||
this.content = Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<ActionStatusRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,9 +18,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
/**
|
||||
* A json annotated rest model for ActionStatus to RESTful API representation.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.action;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* A list representation of the ActionStatus because Spring MVC cannot handle
|
||||
* plain lists interfaces as request body.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ActionStatussRest extends ResourceSupport implements List<ActionStatusRest> {
|
||||
|
||||
private final List<ActionStatusRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<ActionStatusRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final ActionStatusRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends ActionStatusRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends ActionStatusRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public ActionStatusRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public ActionStatusRest set(final int index, final ActionStatusRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final ActionStatusRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public ActionStatusRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<ActionStatusRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<ActionStatusRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<ActionStatusRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,273 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.artifact;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* List representation of the {@link ArtifactRest}.
|
||||
*
|
||||
*/
|
||||
public class ArtifactsRest extends ResourceSupport implements List<ArtifactRest> {
|
||||
|
||||
private final List<ArtifactRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<ArtifactRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final ArtifactRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends ArtifactRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends ArtifactRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public ArtifactRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public ArtifactRest set(final int index, final ArtifactRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final ArtifactRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public ArtifactRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<ArtifactRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<ArtifactRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<ArtifactRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.distributionset;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
/**
|
||||
* Paged list for SoftwareModule.
|
||||
*
|
||||
*/
|
||||
public class DistributionSetPagedList extends PagedList<DistributionSetRest> {
|
||||
|
||||
private final List<DistributionSetRest> content;
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
public DistributionSetPagedList(final List<DistributionSetRest> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<DistributionSetRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,277 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.distributionset;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* List representation of the {@link DistributionSetRest} because Spring MVC
|
||||
* cannot handle plain lists interfaces as request body.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DistributionSetsRest extends ResourceSupport implements List<DistributionSetRest> {
|
||||
|
||||
private final List<DistributionSetRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<DistributionSetRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final DistributionSetRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends DistributionSetRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends DistributionSetRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public DistributionSetRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public DistributionSetRest set(final int index, final DistributionSetRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final DistributionSetRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public DistributionSetRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<DistributionSetRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<DistributionSetRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<DistributionSetRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.distributionsettype;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
/**
|
||||
* Paged list for DistributionSetType.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DistributionSetTypePagedList extends PagedList<DistributionSetTypeRest> {
|
||||
|
||||
private final List<DistributionSetTypeRest> content;
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
public DistributionSetTypePagedList(final List<DistributionSetTypeRest> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<DistributionSetTypeRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,274 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.distributionsettype;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* List representation of the {@link DistributionSetTypeRest} because Spring MVC
|
||||
* cannot handle plain lists interfaces as request body.
|
||||
*
|
||||
*/
|
||||
public class DistributionSetTypesRest extends ResourceSupport implements List<DistributionSetTypeRest> {
|
||||
|
||||
private final List<DistributionSetTypeRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<DistributionSetTypeRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final DistributionSetTypeRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends DistributionSetTypeRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends DistributionSetTypeRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public DistributionSetTypeRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public DistributionSetTypeRest set(final int index, final DistributionSetTypeRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final DistributionSetTypeRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public DistributionSetTypeRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<DistributionSetTypeRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<DistributionSetTypeRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<DistributionSetTypeRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.rolloutgroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
/**
|
||||
* Paged list for Rollout.
|
||||
*
|
||||
*/
|
||||
public class RolloutGroupPagedList extends PagedList<RolloutGroupResponseBody> {
|
||||
|
||||
private final List<RolloutGroupResponseBody> content;
|
||||
|
||||
public RolloutGroupPagedList(final List<RolloutGroupResponseBody> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<RolloutGroupResponseBody> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.softwaremodule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
/**
|
||||
* Paged list for SoftwareModule.
|
||||
*
|
||||
*/
|
||||
public class SoftwareModulePagedList extends PagedList<SoftwareModuleRest> {
|
||||
|
||||
private final List<SoftwareModuleRest> content;
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
public SoftwareModulePagedList(final List<SoftwareModuleRest> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<SoftwareModuleRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,277 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.softwaremodule;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* List representation of the {@link SoftwareModuleRest} because Spring MVC
|
||||
* cannot handle plain lists interfaces as request body.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SoftwareModulesRest extends ResourceSupport implements List<SoftwareModuleRest> {
|
||||
|
||||
private final List<SoftwareModuleRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<SoftwareModuleRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final SoftwareModuleRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends SoftwareModuleRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends SoftwareModuleRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public SoftwareModuleRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public SoftwareModuleRest set(final int index, final SoftwareModuleRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final SoftwareModuleRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public SoftwareModuleRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<SoftwareModuleRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<SoftwareModuleRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<SoftwareModuleRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.softwaremoduletype;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
/**
|
||||
* Paged list for SoftwareModuleType.
|
||||
*
|
||||
*/
|
||||
public class SoftwareModuleTypePagedList extends PagedList<SoftwareModuleTypeRest> {
|
||||
|
||||
private final List<SoftwareModuleTypeRest> content;
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
public SoftwareModuleTypePagedList(final List<SoftwareModuleTypeRest> content, final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<SoftwareModuleTypeRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,9 +19,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
* A json annotated rest model for SoftwareModuleType to RESTful API
|
||||
* representation.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
/**
|
||||
* 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.rest.resource.model.softwaremoduletype;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* List representation of the {@link SoftwareModuleTypeRest} because Spring MVC
|
||||
* cannot handle plain lists interfaces as request body.
|
||||
*
|
||||
*/
|
||||
public class SoftwareModuleTypesRest extends ResourceSupport implements List<SoftwareModuleTypeRest> {
|
||||
|
||||
private final List<SoftwareModuleTypeRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<SoftwareModuleTypeRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final SoftwareModuleTypeRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends SoftwareModuleTypeRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends SoftwareModuleTypeRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public SoftwareModuleTypeRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public SoftwareModuleTypeRest set(final int index, final SoftwareModuleTypeRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final SoftwareModuleTypeRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public SoftwareModuleTypeRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<SoftwareModuleTypeRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<SoftwareModuleTypeRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<SoftwareModuleTypeRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,7 +8,9 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.rest.resource.model.tag;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetsRest;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRest;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
@@ -25,24 +27,24 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class DistributionSetTagAssigmentResultRest {
|
||||
|
||||
@JsonProperty
|
||||
private DistributionSetsRest assignedDistributionSets;
|
||||
private List<DistributionSetRest> assignedDistributionSets;
|
||||
|
||||
@JsonProperty
|
||||
private DistributionSetsRest unassignedDistributionSets;
|
||||
private List<DistributionSetRest> unassignedDistributionSets;
|
||||
|
||||
public DistributionSetsRest getAssignedDistributionSets() {
|
||||
public List<DistributionSetRest> getAssignedDistributionSets() {
|
||||
return assignedDistributionSets;
|
||||
}
|
||||
|
||||
public DistributionSetsRest getUnassignedDistributionSets() {
|
||||
public List<DistributionSetRest> getUnassignedDistributionSets() {
|
||||
return unassignedDistributionSets;
|
||||
}
|
||||
|
||||
public void setAssignedDistributionSets(final DistributionSetsRest assignedDistributionSets) {
|
||||
public void setAssignedDistributionSets(final List<DistributionSetRest> assignedDistributionSets) {
|
||||
this.assignedDistributionSets = assignedDistributionSets;
|
||||
}
|
||||
|
||||
public void setUnassignedDistributionSets(final DistributionSetsRest unassignedDistributionSets) {
|
||||
public void setUnassignedDistributionSets(final List<DistributionSetRest> unassignedDistributionSets) {
|
||||
this.unassignedDistributionSets = unassignedDistributionSets;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.rest.resource.model.tag;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetsRest;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
@@ -25,24 +27,24 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class TargetTagAssigmentResultRest {
|
||||
|
||||
@JsonProperty
|
||||
private TargetsRest assignedTargets;
|
||||
private List<TargetRest> assignedTargets;
|
||||
|
||||
@JsonProperty
|
||||
private TargetsRest unassignedTargets;
|
||||
private List<TargetRest> unassignedTargets;
|
||||
|
||||
public void setAssignedTargets(final TargetsRest assignedTargets) {
|
||||
public void setAssignedTargets(final List<TargetRest> assignedTargets) {
|
||||
this.assignedTargets = assignedTargets;
|
||||
}
|
||||
|
||||
public TargetsRest getAssignedTargets() {
|
||||
public List<TargetRest> getAssignedTargets() {
|
||||
return assignedTargets;
|
||||
}
|
||||
|
||||
public void setUnassignedTargets(final TargetsRest unassignedTargets) {
|
||||
public void setUnassignedTargets(final List<TargetRest> unassignedTargets) {
|
||||
this.unassignedTargets = unassignedTargets;
|
||||
}
|
||||
|
||||
public TargetsRest getUnassignedTargets() {
|
||||
public List<TargetRest> getUnassignedTargets() {
|
||||
return unassignedTargets;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
|
||||
*/
|
||||
package org.eclipse.hawkbit.rest.resource.model.target;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.PagedList;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Paged list for targets.
|
||||
*
|
||||
*/
|
||||
public class TargetPagedList extends PagedList<TargetRest> {
|
||||
|
||||
private final List<TargetRest> content;
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param total
|
||||
*/
|
||||
@JsonCreator
|
||||
public TargetPagedList(@JsonProperty("content") final List<TargetRest> content,
|
||||
@JsonProperty("total") final long total) {
|
||||
super(content, total);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the paged list. Never {@code null}.
|
||||
*/
|
||||
public List<TargetRest> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,269 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
|
||||
*/
|
||||
package org.eclipse.hawkbit.rest.resource.model.target;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.springframework.hateoas.ResourceSupport;
|
||||
|
||||
/**
|
||||
* A list representation of the {@link TargetRest} because Spring MVC cannot
|
||||
* handle plain lists interfaces as request body.
|
||||
*
|
||||
*/
|
||||
public class TargetsRest extends ResourceSupport implements List<TargetRest> {
|
||||
|
||||
private final List<TargetRest> delegate = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return delegate.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return delegate.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(final Object o) {
|
||||
return delegate.contains(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<TargetRest> iterator() {
|
||||
return delegate.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#toArray()
|
||||
*/
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return delegate.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param a
|
||||
* @return
|
||||
* @see java.util.List#toArray(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
return delegate.toArray(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @return
|
||||
* @see java.util.List#add(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean add(final TargetRest e) {
|
||||
return delegate.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean remove(final Object o) {
|
||||
return delegate.remove(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#containsAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return delegate.containsAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final Collection<? extends TargetRest> c) {
|
||||
return delegate.addAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#addAll(int, java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean addAll(final int index, final Collection<? extends TargetRest> c) {
|
||||
return delegate.addAll(index, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#removeAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeAll(final Collection<?> c) {
|
||||
return delegate.removeAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @see java.util.List#retainAll(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> c) {
|
||||
return delegate.retainAll(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see java.util.List#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
delegate.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return delegate.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#get(int)
|
||||
*/
|
||||
@Override
|
||||
public TargetRest get(final int index) {
|
||||
return delegate.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @return
|
||||
* @see java.util.List#set(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public TargetRest set(final int index, final TargetRest element) {
|
||||
return delegate.set(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param element
|
||||
* @see java.util.List#add(int, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void add(final int index, final TargetRest element) {
|
||||
delegate.add(index, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#remove(int)
|
||||
*/
|
||||
@Override
|
||||
public TargetRest remove(final int index) {
|
||||
return delegate.remove(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#indexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int indexOf(final Object o) {
|
||||
return delegate.indexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
* @see java.util.List#lastIndexOf(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int lastIndexOf(final Object o) {
|
||||
return delegate.lastIndexOf(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see java.util.List#listIterator()
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<TargetRest> listIterator() {
|
||||
return delegate.listIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
* @see java.util.List#listIterator(int)
|
||||
*/
|
||||
@Override
|
||||
public ListIterator<TargetRest> listIterator(final int index) {
|
||||
return delegate.listIterator(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fromIndex
|
||||
* @param toIndex
|
||||
* @return
|
||||
* @see java.util.List#subList(int, int)
|
||||
*/
|
||||
@Override
|
||||
public List<TargetRest> subList(final int fromIndex, final int toIndex) {
|
||||
return delegate.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user