Found two more classes to remove

This commit is contained in:
Kai Zimmermann
2016-03-29 17:07:54 +02:00
parent 7d3d4f1fd4
commit f002eede43
9 changed files with 10 additions and 572 deletions

View File

@@ -26,7 +26,6 @@ import org.eclipse.hawkbit.rest.resource.model.tag.DistributionSetTagAssigmentRe
import org.eclipse.hawkbit.rest.resource.model.tag.TagPagedList;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -86,7 +85,7 @@ public class DistributionSetTagResource implements DistributionSetTagRestApi {
}
@Override
public ResponseEntity<TagsRest> createDistributionSetTags(final List<TagRequestBodyPut> tags) {
public ResponseEntity<List<TagRest>> createDistributionSetTags(final List<TagRequestBodyPut> tags) {
LOG.debug("creating {} ds tags", tags.size());
final List<DistributionSetTag> createdTags = this.tagManagement

View File

@@ -21,7 +21,6 @@ import org.eclipse.hawkbit.rest.resource.api.DistributionSetTagRestApi;
import org.eclipse.hawkbit.rest.resource.api.TargetTagRestApi;
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;
/**
* A mapper which maps repository model to RESTful model representation and
@@ -33,8 +32,8 @@ final class TagMapper {
// Utility class
}
static TagsRest toResponse(final List<TargetTag> targetTags) {
final TagsRest tagsRest = new TagsRest();
static List<TagRest> toResponse(final List<TargetTag> targetTags) {
final List<TagRest> tagsRest = new ArrayList<>();
if (targetTags == null) {
return tagsRest;
}
@@ -63,8 +62,8 @@ final class TagMapper {
return response;
}
static TagsRest toResponseDistributionSetTag(final List<DistributionSetTag> distributionSetTags) {
final TagsRest tagsRest = new TagsRest();
static List<TagRest> toResponseDistributionSetTag(final List<DistributionSetTag> distributionSetTags) {
final List<TagRest> tagsRest = new ArrayList<>();
if (distributionSetTags == null) {
return tagsRest;
}
@@ -131,7 +130,5 @@ final class TagMapper {
if (response.getName() != null) {
tag.setName(response.getName());
}
}
}

View File

@@ -27,7 +27,6 @@ import org.eclipse.hawkbit.rest.resource.api.TargetRestApi;
import org.eclipse.hawkbit.rest.resource.model.PollStatusRest;
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.action.ActionsRest;
import org.eclipse.hawkbit.rest.resource.model.target.TargetRequestBody;
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
@@ -214,8 +213,8 @@ public final class TargetMapper {
return result;
}
static ActionsRest toResponse(final String targetId, final List<Action> actions) {
final ActionsRest mappedList = new ActionsRest();
static List<ActionRest> toResponse(final String targetId, final List<Action> actions) {
final List<ActionRest> mappedList = new ArrayList<>();
for (final Action action : actions) {
final ActionRest response = toResponse(targetId, action, action.isActive());

View File

@@ -24,7 +24,6 @@ import org.eclipse.hawkbit.rest.resource.model.tag.AssignedTargetRequestBody;
import org.eclipse.hawkbit.rest.resource.model.tag.TagPagedList;
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.TargetRest;
import org.slf4j.Logger;
@@ -87,7 +86,7 @@ public class TargetTagResource implements TargetTagRestApi {
}
@Override
public ResponseEntity<TagsRest> createTargetTags(@RequestBody final List<TagRequestBodyPut> tags) {
public ResponseEntity<List<TagRest>> createTargetTags(@RequestBody final List<TagRequestBodyPut> tags) {
LOG.debug("creating {} target tags", tags.size());
final List<TargetTag> createdTargetTags = this.tagManagement
.createTargetTags(TagMapper.mapTargeTagFromRequest(tags));