Merge branch 'master' into feature_ui_metadata

Conflicts:
	hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/CommonDialogWindow.java
	hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/distributions/dstable/DistributionSetDetails.java
	hawkbit-ui/src/main/resources/messages_en.properties
	
Resolved the conflicts.
This commit is contained in:
gah6kor
2016-07-15 14:40:55 +02:00
83 changed files with 2020 additions and 1717 deletions

View File

@@ -10,6 +10,7 @@ package org.eclipse.hawkbit.repository.jpa;
import java.util.Collection;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.hawkbit.repository.EntityFactory;
import org.eclipse.hawkbit.repository.jpa.model.JpaAction;
import org.eclipse.hawkbit.repository.jpa.model.JpaActionStatus;
@@ -87,6 +88,14 @@ public class JpaEntityFactory implements EntityFactory {
return new JpaTarget(controllerId);
}
@Override
public Target generateTarget(final String controllerId, final String securityToken) {
if (StringUtils.isEmpty(securityToken)) {
return new JpaTarget(controllerId);
}
return new JpaTarget(controllerId, securityToken);
}
@Override
public TargetTag generateTargetTag() {
return new JpaTargetTag();

View File

@@ -132,7 +132,7 @@ public class JpaSoftwareManagement implements SoftwareManagement {
final JpaSoftwareModuleType type = softwareModuleTypeRepository.findOne(sm.getId());
boolean updated = false;
if (sm.getDescription() != null && !sm.getDescription().equals(type.getDescription())) {
if (sm.getDescription() == null || !sm.getDescription().equals(type.getDescription())) {
type.setDescription(sm.getDescription());
updated = true;
}

View File

@@ -115,9 +115,21 @@ public class JpaTarget extends AbstractJpaNamedEntity implements Persistable<Lon
* controller ID of the {@link Target}
*/
public JpaTarget(final String controllerId) {
this(controllerId, SecurityTokenGeneratorHolder.getInstance().generateToken());
}
/**
* Constructor.
*
* @param controllerId
* controller ID of the {@link Target}
* @param securityToken
* for target authentication if enabled
*/
public JpaTarget(final String controllerId, final String securityToken) {
this.controllerId = controllerId;
setName(controllerId);
securityToken = SecurityTokenGeneratorHolder.getInstance().generateToken();
this.securityToken = securityToken;
targetInfo = new JpaTargetInfo(this);
}