Merge remote-tracking branch 'eclipse/master' into feature_MECS-86_tenant_specific_polling_configuration

# Conflicts:
#
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/Tena
ntConfigurationDashboardView.java
This commit is contained in:
Kai Zimmermann
2016-03-14 09:51:00 +01:00
40 changed files with 667 additions and 439 deletions

View File

@@ -572,7 +572,7 @@ public class DeploymentManagement {
@Modifying
@Transactional
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
public Action forceQuitAction(@NotNull final Action action, @NotNull final Target target) {
public Action forceQuitAction(@NotNull final Action action) {
final Action mergedAction = entityManager.merge(action);
if (!mergedAction.isCancelingOrCanceled()) {

View File

@@ -69,7 +69,7 @@ import org.springframework.data.domain.Persistable;
@Index(name = "sp_idx_target_03", columnList = "tenant,controller_id,assigned_distribution_set"),
@Index(name = "sp_idx_target_04", columnList = "tenant,created_at"),
@Index(name = "sp_idx_target_prim", columnList = "tenant,id") }, uniqueConstraints = @UniqueConstraint(columnNames = {
"controller_id", "tenant" }, name = "uk_tenant_controller_id") )
"controller_id", "tenant" }, name = "uk_tenant_controller_id"))
@NamedEntityGraph(name = "Target.detail", attributeNodes = { @NamedAttributeNode("tags"),
@NamedAttributeNode(value = "assignedDistributionSet"), @NamedAttributeNode(value = "targetInfo") })
public class Target extends NamedEntity implements Persistable<Long> {
@@ -81,21 +81,21 @@ public class Target extends NamedEntity implements Persistable<Long> {
private String controllerId;
@Transient
private boolean isNew = false;
private boolean entityNew = false;
@ManyToMany(targetEntity = TargetTag.class)
@JoinTable(name = "sp_target_target_tag", joinColumns = {
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target") ) }, inverseJoinColumns = {
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag") ) })
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target")) }, inverseJoinColumns = {
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag")) })
private Set<TargetTag> tags = new HashSet<>();
@CascadeOnDelete
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true, cascade = { CascadeType.REMOVE })
@JoinColumn(name = "target", insertable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_act_hist_targ") )
@JoinColumn(name = "target", insertable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_act_hist_targ"))
private final List<Action> actions = new ArrayList<>();
@ManyToOne(optional = true, fetch = FetchType.LAZY, targetEntity = DistributionSet.class)
@JoinColumn(name = "assigned_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_assign_ds") )
@JoinColumn(name = "assigned_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_assign_ds"))
private DistributionSet assignedDistributionSet;
@CascadeOnDelete
@@ -217,15 +217,15 @@ public class Target extends NamedEntity implements Persistable<Long> {
@Override
@Transient
public boolean isNew() {
return isNew;
return entityNew;
}
/**
* @param isNew
* the isNew to set
*/
public void setNew(final boolean isNew) {
this.isNew = isNew;
public void setNew(final boolean entityNew) {
this.entityNew = entityNew;
}
/**

View File

@@ -75,11 +75,11 @@ public class TargetInfo implements Persistable<Long>, Serializable {
private Long targetId;
@Transient
private boolean isNew = false;
private boolean entityNew = false;
@CascadeOnDelete
@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REMOVE }, fetch = FetchType.LAZY, targetEntity = Target.class)
@JoinColumn(name = "target_id", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_stat_targ") )
@JoinColumn(name = "target_id", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_stat_targ"))
@MapsId
// use deprecated annotation until HHH-8862 is fixed
// @SuppressWarnings( "deprecation" )
@@ -100,7 +100,7 @@ public class TargetInfo implements Persistable<Long>, Serializable {
private TargetUpdateStatus updateStatus = TargetUpdateStatus.UNKNOWN;
@ManyToOne(optional = true, fetch = FetchType.LAZY)
@JoinColumn(name = "installed_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_inst_ds") )
@JoinColumn(name = "installed_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_inst_ds"))
private DistributionSet installedDistributionSet;
/**
@@ -110,7 +110,7 @@ public class TargetInfo implements Persistable<Long>, Serializable {
@Column(name = "attribute_value", length = 128)
@MapKeyColumn(name = "attribute_key", nullable = false, length = 32)
@CollectionTable(name = "sp_target_attributes", joinColumns = {
@JoinColumn(name = "target_id") }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target") )
@JoinColumn(name = "target_id") }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target"))
// use deprecated annotation until HHH-8862 is fixed
// @org.hibernate.annotations.ForeignKey( name = "fk_targ_attrib_target" )
@@ -159,15 +159,15 @@ public class TargetInfo implements Persistable<Long>, Serializable {
@Override
@Transient
public boolean isNew() {
return isNew;
return entityNew;
}
/**
* @param isNew
* the isNew to set
*/
public void setNew(final boolean isNew) {
this.isNew = isNew;
public void setNew(final boolean entityNew) {
this.entityNew = entityNew;
}
/**