Added REST interfaces for tenant configuration
- added GET, DELETE and PUT function on configuration value interfaces - changed Exception in TenantConfigurationManagement for correct mapping to HTTP Status - added function to get global configurations from TenantConfigurationManagement, to have only one class for handling these configuration values Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
This commit is contained in:
committed by
Nonnenmacher Fabian
parent
4be880587a
commit
ec79e9bd19
@@ -1,105 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
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 Map<String, TenantConfigurationValueRest> configuration;
|
||||
|
||||
/**
|
||||
* Sets the authentication configuration.
|
||||
*
|
||||
* @param configuration
|
||||
* the authentication configuration
|
||||
*/
|
||||
public void setConfiguration(final Map<String, TenantConfigurationValueRest> configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the authentication configuration.
|
||||
*
|
||||
* @return the authentication configuration
|
||||
*/
|
||||
public Map<String, TenantConfigurationValueRest> getConfiguration() {
|
||||
return this.configuration;
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
public class TenantConfigurationRest {
|
||||
|
||||
private String key;
|
||||
private String value;
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
* @return the key
|
||||
@@ -41,7 +41,7 @@ public class TenantConfigurationRest {
|
||||
/**
|
||||
* @return the value
|
||||
*/
|
||||
public String getValue() {
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class TenantConfigurationRest {
|
||||
* @param value
|
||||
* the value to set
|
||||
*/
|
||||
public void setValue(final String value) {
|
||||
public void setValue(final Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for System Configuration for PUT.
|
||||
*/
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class TenantConfigurationValueRequest {
|
||||
|
||||
@JsonProperty
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the value of the TenantConfigurationValueRequest
|
||||
*/
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets teh TenantConfigurationValueRequest
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setValue(final Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user