Initial check in accordance with Parallel IP

This commit is contained in:
Kai Zimmermann
2016-01-21 13:18:55 +01:00
parent c5e4f1139f
commit 7497ab61ed
763 changed files with 114508 additions and 0 deletions

42
hawkbit-rest-api/pom.xml Executable file
View File

@@ -0,0 +1,42 @@
<!--
Copyright (c) 2015 Bosch Software Innovations GmbH and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<artifactId>hawkbit-rest-api</artifactId>
<name>hawkBit :: REST API</name>
<dependencies>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,107 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import org.springframework.hateoas.ResourceSupport;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for BaseEntity to RESTful API representation.
*
*
*
*
*/
public abstract class BaseEntityRest extends ResourceSupport {
@ApiModelProperty(value = ApiModelProperties.CREATED_BY)
@JsonProperty
private String createdBy;
@ApiModelProperty(value = ApiModelProperties.CREATED_AT)
@JsonProperty
private Long createdAt;
@ApiModelProperty(value = ApiModelProperties.LAST_MODIFIED_BY)
@JsonProperty
private String lastModifiedBy;
@ApiModelProperty(value = ApiModelProperties.LAST_MODIFIED_AT)
@JsonProperty
private Long lastModifiedAt;
/**
* @return the createdBy
*/
public String getCreatedBy() {
return createdBy;
}
/**
* @param createdBy
* the createdBy to set
*/
@JsonIgnore
public void setCreatedBy(final String createdBy) {
this.createdBy = createdBy;
}
/**
* @return the createdAt
*/
public Long getCreatedAt() {
return createdAt;
}
/**
* @param createdAt
* the createdAt to set
*/
@JsonIgnore
public void setCreatedAt(final Long createdAt) {
this.createdAt = createdAt;
}
/**
* @return the lastModifiedBy
*/
public String getLastModifiedBy() {
return lastModifiedBy;
}
/**
* @param lastModifiedBy
* the lastModifiedBy to set
*/
@JsonIgnore
public void setLastModifiedBy(final String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
/**
* @return the lastModifiedAt
*/
public Long getLastModifiedAt() {
return lastModifiedAt;
}
/**
* @param lastModifiedAt
* the lastModifiedAt to set
*/
@JsonIgnore
public void setLastModifiedAt(final Long lastModifiedAt) {
this.lastModifiedAt = lastModifiedAt;
}
}

View File

@@ -0,0 +1,98 @@
/**
* 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;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A exception model rest representation with JSON annotations for response
* bodies in case of RESTful exception occurrence.
*
*
*
*/
@JsonInclude(Include.NON_EMPTY)
@ApiModel(value = "ExceptionInfo")
public class ExceptionInfo {
@ApiModelProperty(required = true, value = "The exception class name")
private String exceptionClass;
@ApiModelProperty(required = true, value = "The exception error code")
private String errorCode;
@ApiModelProperty(required = false, value = "The exception human readable message")
private String message;
@ApiModelProperty(required = false, value = "The exception message parameters")
private List<String> parameters;
/**
* @return the exceptionClass
*/
public String getExceptionClass() {
return exceptionClass;
}
/**
* @param exceptionClass
* the exceptionClass to set
*/
public void setExceptionClass(final String exceptionClass) {
this.exceptionClass = exceptionClass;
}
/**
* @return the parameters
*/
public List<String> getParameters() {
return parameters;
}
/**
* @param parameters
* the parameters to set
*/
public void setParameters(final List<String> parameters) {
this.parameters = parameters;
}
/**
* @return the errorCode
*/
public String getErrorCode() {
return errorCode;
}
/**
* @param errorCode
* the errorCode to set
*/
public void setErrorCode(final String errorCode) {
this.errorCode = errorCode;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(final String message) {
this.message = message;
}
}

View File

@@ -0,0 +1,49 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* A generic abstract rest model which contains only a ID for use-case e.g.
* which allows only posting or putting an ID into the request body, e.g. for
* assignments.
*
*
*
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class IdRest {
@ApiModelProperty(value = ApiModelProperties.ITEM_ID)
@JsonProperty
private Long id;
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(final Long id) {
this.id = id;
}
}

View File

@@ -0,0 +1,69 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* The representation of an meta data in the REST API.
*
*
*
*
*/
@ApiModel(ApiModelProperties.META_DATA)
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class MetadataRest {
@ApiModelProperty(required = true, value = "The key of the meta data")
@JsonProperty(required = true)
private String key;
@ApiModelProperty(required = false, value = "The value of the meta data")
@JsonProperty
private String value;
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(final String key) {
this.key = key;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* @param value
* the value to set
*/
public void setValue(final String value) {
this.value = value;
}
}

View File

@@ -0,0 +1,44 @@
/**
* 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;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
/**
* The rest model for a paged meta data list.
*
*
*
*
*/
public class MetadataRestPageList extends PagedList<MetadataRest> {
@ApiModelProperty(value = "a list of meta data", required = true)
private final List<MetadataRest> content;
/**
* @param content
* the meta data rest model list as content
* @param total
* the total number of the meta data
*/
public MetadataRestPageList(final List<MetadataRest> content, final long total) {
super(content, total);
this.content = content;
}
/**
* @return the content of this paged list
*/
public List<MetadataRest> getContent() {
return content;
}
}

View File

@@ -0,0 +1,64 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for NamedEntity to RESTful API representation.
*
*
*
*
*/
public abstract class NamedEntityRest extends BaseEntityRest {
@ApiModelProperty(value = ApiModelProperties.NAME, required = true)
@JsonProperty(required = true)
private String name;
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(final String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
}

View File

@@ -0,0 +1,74 @@
/**
* 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;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import org.springframework.hateoas.ResourceSupport;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.annotations.ApiModelProperty;
/**
* 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.
*
* @param <T>
* the type of elements in this list
*
*
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(Include.NON_NULL)
public class PagedList<T> extends ResourceSupport {
@ApiModelProperty(value = ApiModelProperties.TOTAL_ELEMENTS, required = false)
private final long totalElements;
@ApiModelProperty(value = ApiModelProperties.SIZE, required = true)
private final int size;
/**
* creates a new paged list with the given {@code content} and {@code total}
* .
*
* @param content
* the actual content of the list
* @param total
* the total amount of elements
* @throws NullPointerException
* in case {@code content} is {@code null}.
*/
public PagedList(@NotNull final List<T> content, final long total) {
this.size = content.size();
this.totalElements = total;
}
/**
* @return the size of the content list
*/
public int getSize() {
return size;
}
/**
* @return the total amount of elements
*/
public long getTotal() {
return totalElements;
}
}

View File

@@ -0,0 +1,89 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for PollStatus to RESTful API representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Target Poll Status")
public class PollStatusRest {
@ApiModelProperty(value = ApiModelProperties.POLL_LAST_REQUEST_AT)
@JsonProperty
private Long lastRequestAt;
@ApiModelProperty(value = ApiModelProperties.POLL_NEXT_EXPECTED_REQUEST_AT)
@JsonProperty
private Long nextExpectedRequestAt;
@ApiModelProperty(value = ApiModelProperties.POLL_OVERDUE)
@JsonProperty
private boolean overdue;
/**
* @return the lastRequestAt
*/
public Long getLastRequestAt() {
return lastRequestAt;
}
/**
* @param lastRequestAt
* the lastRequestAt to set
*/
public void setLastRequestAt(final Long lastRequestAt) {
this.lastRequestAt = lastRequestAt;
}
/**
* @return the nextExpectedRequestAt
*/
public Long getNextExpectedRequestAt() {
return nextExpectedRequestAt;
}
/**
* @param nextExpectedRequestAt
* the nextExpectedRequestAt to set
*/
public void setNextExpectedRequestAt(final Long nextExpectedRequestAt) {
this.nextExpectedRequestAt = nextExpectedRequestAt;
}
/**
* @return the overdue
*/
public boolean isOverdue() {
return overdue;
}
/**
* @param overdue
* the overdue to set
*/
public void setOverdue(final boolean overdue) {
this.overdue = overdue;
}
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.rest.resource.model.action;
import java.util.Collections;
import java.util.List;
import org.eclipse.hawkbit.rest.resource.model.PagedList;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list rest model for {@link Action} to RESTful API representation.
*
*
*
*
*/
@ApiModel("Paged list of actions")
public class ActionPagedList extends PagedList<ActionRest> {
@ApiModelProperty(value = ApiModelProperties.ACTION_LIST)
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;
}
}

View File

@@ -0,0 +1,106 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.BaseEntityRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for Action to RESTful API representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("SP Action")
public class ActionRest extends BaseEntityRest {
/**
* API definition for {@link UpdateAction}.
*/
public static final String ACTION_UPDATE = "update";
/**
* API definition for {@link CancelAction}.
*/
public static final String ACTION_CANCEL = "cancel";
public static final String ACTION_FINISHED = "finished";
public static final String ACTION_PENDING = "pending";
@ApiModelProperty(value = ApiModelProperties.ITEM_ID)
@JsonProperty("id")
private Long actionId;
@ApiModelProperty(value = ApiModelProperties.ACTION_TYPE, allowableValues = ACTION_UPDATE + "," + ACTION_CANCEL)
@JsonProperty
private String type;
@ApiModelProperty(value = ApiModelProperties.ACTION_EXECUTION_STATUS, allowableValues = ACTION_FINISHED + ","
+ ACTION_PENDING)
@JsonProperty
private String status;
/**
* @return the status
*/
public String getStatus() {
return status;
}
/**
* @param status
* the status to set
*/
public void setStatus(final String status) {
this.status = status;
}
/**
* @return the actionId
*/
public Long getActionId() {
return actionId;
}
/**
* @param actionId
* the actionId to set
*/
public void setActionId(final Long actionId) {
this.actionId = actionId;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
}

View File

@@ -0,0 +1,60 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list rest model for ActionStatus to RESTful API representation.
*
*
*
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Paged list of action status")
public class ActionStatusPagedList extends PagedList<ActionStatusRest> {
@ApiModelProperty(value = ApiModelProperties.ACTION_STATUS_LIST)
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;
}
}

View File

@@ -0,0 +1,141 @@
/**
* 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.List;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for ActionStatus to RESTful API representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("SP Action Status")
public class ActionStatusRest {
/**
* Action is finished successfully for this target.
*/
public static final String AS_FINISHED = "finished";
/**
* Action has failed for this target.
*/
public static final String AS_ERROR = "error";
/**
* Action is still running but with warnings.
*/
public static final String AS_WARNING = "warning";
/**
* Action is still running for this target.
*/
public static final String AS_RUNNING = "running";
/**
* Action has been canceled for this target.
*/
public static final String AS_CANCELED = "canceled";
/**
* Action has been presented to the target.
*/
public static final String AS_RETRIEVED = "retrieved";
@ApiModelProperty(value = ApiModelProperties.ITEM_ID)
@JsonProperty("id")
private Long statusId;
@ApiModelProperty(value = ApiModelProperties.ACTION_STATUS_TYPE, required = true, allowableValues = AS_FINISHED
+ "," + AS_ERROR + "," + AS_WARNING + "," + AS_RUNNING + "," + AS_CANCELED + "," + AS_RETRIEVED)
@JsonProperty
private String type;
@ApiModelProperty(value = ApiModelProperties.ACTION_STATUS_MESSAGES)
@JsonProperty
private List<String> messages;
@ApiModelProperty(value = ApiModelProperties.ACTION_STATUS_REPORTED_AT)
@JsonProperty
private Long reportedAt;
/**
* @return the statusId
*/
public Long getStatusId() {
return statusId;
}
/**
* @param statusId
* the statusId to set
*/
public void setStatusId(final Long statusId) {
this.statusId = statusId;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
/**
* @return the messages
*/
public List<String> getMessages() {
return messages;
}
/**
* @param messages
* the messages to set
*/
public void setMessages(final List<String> messages) {
this.messages = messages;
}
/**
* @return the reportedAt
*/
public Long getReportedAt() {
return reportedAt;
}
/**
* @param reportedAt
* the reportedAt to set
*/
public void setReportedAt(final Long reportedAt) {
this.reportedAt = reportedAt;
}
}

View File

@@ -0,0 +1,277 @@
/**
* 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);
}
}

View File

@@ -0,0 +1,276 @@
/**
* 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 json annotated rest model for Actions to RESTful API representation.
*
*
*
*
*/
public class ActionsRest extends ResourceSupport implements List<ActionRest> {
private final List<ActionRest> 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<ActionRest> 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 ActionRest 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 ActionRest> 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 ActionRest> 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 ActionRest get(final int index) {
return delegate.get(index);
}
/**
* @param index
* @param element
* @return
* @see java.util.List#set(int, java.lang.Object)
*/
@Override
public ActionRest set(final int index, final ActionRest 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 ActionRest element) {
delegate.add(index, element);
}
/**
* @param index
* @return
* @see java.util.List#remove(int)
*/
@Override
public ActionRest 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<ActionRest> listIterator() {
return delegate.listIterator();
}
/**
* @param index
* @return
* @see java.util.List#listIterator(int)
*/
@Override
public ListIterator<ActionRest> listIterator(final int index) {
return delegate.listIterator(index);
}
/**
* @param fromIndex
* @param toIndex
* @return
* @see java.util.List#subList(int, int)
*/
@Override
public List<ActionRest> subList(final int fromIndex, final int toIndex) {
return delegate.subList(fromIndex, toIndex);
}
}

View File

@@ -0,0 +1,68 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Hashes for given Artifact.
*
*
*
*
*/
@ApiModel(ApiModelProperties.ARTIFACT_HASHES)
public class ArtifactHash {
@ApiModelProperty(value = ApiModelProperties.ARTIFACT_HASHES_SHA1)
@JsonProperty
private String sha1;
@ApiModelProperty(value = ApiModelProperties.ARTIFACT_HASHES_MD5)
@JsonProperty
private String md5;
/**
* Default constructor.
*/
public ArtifactHash() {
}
/**
* Public constructor.
*
* @param sha1
* @param md5
*/
public ArtifactHash(final String sha1, final String md5) {
super();
this.sha1 = sha1;
this.md5 = md5;
}
/**
* @return the sha1
*/
public String getSha1() {
return sha1;
}
/**
* @return the md5
*/
public String getMd5() {
return md5;
}
}

View File

@@ -0,0 +1,158 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.BaseEntityRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for Artifact to RESTful API representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Software Artifact")
public class ArtifactRest extends BaseEntityRest {
@JsonProperty(required = true)
private ArtifactType type;
@ApiModelProperty(value = ApiModelProperties.ITEM_ID, required = true)
@JsonProperty("id")
private Long artifactId;
@ApiModelProperty(value = ApiModelProperties.ARTIFACT_HASHES)
@JsonProperty
private ArtifactHash hashes;
@ApiModelProperty(value = ApiModelProperties.ARTIFACT_PROVIDED_FILENAME)
@JsonProperty
private String providedFilename;
@ApiModelProperty(value = ApiModelProperties.ARTIFACT_SIZE)
@JsonProperty
private Long size;
/**
* @param type
* the type to set
*/
public void setType(final ArtifactType type) {
this.type = type;
}
/**
* @param hashes
* the hashes to set
*/
@JsonIgnore
public void setHashes(final ArtifactHash hashes) {
this.hashes = hashes;
}
/**
* @param artifactId
* the artifactId to set
*/
@JsonIgnore
public void setArtifactId(final Long artifactId) {
this.artifactId = artifactId;
}
/**
* @return the type
*/
public ArtifactType getType() {
return type;
}
/**
* @return the artifactId
*/
public Long getArtifactId() {
return artifactId;
}
/**
* @return the hashes
*/
public ArtifactHash getHashes() {
return hashes;
}
/**
* @return the providedFilename
*/
public String getProvidedFilename() {
return providedFilename;
}
/**
* @param providedFilename
* the providedFilename to set
*/
@JsonIgnore
public void setProvidedFilename(final String providedFilename) {
this.providedFilename = providedFilename;
}
/**
* Type maps to either {@link LocalArtifact} or {@link ExternalArtifact}.
*
*
*
*
*/
public enum ArtifactType {
LOCAL("local"), EXTERNAL("external");
private final String name;
private ArtifactType(final String name) {
this.name = name;
}
/**
* @return the name
*/
@JsonValue
public String getName() {
return name;
}
}
/**
* @return the size
*/
public Long getSize() {
return size;
}
/**
* @param size
* the size to set
*/
@JsonIgnore
public void setSize(final Long size) {
this.size = size;
}
}

View File

@@ -0,0 +1,279 @@
/**
* 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;
import io.swagger.annotations.ApiModel;
/**
* List representation of the {@link ArtifactRest}.
*
*
*
*
*/
@ApiModel
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);
}
}

View File

@@ -0,0 +1,50 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonValue;
/**
* Definition of the {@link ActionType} for the REST management API.
*
*
*
*
*/
public enum ActionTypeRest {
/**
* The soft action type.
*/
SOFT("soft"),
/**
* The forced action type.
*/
FORCED("forced"),
/**
* The time forced action type.
*/
TIMEFORCED("timeforced");
private final String name;
private ActionTypeRest(final String name) {
this.name = name;
}
/**
* @return the name
*/
@JsonValue
public String getName() {
return name;
}
}

View File

@@ -0,0 +1,48 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list for SoftwareModule.
*
*
*
*
*/
@ApiModel("Paged list of distribution sets")
public class DistributionSetPagedList extends PagedList<DistributionSetRest> {
@ApiModelProperty(value = ApiModelProperties.SM_LIST, required = true)
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;
}
}

View File

@@ -0,0 +1,153 @@
/**
* 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.doc.ApiModelProperties;
import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleAssigmentRest;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for DistributionSet for POST.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Distribution set")
public class DistributionSetRequestBodyCreate extends DistributionSetRequestBodyUpdate {
// deprecated format from the time where os, application and runtime where
// statically defined
@ApiModelProperty(hidden = true)
@JsonProperty
private SoftwareModuleAssigmentRest os;
@ApiModelProperty(hidden = true)
@JsonProperty
private SoftwareModuleAssigmentRest runtime;
@ApiModelProperty(hidden = true)
@JsonProperty
private SoftwareModuleAssigmentRest application;
// deprecated format - END
@ApiModelProperty(value = ApiModelProperties.DS_MODULES)
@JsonProperty
private List<SoftwareModuleAssigmentRest> modules;
@ApiModelProperty(value = ApiModelProperties.DS_REQUIRED_STEP)
@JsonProperty
private boolean requiredMigrationStep;
@ApiModelProperty(value = ApiModelProperties.DS_TYPE)
@JsonProperty
private String type;
/**
* @return the os
*/
public SoftwareModuleAssigmentRest getOs() {
return os;
}
/**
* @param os
* the os to set
*/
public void setOs(final SoftwareModuleAssigmentRest os) {
this.os = os;
}
/**
* @return the runtime
*/
public SoftwareModuleAssigmentRest getRuntime() {
return runtime;
}
/**
* @param runtime
* the runtime to set
*/
public void setRuntime(final SoftwareModuleAssigmentRest runtime) {
this.runtime = runtime;
}
/**
* @return the application
*/
public SoftwareModuleAssigmentRest getApplication() {
return application;
}
/**
* @param application
* the application to set
*/
public void setApplication(final SoftwareModuleAssigmentRest application) {
this.application = application;
}
/**
* @return the requiredMigrationStep
*/
public boolean isRequiredMigrationStep() {
return requiredMigrationStep;
}
/**
* @param requiredMigrationStep
* the requiredMigrationStep to set
*/
public void setRequiredMigrationStep(final boolean requiredMigrationStep) {
this.requiredMigrationStep = requiredMigrationStep;
}
/**
* @return the modules
*/
public List<SoftwareModuleAssigmentRest> getModules() {
return modules;
}
/**
* @param modules
* the modules to set
*/
public void setModules(final List<SoftwareModuleAssigmentRest> modules) {
this.modules = modules;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
}

View File

@@ -0,0 +1,89 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for DistributionSet for PUT/POST.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Distribution set")
public class DistributionSetRequestBodyUpdate {
@ApiModelProperty(value = ApiModelProperties.NAME, required = true)
@JsonProperty(required = true)
private String name;
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
@ApiModelProperty(value = ApiModelProperties.VERSION)
@JsonProperty
private String version;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(final String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* @return the version
*/
public String getVersion() {
return version;
}
/**
* @param version
* the version to set
*/
public void setVersion(final String version) {
this.version = version;
}
}

View File

@@ -0,0 +1,155 @@
/**
* 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.List;
import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleRest;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for DistributionSet to RESTful API
* representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Distribution set")
public class DistributionSetRest extends NamedEntityRest {
@ApiModelProperty(value = ApiModelProperties.ITEM_ID)
@JsonProperty(value = "id", required = true)
private Long dsId;
@ApiModelProperty(value = ApiModelProperties.VERSION)
@JsonProperty
private String version;
@ApiModelProperty(value = ApiModelProperties.DS_MODULES)
@JsonProperty
private List<SoftwareModuleRest> modules = new ArrayList<SoftwareModuleRest>();
@ApiModelProperty(value = ApiModelProperties.DS_REQUIRED_STEP)
@JsonProperty
private boolean requiredMigrationStep;
@ApiModelProperty(value = ApiModelProperties.DS_TYPE)
@JsonProperty
private String type;
@ApiModelProperty(value = ApiModelProperties.DS_COMPLETE)
@JsonProperty
private Boolean complete;
/**
* @return the id
*/
public Long getDsId() {
return dsId;
}
/**
* @param id
* the id to set
*/
@JsonIgnore
public void setDsId(final Long id) {
dsId = id;
}
/**
* @return the version
*/
public String getVersion() {
return version;
}
/**
* @param version
* the version to set
*/
public void setVersion(final String version) {
this.version = version;
}
/**
* @return the requiredMigrationStep
*/
public boolean isRequiredMigrationStep() {
return requiredMigrationStep;
}
/**
* @param requiredMigrationStep
* the requiredMigrationStep to set
*/
public void setRequiredMigrationStep(final boolean requiredMigrationStep) {
this.requiredMigrationStep = requiredMigrationStep;
}
/**
* @return the modules
*/
public List<SoftwareModuleRest> getModules() {
return modules;
}
/**
* @param modules
* the modules to set
*/
public void setModules(final List<SoftwareModuleRest> modules) {
this.modules = modules;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
/**
* @return the complete
*/
public Boolean getComplete() {
return complete;
}
/**
* @param complete
* the complete to set
*/
public void setComplete(final Boolean complete) {
this.complete = complete;
}
}

View File

@@ -0,0 +1,277 @@
/**
* 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);
}
}

View File

@@ -0,0 +1,85 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body of Target for assignment operations (ID only).
*
*
*
*
*/
@ApiModel("Target ID")
@JsonIgnoreProperties(ignoreUnknown = true)
public class TargetAssignmentRequestBody {
@ApiModelProperty(value = ApiModelProperties.ITEM_ID)
@JsonProperty
private String id;
@ApiModelProperty(value = "The force time in case type is 'timeforced'", required = false)
private long forcetime;
@ApiModelProperty(value = "The type of action to assign, default 'forced'", required = false, allowableValues = "soft,forced,timeforced")
private ActionTypeRest type;
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(final String id) {
this.id = id;
}
/**
* @return the type
*/
public ActionTypeRest getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final ActionTypeRest type) {
this.type = type;
}
/**
* @return the forcetime
*/
public long getForcetime() {
return forcetime;
}
/**
* @param forcetime
* the forcetime to set
*/
public void setForcetime(final long forcetime) {
this.forcetime = forcetime;
}
}

View File

@@ -0,0 +1,80 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Response Body of Target for assignment operations.
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Target Assignment Response")
public class TargetAssignmentResponseBody {
@ApiModelProperty(value = "The number of targets have been assigned")
private int assigned;
@ApiModelProperty(value = "The number of targets which already have been the assignment")
private int alreadyAssigned;
@ApiModelProperty(value = "The total number of targets")
private int total;
/**
* @return the assigned
*/
public int getAssigned() {
return assigned;
}
/**
* @param assigned
* the assigned to set
*/
public void setAssigned(final int assigned) {
this.assigned = assigned;
}
/**
* @return the alreadyAssigned
*/
public int getAlreadyAssigned() {
return alreadyAssigned;
}
/**
* @param alreadyAssigned
* the alreadyAssigned to set
*/
public void setAlreadyAssigned(final int alreadyAssigned) {
this.alreadyAssigned = alreadyAssigned;
}
/**
* @return the total
*/
public int getTotal() {
return total;
}
/**
* @param total
* the total to set
*/
public void setTotal(final int total) {
this.total = total;
}
}

View File

@@ -0,0 +1,48 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list for DistributionSetType.
*
*
*
*
*/
@ApiModel("Paged list of distribution set types")
public class DistributionSetTypePagedList extends PagedList<DistributionSetTypeRest> {
@ApiModelProperty(value = ApiModelProperties.DS_TYPE_LIST, required = true)
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;
}
}

View File

@@ -0,0 +1,124 @@
/**
* 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.doc.ApiModelProperties;
import org.eclipse.hawkbit.rest.resource.model.softwaremoduletype.SoftwareModuleTypeAssigmentRest;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body for DistributionSetType POST.
*
*
*
*
*/
public class DistributionSetTypeRequestBodyCreate {
@ApiModelProperty(value = ApiModelProperties.NAME, required = true)
@JsonProperty(required = true)
private String name;
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
@ApiModelProperty(value = ApiModelProperties.DS_TYPE_KEY)
@JsonProperty
private String key;
@ApiModelProperty(value = ApiModelProperties.DS_TYPE_MANDATORY_MODULES)
@JsonProperty
private List<SoftwareModuleTypeAssigmentRest> mandatorymodules;
@ApiModelProperty(value = ApiModelProperties.DS_TYPE_OPTIONAL_MODULES)
@JsonProperty
private List<SoftwareModuleTypeAssigmentRest> optionalmodules;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(final String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(final String key) {
this.key = key;
}
/**
* @return the mandatorymodules
*/
public List<SoftwareModuleTypeAssigmentRest> getMandatorymodules() {
return mandatorymodules;
}
/**
* @param mandatorymodules
* the mandatorymodules to set
*/
public void setMandatorymodules(final List<SoftwareModuleTypeAssigmentRest> mandatorymodules) {
this.mandatorymodules = mandatorymodules;
}
/**
* @return the optionalmodules
*/
public List<SoftwareModuleTypeAssigmentRest> getOptionalmodules() {
return optionalmodules;
}
/**
* @param optionalmodules
* the optionalmodules to set
*/
public void setOptionalmodules(final List<SoftwareModuleTypeAssigmentRest> optionalmodules) {
this.optionalmodules = optionalmodules;
}
}

View File

@@ -0,0 +1,45 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body for DistributionSetType PUT, i.e. update.
*
*
*
*
*/
public class DistributionSetTypeRequestBodyUpdate {
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
}

View File

@@ -0,0 +1,73 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for SoftwareModuleType to RESTful API
* representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Software Module")
public class DistributionSetTypeRest extends NamedEntityRest {
@ApiModelProperty(value = ApiModelProperties.ITEM_ID, required = true)
@JsonProperty(value = "id", required = true)
private Long moduleId;
@ApiModelProperty(value = ApiModelProperties.DS_TYPE_KEY)
@JsonProperty
private String key;
/**
* @return the moduleId
*/
public Long getModuleId() {
return moduleId;
}
/**
* @param moduleId
* the moduleId to set
*/
public void setModuleId(final Long moduleId) {
this.moduleId = moduleId;
}
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(final String key) {
this.key = key;
}
}

View File

@@ -0,0 +1,280 @@
/**
* 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;
import io.swagger.annotations.ApiModel;
/**
* List representation of the {@link DistributionSetTypeRest} because Spring MVC
* cannot handle plain lists interfaces as request body.
*
*
*
*
*/
@ApiModel("DistributionSetType")
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);
}
}

View File

@@ -0,0 +1,176 @@
/**
* 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.doc;
/**
* Constants for API documentation.
*
*
*
*
*/
public final class ApiModelProperties {
private static final String ENDING = " of the entity";
// generic
public static final String ITEM_ID = "the id" + ENDING;
public static final String NAME = "the name" + ENDING;
public static final String DESCRPTION = "the description" + ENDING;
public static final String CREATED_BY = "entity was originally created by (IM UUID)";
public static final String CREATED_AT = "entity was originally created at";
public static final String LAST_MODIFIED_BY = "entity was last modified by (IM UUID)";
public static final String LAST_MODIFIED_AT = "entity was last modified at";
public static final String SIZE = "current page size";
public static final String TOTAL_ELEMENTS = "total number of elements";
// Versioned entity
public static final String VERSION = "software version";
// software module
public static final String SOFTWARE_MODULE_TYPE = "the software module type " + ENDING;
public static final String VENDOR = "the software vendor " + ENDING;
public static final String ARTIFACT_HASHES = "hashes of the artifact";
public static final String ARTIFACT_SIZE = "size of the artifact";
public static final String ARTIFACT_PROVIDED_FILENAME = "filename of the artifact";
public static final String ARTIFACT_HASHES_SHA1 = "SHA1 hash of the artifact";
public static final String ARTIFACT_HASHES_MD5 = "MD5 hash of the artifact";
public static final String DS_OS = "operating system or firmware software module - DEPRECATED (use modules)";
public static final String DS_RUNTIME = "runtime software module (e.g. JVM) - DEPRECATED (use modules)";
public static final String DS_APPLICATION = "application software module (e.g. OSGi container) - DEPRECATED (use modules)";
public static final String DS_MODULES = "software modules (e.g. OSGi bundles, runtimes)";
public static final String DS_REQUIRED_STEP = "is a required migration step";
// Target
public static final String INSTALLED_AT = "installation time of current installed DistributionSet";
public static final String LAST_REQUEST_AT = "last time where the target polled the server, same as pollStatus.lastRequestAt";
// poll status
public static final String POLL_LAST_REQUEST_AT = "last time where the target polled the server";
public static final String POLL_NEXT_EXPECTED_REQUEST_AT = "next expected time where the target polls the server";
public static final String POLL_OVERDUE = "defines if the target poll time is overdued based on the next expected poll time plus the configured overdue poll time threshold";
public static final String UPDATE_STATUS = "current update status";
public static final String TARGET_ATTRIBUTES = "target attributes";
public static final String TARGET_LIST = "list of targets";
public static final String SM_LIST = "list of software modules";
public static final String ACTION_TYPE = "type of action";
public static final String ACTION_STATUS_TYPE = "type of the action status";
public static final String ACTION_STATUS_MESSAGES = "messages related to the status";
public static final String ACTION_STATUS_REPORTED_AT = "time at which the status was reported (server time)";
public static final String ACTION_STATUS_LIST = "list of action status";
public static final String ACTION_EXECUTION_STATUS = "status of action";
public static final String ACTION_LIST = "list if actions";
public static final String POLL_STATUS = "status of the poll time of the target";
public static final String IP_ADDRESS = "last known ip-address of the target";
public static final String ADDRESS = "last known address of the target";
public static final String SECURITY_TOKEN = "the security token of this target which can be used to authenticate the target if enabled";
public static final String META_DATA = "Metadata";
public static final String SM_TYPE_KEY = "key that can be interpreted by the target";
public static final String SM_MAX_ASSIGNMENTS = "maximum number of assigments to a distribution set/target, e.g. only one firmware but multiple applications";
public static final String SM_TYPE_LIST = "list of software modules types";
// Direct Device Integration API
public static final String TARGET_TIME = "time on the target device";
public static final String TARGET_STATUS = "SP target action status";
public static final String TARGET_EXEC_STATUS = "status of the action execution";
public static final String TARGET_RESULT_VALUE = "result of the action execution";
public static final String TARGET_RESULT_DETAILS = "List of details message information";
public static final String TARGET_RESULT_FINISHED = "defined status of the result";
public static final String TARGET_RESULT_PROGRESS = "progress assumption of the device";
public static final String TARGET_PROGRESS_CNT = "current progress level";
public static final String TARGET_PROGRESS_OF = "asumption concerning max progress level";
public static final String ACTION_ID = "id of the action";
public static final String CANCEL_ACTION = "action that needs to be canceled";
public static final String CHUNK_TYPE = "type of the chunk, e.g. firmware, bundle, app";
public static final String SOFTWARE_MODUL_TYPE = "type of the software module, e.g. firmware, bundle, app";
public static final String SOFTWARE_MODULE_VERSION = "version of the software module";
public static final String SOFTWARE_MODULE_NAME = "name of the software module";
public static final String SOFTWARE_MODULE_ARTIFACT_LINKS = "artifact links of the software module";
public static final String SOFTWARE_MODUL_ID = "id of the software module";
public static final String CHUNK_VERSION = "software version of the chunk";
public static final String CHUNK_NAME = "name of the chunk";
public static final String ARTIFACTS = "list of artifacts";
public static final String TARGET_CONFIGURATION = "target configuration setup by the server";
public static final String TARGET_POLL_TIME = "suggested sleep time between polls";
public static final String TARGET_SLEEP = "sleep time in HH:MM:SS notation";
public static final String DEPLOYMENT = "detailed deployment operation";
public static final String HANDLING_DOWNLOAD = "handling for the download part of the provisioning process";
public static final String HANDLING_UPDATE = "handling for the update part of the provisioning process";
public static final String CHUNK = "software chunk of an update";
public static final String SOFTWARE_MODUL = "software moduls of an update";
public static final String ARTIFACT = "artifact moduls of an update";
public static final String TARGET_CONFIG_DATA = "configuration data as key/value list";
public static final String DS_TYPE_KEY = "funtional key of the distribution set type";
public static final String DS_TYPE_LIST = "list of distribution set types";
public static final String DS_TYPE = "the type of the distribution set";
public static final String DS_COMPLETE = "true of the distribution set software module setup is complete by means as defined by the distribution set type";
public static final String DS_TYPE_MANDATORY_MODULES = "mandatory module type IDs";
public static final String DS_TYPE_OPTIONAL_MODULES = "optional module type IDs";
private ApiModelProperties() {
// utility class
}
}

View File

@@ -0,0 +1,28 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.IdRest;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
/**
* Request Body of SoftwareModule for assignment operations (ID only).
*
*
*
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Software Module ID")
public class SoftwareModuleAssigmentRest extends IdRest {
}

View File

@@ -0,0 +1,48 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list for SoftwareModule.
*
*
*
*
*/
@ApiModel("Paged list of software modules")
public class SoftwareModulePagedList extends PagedList<SoftwareModuleRest> {
@ApiModelProperty(value = ApiModelProperties.SM_LIST, required = true)
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;
}
}

View File

@@ -0,0 +1,122 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body for SoftwareModule POST.
*
*
*
*
*/
public class SoftwareModuleRequestBodyPost {
@ApiModelProperty(value = ApiModelProperties.NAME, required = true)
@JsonProperty(required = true)
private String name;
@ApiModelProperty(value = ApiModelProperties.VERSION, required = true)
@JsonProperty(required = true)
private String version;
@ApiModelProperty(value = ApiModelProperties.SOFTWARE_MODULE_TYPE, required = true, allowableValues = SoftwareModuleRest.SM_RUNTIME
+ "," + SoftwareModuleRest.SM_APPLICATION + "," + SoftwareModuleRest.SM_OS)
@JsonProperty(required = true)
private String type;
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
@ApiModelProperty(value = ApiModelProperties.VENDOR)
@JsonProperty
private String vendor;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(final String name) {
this.name = name;
}
/**
* @return the version
*/
public String getVersion() {
return version;
}
/**
* @param version
* the version to set
*/
public void setVersion(final String version) {
this.version = version;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* @return the vendor
*/
public String getVendor() {
return vendor;
}
/**
* @param vendor
* the vendor to set
*/
public void setVendor(final String vendor) {
this.vendor = vendor;
}
}

View File

@@ -0,0 +1,64 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body for SoftwareModule PUT.
*
*
*
*
*/
public class SoftwareModuleRequestBodyPut {
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
@ApiModelProperty(value = ApiModelProperties.VENDOR)
@JsonProperty
private String vendor;
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* @return the vendor
*/
public String getVendor() {
return vendor;
}
/**
* @param vendor
* the vendor to set
*/
public void setVendor(final String vendor) {
this.vendor = vendor;
}
}

View File

@@ -0,0 +1,124 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for SoftwareModule to RESTful API representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Software Module")
public class SoftwareModuleRest extends NamedEntityRest {
/**
* API definition for {@link SoftwareModule.Type#RUNTIME}.
*/
public static final String SM_RUNTIME = "runtime";
/**
* API definition for {@link SoftwareModule.Type#OS}.
*/
public static final String SM_OS = "os";
/**
* API definition for {@link SoftwareModule.Type#APPLICATION}.
*/
public static final String SM_APPLICATION = "application";
@ApiModelProperty(value = ApiModelProperties.ITEM_ID, required = true)
@JsonProperty(value = "id", required = true)
private Long moduleId;
@ApiModelProperty(value = ApiModelProperties.VERSION, required = true)
@JsonProperty(required = true)
private String version;
@ApiModelProperty(value = ApiModelProperties.SOFTWARE_MODULE_TYPE, required = true)
@JsonProperty(required = true)
private String type;
@ApiModelProperty(value = ApiModelProperties.VENDOR)
@JsonProperty
private String vendor;
/**
* @return the moduleId
*/
public Long getModuleId() {
return moduleId;
}
/**
* @param moduleId
* the moduleId to set
*/
@JsonIgnore
public void setModuleId(final Long moduleId) {
this.moduleId = moduleId;
}
/**
* @return the version
*/
public String getVersion() {
return version;
}
/**
* @param version
* the version to set
*/
public void setVersion(final String version) {
this.version = version;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
/**
* @return the vendor
*/
public String getVendor() {
return vendor;
}
/**
* @param vendor
* the vendor to set
*/
public void setVendor(final String vendor) {
this.vendor = vendor;
}
}

View File

@@ -0,0 +1,277 @@
/**
* 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);
}
}

View File

@@ -0,0 +1,28 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.IdRest;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
/**
* Request Body of SoftwareModuleType for assignment operations (ID only).
*
*
*
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Software Module Type ID")
public class SoftwareModuleTypeAssigmentRest extends IdRest {
}

View File

@@ -0,0 +1,48 @@
/**
* 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;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list for SoftwareModuleType.
*
*
*
*
*/
@ApiModel("Paged list of software module typess")
public class SoftwareModuleTypePagedList extends PagedList<SoftwareModuleTypeRest> {
@ApiModelProperty(value = ApiModelProperties.SM_TYPE_LIST, required = true)
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;
}
}

View File

@@ -0,0 +1,102 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body for SoftwareModuleType POST.
*
*
*
*
*/
public class SoftwareModuleTypeRequestBodyPost {
@ApiModelProperty(value = ApiModelProperties.NAME, required = true)
@JsonProperty(required = true)
private String name;
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
@ApiModelProperty(value = ApiModelProperties.SM_TYPE_KEY)
@JsonProperty
private String key;
@ApiModelProperty(value = ApiModelProperties.SM_MAX_ASSIGNMENTS)
@JsonProperty
private int maxAssignments;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(final String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(final String key) {
this.key = key;
}
/**
* @return the maxAssignments
*/
public int getMaxAssignments() {
return maxAssignments;
}
/**
* @param maxAssignments
* the maxAssignments to set
*/
public void setMaxAssignments(final int maxAssignments) {
this.maxAssignments = maxAssignments;
}
}

View File

@@ -0,0 +1,45 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body for SoftwareModuleType PUT.
*
*
*
*
*/
public class SoftwareModuleTypeRequestBodyPut {
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
@JsonProperty
private String description;
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
}

View File

@@ -0,0 +1,92 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for SoftwareModuleType to RESTful API
* representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Software Module")
public class SoftwareModuleTypeRest extends NamedEntityRest {
@ApiModelProperty(value = ApiModelProperties.ITEM_ID, required = true)
@JsonProperty(value = "id", required = true)
private Long moduleId;
@ApiModelProperty(value = ApiModelProperties.SM_TYPE_KEY)
@JsonProperty
private String key;
@ApiModelProperty(value = ApiModelProperties.SM_MAX_ASSIGNMENTS)
@JsonProperty
private int maxAssignments;
/**
* @return the moduleId
*/
public Long getModuleId() {
return moduleId;
}
/**
* @param moduleId
* the moduleId to set
*/
public void setModuleId(final Long moduleId) {
this.moduleId = moduleId;
}
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(final String key) {
this.key = key;
}
/**
* @return the maxAssignments
*/
public int getMaxAssignments() {
return maxAssignments;
}
/**
* @param maxAssignments
* the maxAssignments to set
*/
public void setMaxAssignments(final int maxAssignments) {
this.maxAssignments = maxAssignments;
}
}

View File

@@ -0,0 +1,280 @@
/**
* 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;
import io.swagger.annotations.ApiModel;
/**
* List representation of the {@link SoftwareModuleTypeRest} because Spring MVC
* cannot handle plain lists interfaces as request body.
*
*
*
*
*/
@ApiModel("SoftwareModuleType")
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);
}
}

View File

@@ -0,0 +1,65 @@
/**
* 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.system;
import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* Model representation of an Cache entry as json.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class CacheRest {
private final String name;
private final Collection<String> keys;
/**
* @param name
* the name of the cache
* @param cacheKeys
* the keys which contains in the cache
*/
public CacheRest(final String name, final Collection<String> cacheKeys) {
this.name = name;
this.keys = cacheKeys;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the keys
*/
public Collection<String> getKeys() {
return keys;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "CacheRest [name=" + name + ", keys=" + keys + "]";
}
}

View File

@@ -0,0 +1,58 @@
/**
* 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.system;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.annotations.ApiModel;
/**
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Tenant Configuration")
public class TenantConfigurationRest {
private String key;
private String value;
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(final String key) {
this.key = key;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* @param value
* the value to set
*/
public void setValue(final String value) {
this.value = value;
}
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
package org.eclipse.hawkbit.rest.resource.model.target;
import org.eclipse.hawkbit.rest.resource.model.IdRest;
import org.eclipse.hawkbit.rest.resource.model.distributionset.ActionTypeRest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Request Body of DistributionSet for assignment operations (ID only).
*
*
*
*
*/
@ApiModel("Distribution Set Assignment")
public class DistributionSetAssigmentRest extends IdRest {
@ApiModelProperty(value = "forcetime in milliseconds")
private long forcetime;
@ApiModelProperty(value = "the assignment type default 'forced'")
private ActionTypeRest type;
/**
* @return the type
*/
public ActionTypeRest getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(final ActionTypeRest type) {
this.type = type;
}
/**
* @return the forcetime
*/
public long getForcetime() {
return forcetime;
}
/**
* @param forcetime
* the forcetime to set
*/
public void setForcetime(final long forcetime) {
this.forcetime = forcetime;
}
}

View File

@@ -0,0 +1,23 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
package org.eclipse.hawkbit.rest.resource.model.target;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
/**
* {@link Map} with attribtes of SP Target.
*
*
*
*
*/
@ApiModel(ApiModelProperties.TARGET_ATTRIBUTES)
public class TargetAttributes extends HashMap<String, String> {
}

View File

@@ -0,0 +1,43 @@
/**
* 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 org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Paged list for targets.
*
*
*
*
*/
@ApiModel("Paged list of targets")
public class TargetPagedList extends PagedList<TargetRest> {
@ApiModelProperty(value = ApiModelProperties.TARGET_LIST, required = true)
private final List<TargetRest> content;
/**
* @param content
* @param total
*/
public TargetPagedList(final List<TargetRest> content, 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;
}
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
package org.eclipse.hawkbit.rest.resource.model.target;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
/**
* Request body for target PUT/POST commands.
*
*
*
*
*/
public class TargetRequestBody {
@ApiModelProperty(value = ApiModelProperties.NAME, required = true)
@JsonProperty(required = true)
private String name;
@ApiModelProperty(value = ApiModelProperties.DESCRPTION)
private String description;
@ApiModelProperty(value = ApiModelProperties.ITEM_ID, required = true)
@JsonProperty(required = true)
private String controllerId;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @return the controllerId
*/
public String getControllerId() {
return controllerId;
}
/**
* @param name
* the name to set
*/
public void setName(final String name) {
this.name = name;
}
/**
* @param description
* the description to set
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* @param controllerId
* the controllerId to set
*/
public void setControllerId(final String controllerId) {
this.controllerId = controllerId;
}
}

View File

@@ -0,0 +1,186 @@
/**
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
*/
package org.eclipse.hawkbit.rest.resource.model.target;
import java.net.URI;
import org.eclipse.hawkbit.rest.resource.model.NamedEntityRest;
import org.eclipse.hawkbit.rest.resource.model.PollStatusRest;
import org.eclipse.hawkbit.rest.resource.model.doc.ApiModelProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A json annotated rest model for Target to RESTful API representation.
*
*
*
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("Provisioning Target")
public class TargetRest extends NamedEntityRest {
@ApiModelProperty(value = ApiModelProperties.ITEM_ID, required = true)
@JsonProperty(required = true)
private String controllerId;
@ApiModelProperty(value = ApiModelProperties.UPDATE_STATUS, allowableValues = "error, in_sync, pending, registered, unknown")
@JsonProperty
private String updateStatus;
@ApiModelProperty(value = ApiModelProperties.LAST_REQUEST_AT)
@JsonProperty
private Long lastControllerRequestAt;
@ApiModelProperty(value = ApiModelProperties.INSTALLED_AT)
@JsonProperty
private Long installedAt;
@ApiModelProperty(value = ApiModelProperties.IP_ADDRESS)
@JsonProperty
private String ipAddress;
@ApiModelProperty(value = ApiModelProperties.ADDRESS)
@JsonProperty
private String address;
@ApiModelProperty(value = ApiModelProperties.POLL_STATUS)
@JsonProperty
private PollStatusRest pollStatus;
@ApiModelProperty(value = ApiModelProperties.SECURITY_TOKEN)
@JsonProperty
private String securityToken;
/**
* @return the controllerId
*/
public String getControllerId() {
return controllerId;
}
/**
* @param controllerId
* the controllerId to set
*/
public void setControllerId(final String controllerId) {
this.controllerId = controllerId;
}
/**
* @return the updateStatus
*/
public String getUpdateStatus() {
return updateStatus;
}
/**
* @param updateStatus
* the updateStatus to set
*/
public void setUpdateStatus(final String updateStatus) {
this.updateStatus = updateStatus;
}
/**
* @return the lastControllerRequestAt
*/
public Long getLastControllerRequestAt() {
return lastControllerRequestAt;
}
/**
* @param lastControllerRequestAt
* the lastControllerRequestAt to set
*/
@JsonIgnore
public void setLastControllerRequestAt(final Long lastControllerRequestAt) {
this.lastControllerRequestAt = lastControllerRequestAt;
}
/**
* @return the installedAt
*/
public Long getInstalledAt() {
return installedAt;
}
/**
* @param installedAt
* the installedAt to set
*/
@JsonIgnore
public void setInstalledAt(final Long installedAt) {
this.installedAt = installedAt;
}
/**
* @return the pollStatus
*/
public PollStatusRest getPollStatus() {
return pollStatus;
}
/**
* @param pollStatus
* the pollStatus to set
*/
@JsonIgnore
public void setPollStatus(final PollStatusRest pollStatus) {
this.pollStatus = pollStatus;
}
/**
* @return the ipAddress
*/
public String getIpAddress() {
return ipAddress;
}
/**
* @param ipAddress
* the ipAddress to set
*/
@JsonIgnore
public void setIpAddress(final String ipAddress) {
this.ipAddress = ipAddress;
}
/**
* @return the securityToken
*/
public String getSecurityToken() {
return securityToken;
}
public String getAddress() {
return address;
}
@JsonIgnore
public void setAddress(final String address) {
if (address != null) {
URI.create(address);
}
this.address = address;
}
/**
* @param securityToken
* the securityToken to set
*/
@JsonIgnore
public void setSecurityToken(final String securityToken) {
this.securityToken = securityToken;
}
}

View File

@@ -0,0 +1,272 @@
/**
* 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);
}
}