Merge branch 'eclipse/master' into

fix_unhandled_ConstraintViolationException

Conflicts:
	hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleTable.java
	hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java


Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
SirWayne
2016-08-19 14:38:28 +02:00
149 changed files with 2846 additions and 2510 deletions

View File

@@ -281,6 +281,16 @@ public interface DistributionSetManagement {
Page<DistributionSetMetadata> findDistributionSetMetadataByDistributionSetId(@NotNull Long distributionSetId,
@NotNull Pageable pageable);
/**
* Finds all meta data by the given distribution set id.
*
* @param distributionSetId
* the distribution set id to retrieve the meta data from
* @return list of distributionSetMetadata for a given distribution set Id.
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
List<DistributionSetMetadata> findDistributionSetMetadataByDistributionSetId(@NotNull Long distributionSetId);
/**
* finds all meta data by the given distribution set id.
*

View File

@@ -483,5 +483,23 @@ 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.
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
List<SoftwareModuleMetadata> findSoftwareModuleMetadataBySoftwareModuleId(Long softwareModuleId);
}

View File

@@ -20,18 +20,18 @@ import org.eclipse.hawkbit.repository.model.TenantAwareBaseEntity;
public class AbstractPropertyChangeEvent<E extends TenantAwareBaseEntity> extends AbstractBaseEntityEvent<E> {
private static final long serialVersionUID = -3671601415138242311L;
private final transient Map<String, Values> changeSet;
private final transient Map<String, PropertyChange> changeSet;
/**
* Initialize base entity and property changed with old and new value.
*
*
* @param baseEntity
* entity changed
* @param changeSetValues
* details of properties changed and old value and new value of
* the changed properties
*/
public AbstractPropertyChangeEvent(final E baseEntity, final Map<String, Values> changeSetValues) {
public AbstractPropertyChangeEvent(final E baseEntity, final Map<String, PropertyChange> changeSetValues) {
super(baseEntity);
this.changeSet = changeSetValues;
}
@@ -39,27 +39,27 @@ public class AbstractPropertyChangeEvent<E extends TenantAwareBaseEntity> extend
/**
* @return the changeSet
*/
public Map<String, Values> getChangeSet() {
public Map<String, PropertyChange> getChangeSet() {
return changeSet;
}
/**
* Carries old value and new value of a property .
*
*/
public class Values {
public static class PropertyChange {
private final Object oldValue;
private final Object newValue;
/**
* Initialize old value and new changes value of property.
*
*
* @param oldValue
* old value before change
* @param newValue
* new value after change
*/
public Values(final Object oldValue, final Object newValue) {
public PropertyChange(final Object oldValue, final Object newValue) {
super();
this.oldValue = oldValue;
this.newValue = newValue;
@@ -78,6 +78,5 @@ public class AbstractPropertyChangeEvent<E extends TenantAwareBaseEntity> extend
public Object getNewValue() {
return newValue;
}
}
}

View File

@@ -22,8 +22,7 @@ public class ActionPropertyChangeEvent extends AbstractPropertyChangeEvent<Actio
* @param action
* @param changeSetValues
*/
public ActionPropertyChangeEvent(final Action action,
final Map<String, AbstractPropertyChangeEvent<Action>.Values> changeSetValues) {
public ActionPropertyChangeEvent(final Action action, final Map<String, PropertyChange> changeSetValues) {
super(action, changeSetValues);
}

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.repository.eventbus.event;
import org.eclipse.hawkbit.repository.model.DistributionSet;
/**
* Defines the {@link AbstractBaseEntityEvent} of creating a new {@link DistributionSet}.
*
*/
public class DistributionCreatedEvent extends AbstractBaseEntityEvent<DistributionSet> {
private static final long serialVersionUID = 1L;
/**
* @param distributionSet
* the distributionSet which has been created
*/
public DistributionCreatedEvent(final DistributionSet distributionSet) {
super(distributionSet);
}
}

View File

@@ -0,0 +1,36 @@
/**
* 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.eventbus.event;
import org.eclipse.hawkbit.eventbus.event.AbstractDistributedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSet;
/**
* Defines the {@link AbstractDistributedEvent} for deletion of
* {@link DistributionSet}.
*/
public class DistributionDeletedEvent extends AbstractDistributedEvent {
private static final long serialVersionUID = -3308850381757843098L;
private final Long distributionId;
/**
* @param tenant
* the tenant for this event
* @param distributionId
* the ID of the distribution set which has been deleted
*/
public DistributionDeletedEvent(final String tenant, final Long distributionId) {
super(-1, tenant);
this.distributionId = distributionId;
}
public Long getDistributionSetId() {
return distributionId;
}
}

View File

@@ -0,0 +1,29 @@
/**
* 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.eventbus.event;
import org.eclipse.hawkbit.repository.model.DistributionSet;
/**
* Defines the {@link AbstractBaseEntityEvent} for update a {@link DistributionSet}.
*
*/
public class DistributionSetUpdateEvent extends AbstractBaseEntityEvent<DistributionSet> {
private static final long serialVersionUID = 1L;
/**
* Constructor
* @param ds Distribution Set
*/
public DistributionSetUpdateEvent(final DistributionSet ds) {
super(ds);
}
}

View File

@@ -20,12 +20,12 @@ public class RolloutGroupPropertyChangeEvent extends AbstractPropertyChangeEvent
private static final long serialVersionUID = 4026477044419472686L;
/**
*
*
* @param rolloutGroup
* @param changeSetValues
*/
public RolloutGroupPropertyChangeEvent(final RolloutGroup rolloutGroup,
final Map<String, AbstractPropertyChangeEvent<RolloutGroup>.Values> changeSetValues) {
final Map<String, PropertyChange> changeSetValues) {
super(rolloutGroup, changeSetValues);
}

View File

@@ -19,12 +19,11 @@ public class RolloutPropertyChangeEvent extends AbstractPropertyChangeEvent<Roll
private static final long serialVersionUID = 1056221355466373514L;
/**
*
*
* @param rollout
* @param changeSetValues
*/
public RolloutPropertyChangeEvent(final Rollout rollout,
final Map<String, AbstractPropertyChangeEvent<Rollout>.Values> changeSetValues) {
public RolloutPropertyChangeEvent(final Rollout rollout, final Map<String, PropertyChange> changeSetValues) {
super(rollout, changeSetValues);
}

View File

@@ -0,0 +1,41 @@
/**
* 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.eventbus.event;
import org.eclipse.hawkbit.eventbus.event.AbstractDistributedEvent;
import org.eclipse.hawkbit.repository.model.Target;
/**
*
* Defines the {@link AbstractBaseEntityEvent} of deleting a {@link Target}.
*/
public class TargetDeletedEvent extends AbstractDistributedEvent {
private static final long serialVersionUID = 1L;
private final long targetId;
/**
* @param tenant
* the tenant for this event
* @param targetId
* the ID of the target which has been deleted
*/
public TargetDeletedEvent(final String tenant, final long targetId) {
super(-1, tenant);
this.targetId = targetId;
}
/**
* @return the targetId
*/
public long getTargetId() {
return targetId;
}
}

View File

@@ -0,0 +1,31 @@
/**
* 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.eventbus.event;
import org.eclipse.hawkbit.repository.model.Target;
/**
* Defines the {@link AbstractBaseEntityEvent} of updating a {@link Target}.
*
*/
public class TargetUpdatedEvent extends AbstractBaseEntityEvent<Target> {
private static final long serialVersionUID = 5665118668865832477L;
/**
* Constructor
*
* @param baseEntity
* Target entity
*/
public TargetUpdatedEvent(final Target baseEntity) {
super(baseEntity);
}
}

View File

@@ -12,16 +12,9 @@ import java.io.Serializable;
/**
* An abstract report series.
*
*
*
*
*/
public class AbstractReportSeries implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private final String name;

View File

@@ -14,13 +14,11 @@ import java.util.List;
/**
* A simple list report series which just contains a list of values of a report.
*
*
*
*
*/
public class ListReportSeries extends AbstractReportSeries {
private static final long serialVersionUID = 1L;
private final List<Number> data = new ArrayList<>();
/**
@@ -50,8 +48,8 @@ public class ListReportSeries extends AbstractReportSeries {
* @param values
*/
private void setData(final Number... values) {
this.data.clear();
Collections.addAll(this.data, values);
data.clear();
Collections.addAll(data, values);
}
/**