Merge branch 'master' into feature_rsql_parser_suggestion

Conflicts:
	hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterHeader.java


Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-09-21 09:14:04 +02:00
173 changed files with 993 additions and 762 deletions

View File

@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.repository;
import java.net.URI;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.validation.constraints.NotNull;
@@ -19,7 +20,7 @@ import org.eclipse.hawkbit.repository.eventbus.event.DownloadProgressEvent;
import org.eclipse.hawkbit.repository.exception.EntityAlreadyExistsException;
import org.eclipse.hawkbit.repository.exception.EntityNotFoundException;
import org.eclipse.hawkbit.repository.exception.ToManyAttributeEntriesException;
import org.eclipse.hawkbit.repository.exception.ToManyStatusEntriesException;
import org.eclipse.hawkbit.repository.exception.TooManyStatusEntriesException;
import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.Action.Status;
import org.eclipse.hawkbit.repository.model.ActionStatus;
@@ -95,7 +96,7 @@ public interface ControllerManagement {
*
* @throws EntityAlreadyExistsException
* if a given entity already exists
* @throws ToManyStatusEntriesException
* @throws TooManyStatusEntriesException
* if more than the allowed number of status entries are
* inserted
*/
@@ -111,7 +112,18 @@ public interface ControllerManagement {
* @return a list of actions assigned to given target which are active
*/
@PreAuthorize(SpringEvalExpressions.IS_CONTROLLER)
List<Action> findActionByTargetAndActive(@NotNull Target target);
List<Action> findActiveActionByTarget(@NotNull Target target);
/**
* Retrieves oldest {@link Action} that is active and assigned to a
* {@link Target}.
*
* @param target
* the target to retrieve the actions from
* @return a list of actions assigned to given target which are active
*/
@PreAuthorize(SpringEvalExpressions.IS_CONTROLLER)
Optional<Action> findOldestActiveActionByTarget(@NotNull Target target);
/**
* Get the {@link Action} entity for given actionId with all lazy

View File

@@ -131,7 +131,7 @@ public interface SoftwareManagement {
* @return created {@link Entity}
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_CREATE_REPOSITORY)
List<SoftwareModuleType> createSoftwareModuleType(@NotNull final Collection<SoftwareModuleType> types);
List<SoftwareModuleType> createSoftwareModuleType(@NotNull Collection<SoftwareModuleType> types);
/**
* Creates new {@link SoftwareModuleType}.
@@ -483,21 +483,20 @@ public interface SoftwareManagement {
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_REPOSITORY)
SoftwareModuleType updateSoftwareModuleType(@NotNull SoftwareModuleType sm);
/**
* Finds all meta data by the given software module id.
*
* @param softwareModuleId
* the software module id to retrieve the meta data from
*
*
* @throws RSQLParameterUnsupportedFieldException
* if a field in the RSQL string is used but not provided by the
* given {@code fieldNameProvider}
* @throws RSQLParameterSyntaxException
* if the RSQL syntax is wrong
* @return result of all meta data entries for a given software
* module id.
* @return result of all meta data entries for a given software module id.
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
List<SoftwareModuleMetadata> findSoftwareModuleMetadataBySoftwareModuleId(Long softwareModuleId);

View File

@@ -31,7 +31,18 @@ public class ConstraintViolationException extends AbstractServerRtException {
* thrown
*/
public ConstraintViolationException(final javax.validation.ConstraintViolationException ex) {
super(getExceptionMessage(ex), SpServerError.SP_REPO_CONSTRAINT_VIOLATION);
this(getExceptionMessage(ex));
}
/**
* Creates a new {@link ConstraintViolationException} with the error code
* {@link SpServerError#SP_REPO_CONSTRAINT_VIOLATION}.
*
* @param msgText
* the message text for this exception
*/
public ConstraintViolationException(final String msgText) {
super(msgText, SpServerError.SP_REPO_CONSTRAINT_VIOLATION);
}
/**

View File

@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.AbstractServerRtException;
*
*
*/
public final class ToManyStatusEntriesException extends AbstractServerRtException {
public final class TooManyStatusEntriesException extends AbstractServerRtException {
/**
*
*/
@@ -28,7 +28,7 @@ public final class ToManyStatusEntriesException extends AbstractServerRtExceptio
* Creates a new FileUploadFailedException with
* {@link SpServerError#SP_REST_BODY_NOT_READABLE} error.
*/
public ToManyStatusEntriesException() {
public TooManyStatusEntriesException() {
super(SpServerError.SP_ACTION_STATUS_TO_MANY_ENTRIES);
}
@@ -36,7 +36,7 @@ public final class ToManyStatusEntriesException extends AbstractServerRtExceptio
* @param cause
* for the exception
*/
public ToManyStatusEntriesException(final Throwable cause) {
public TooManyStatusEntriesException(final Throwable cause) {
super(SpServerError.SP_ACTION_STATUS_TO_MANY_ENTRIES, cause);
}
@@ -44,7 +44,7 @@ public final class ToManyStatusEntriesException extends AbstractServerRtExceptio
* @param message
* of the error
*/
public ToManyStatusEntriesException(final String message) {
public TooManyStatusEntriesException(final String message) {
super(message, SpServerError.SP_ACTION_STATUS_TO_MANY_ENTRIES);
}
}