Remove swagger and minor feature extensions and bug fixes

- Various Bug fixes and improvements
- Management API extended
- Swagger removed
- Guava Upgraded to 19
This commit is contained in:
Kai Zimmermann
2016-01-21 13:42:38 +01:00
parent fb9dfd204c
commit 64deaeea3c
813 changed files with 9787 additions and 4929 deletions

View File

@@ -12,15 +12,14 @@ import java.net.URL;
/**
* Resolve to reach the server url.
*
*
*
*/
@FunctionalInterface
public interface HostnameResolver {
/**
*
*
*
*
* @return
*/
URL resolveHostname();

View File

View File

View File

View File

View File

View File

@@ -12,7 +12,7 @@ package org.eclipse.hawkbit.exception;
*
*
*
* Define the Error code for Error handling
* Define the Error code for Error handling
*
*/
@@ -69,8 +69,7 @@ public enum SpServerError {
*
*/
SP_REST_BODY_NOT_READABLE("hawkbit.server.error.rest.body.notReadable",
"The given request body is not well formed"), SP_UI_SEARCH("hawkbit.server.error.ui.searchError",
"blabla :-)"),
"The given request body is not well formed"),
/**
*
*/
@@ -113,7 +112,6 @@ public enum SpServerError {
/**
*
*/
SP_ARTIFACT_LOAD_FAILED("hawkbit.server.error.artifact.loadFailed",
"Load of artifact failed with internal server error."),
@@ -124,26 +122,34 @@ public enum SpServerError {
"Too many status entries have been inserted."),
/**
*
*/
*
*/
SP_ATTRIBUTES_TO_MANY_ENTRIES("hawkbit.server.error.target.attributes.tooManyEntries",
"Too many attribute entries have been inserted."),
/**
*
*/
* error message, which describes that the action can not be canceled cause
* the action is inactive.
*/
SP_ACTION_NOT_CANCELABLE("hawkbit.server.error.action.notcancelable",
"Only active actions which are in status pending are canceable"),
"Only active actions which are in status pending are canceable."),
/**
*
*/
* error message, which describes that the action can not be force quit
* cause the action is inactive.
*/
SP_ACTION_NOT_FORCE_QUITABLE("hawkbit.server.error.action.notforcequitable",
"Only active actions which are in status pending can be force quit."),
/**
*
*/
SP_DS_INCOMPLETE("hawkbit.server.error.distributionset.incomplete",
"Distribution set is assigned to a a target that is incomplete (i.e. mandatory modules are missing)"),
/**
*
*/
*
*/
SP_DS_TYPE_UNDEFINED("hawkbit.server.error.distributionset.type.undefined",
"Distribution set type is not yet defined. Modules cannot be added until definition."),
@@ -154,8 +160,8 @@ public enum SpServerError {
"Distribution set type does not contain the given module, i.e. is incompatible."),
/**
*
*/
*
*/
SP_REPO_TENANT_NOT_EXISTS("hawkbit.server.error.repo.tenantNotExists",
"The entity cannot be inserted due the tenant does not exists"),
@@ -181,10 +187,20 @@ public enum SpServerError {
this.message = message;
}
/**
* Gets the key of the error
*
* @return the key of the error
*/
public String getKey() {
return key;
}
/**
* Gets the message of the error
*
* @return message of the error
*/
public String getMessage() {
return message;
}

View File

@@ -15,7 +15,7 @@ package org.eclipse.hawkbit.repository;
*
*
*/
public enum ActionFields implements FieldNameProvider, FieldValueConverter<ActionFields> {
public enum ActionFields implements FieldNameProvider,FieldValueConverter<ActionFields> {
/**
* The status field.
@@ -51,7 +51,7 @@ public enum ActionFields implements FieldNameProvider, FieldValueConverter<Actio
}
}
private Object convertStatusValue(final String value) {
private static Object convertStatusValue(final String value) {
final String trimmedValue = value.trim();
if (trimmedValue.equalsIgnoreCase(ACTIVE)) {
return 1;
@@ -62,12 +62,6 @@ public enum ActionFields implements FieldNameProvider, FieldValueConverter<Actio
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.rest.resource.model.FieldValueConverter#
* possibleValues(java.lang.Enum)
*/
@Override
public String[] possibleValues(final ActionFields e) {
switch (e) {

View File

@@ -12,10 +12,9 @@ package org.eclipse.hawkbit.repository;
* An interface for declaring the name of the field described in the database
* which is used as string representation of the field, e.g. for sorting the
* fields over REST.
*
*
*
*/
@FunctionalInterface
public interface FieldNameProvider {
/**

View File

@@ -0,0 +1,40 @@
/**
* 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.repository;
/**
* Describing the fields of the Tag model which can be used in the REST API e.g.
* for sorting etc.
*
*/
public enum TagFields implements FieldNameProvider {
/**
* The name field.
*/
NAME("name"),
/**
* The description field.
*/
DESCRIPTION("description"),
/**
* The controllerId field.
*/
COLOUR("colour");
private final String fieldName;
private TagFields(final String fieldName) {
this.fieldName = fieldName;
}
@Override
public String getFieldName() {
return fieldName;
}
}

View File

@@ -10,7 +10,7 @@ package org.eclipse.hawkbit.tenancy;
/**
* Interface for components that are aware of the application's current tenant.
*
*
*
*
*
@@ -20,7 +20,7 @@ public interface TenantAware {
/**
* Implementation might retrieve the current tenant from a session or
* thread-local.
*
*
* @return the current tenant
*/
String getCurrentTenant();
@@ -31,7 +31,7 @@ public interface TenantAware {
* specific tenant e.g. under control of an {@link ThreadLocal}. After the
* {@link TenantRunner} it must be ensured that the original tenant before
* this invocation is reset.
*
*
* @param tenant
* the tenant which the specific code should run
* @param tenantRunner
@@ -47,17 +47,18 @@ public interface TenantAware {
* An {@link TenantRunner} interface which allows to run specific code under
* a given tenant by using the
* {@link TenantAware#runAsTenant(String, TenantRunner)}.
*
*
*
*
*
* @param <T>
* the return type of the runner
*/
@FunctionalInterface
interface TenantRunner<T> {
/**
* Called to run specific code and a given tenant.
*
*
* @return the return of the code block running under a certain tenant
*/
T run();