First implemtation of REST-API

Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
This commit is contained in:
Fabian Nonnenmacher
2016-01-21 15:29:10 +01:00
committed by Nonnenmacher Fabian
parent 088df73ea9
commit f3fa085c62
11 changed files with 557 additions and 3 deletions

View File

@@ -116,6 +116,8 @@ public final class RestConstants {
* The target URL mapping rest resource.
*/
public static final String TARGET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targets";
public static final String SYSTEM_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/system";
/**
* The software module URL mapping rest resource.
*/

View File

@@ -18,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class TenantConfigurationRest {
public class AuthenticationConfigurationRest {
private String key;
private String value;

View File

@@ -0,0 +1,105 @@
package org.eclipse.hawkbit.rest.resource.model.system;
import java.util.Map;
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;
/**
* A json annotated rest model for System Configuration for PUT.
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class SystemConfigurationRequestBodyPut {
@JsonProperty
private String pollingTime;
@JsonProperty
private String pollingOverdueTime;
@JsonProperty
private String defaultDistributionSetType;
@JsonProperty
private Map<String, Object> authenticationConfiguration;
/**
* Gets the polling time.
*
* @return the polling time
*/
public String getPollingTime() {
return pollingTime;
}
/**
* Sets the polling time.
*
* @param pollingTime
* the new polling time
*/
public void setPollingTime(String pollingTime) {
this.pollingTime = pollingTime;
}
/**
* Gets the polling overdue time.
*
* @return the polling overdue time
*/
public String getPollingOverdueTime() {
return pollingOverdueTime;
}
/**
* Sets the polling overdue time.
*
* @param pollingOverdueTime
* the new polling overdue time
*/
public void setPollingOverdueTime(String pollingOverdueTime) {
this.pollingOverdueTime = pollingOverdueTime;
}
/**
* Gets the default distribution set type.
*
* @return the default distribution set type
*/
public String getDefaultDistributionSetType() {
return defaultDistributionSetType;
}
/**
* Sets the default distribution set type.
*
* @param defaultDistributionSetType
* the new default distribution set type
*/
public void setDefaultDistributionSetType(String defaultDistributionSetType) {
this.defaultDistributionSetType = defaultDistributionSetType;
}
/**
* Gets the authentication configuration.
*
* @return the authentication configuration
*/
public Map<String, Object> getAuthenticationConfiguration() {
return authenticationConfiguration;
}
/**
* Sets the authentication configuration.
*
* @param authenticationConfiguration
* the authentication configuration
*/
public void setAuthenticationConfiguration(Map<String, Object> authenticationConfiguration) {
this.authenticationConfiguration = authenticationConfiguration;
}
}

View File

@@ -0,0 +1,194 @@
package org.eclipse.hawkbit.rest.resource.model.system;
import java.util.Map;
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;
/**
* A json annotated rest model for SysteConfiguration to RESTful API
* representation.
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class SystemConfigurationRest {
@JsonProperty
private String pollingTime;
@JsonProperty
private String pollingOverdueTime;
@JsonProperty
private String defaultDistributionSetType;
@JsonProperty
private String createdBy;
@JsonProperty
private String lastModifiedBy;
@JsonProperty
private Long createdAt;
@JsonProperty
private Long lastModifiedAt;
@JsonProperty
private Map<String, Object> authenticationConfiguration;
/**
* Gets the polling time.
*
* @return the polling time
*/
public String getPollingTime() {
return pollingTime;
}
/**
* Sets the polling time.
*
* @param pollingTime
* the new polling time
*/
public void setPollingTime(String pollingTime) {
this.pollingTime = pollingTime;
}
/**
* Gets the polling overdue time.
*
* @return the polling overdue time
*/
public String getPollingOverdueTime() {
return pollingOverdueTime;
}
/**
* Sets the polling overdue time.
*
* @param pollingOverdueTime
* the new polling overdue time
*/
public void setPollingOverdueTime(String pollingOverdueTime) {
this.pollingOverdueTime = pollingOverdueTime;
}
/**
* Gets the default distribution set type.
*
* @return the default distribution set type
*/
public String getDefaultDistributionSetType() {
return defaultDistributionSetType;
}
/**
* Sets the default distribution set type.
*
* @param defaultDistributionSetType
* the new default distribution set type
*/
public void setDefaultDistributionSetType(String defaultDistributionSetType) {
this.defaultDistributionSetType = defaultDistributionSetType;
}
/**
* Gets the created by.
*
* @return the created by
*/
public String getCreatedBy() {
return createdBy;
}
/**
* Sets the created by.
*
* @param createdBy
* the new created by
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* Gets the last modified by.
*
* @return the last modified by
*/
public String getLastModifiedBy() {
return lastModifiedBy;
}
/**
* Sets the last modified by.
*
* @param lastModifiedBy
* the new last modified by
*/
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
/**
* Gets the created at.
*
* @return the created at
*/
public Long getCreatedAt() {
return createdAt;
}
/**
* Sets the created at.
*
* @param createdAt
* the new created at
*/
public void setCreatedAt(Long createdAt) {
this.createdAt = createdAt;
}
/**
* Gets the last modified at.
*
* @return the last modified at
*/
public Long getLastModifiedAt() {
return lastModifiedAt;
}
/**
* Sets the last modified at.
*
* @param lastModifiedAt
* the new last modified at
*/
public void setLastModifiedAt(Long lastModifiedAt) {
this.lastModifiedAt = lastModifiedAt;
}
/**
* Sets the authentication configuration.
*
* @param authenticationConfiguration
* the authentication configuration
*/
public void setAuthenticationConfiguration(Map<String, Object> authenticationConfiguration) {
this.authenticationConfiguration = authenticationConfiguration;
}
/**
* Gets the authentication configuration.
*
* @return the authentication configuration
*/
public Map<String, Object> getAuthenticationConfiguration() {
return this.authenticationConfiguration;
}
}