Removed JPA dependencies from runtime. Test only now.
Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -12,8 +12,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.ArtifactManagement;
|
||||
import org.eclipse.hawkbit.repository.EntityFactory;
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaLocalArtifact;
|
||||
import org.eclipse.hawkbit.repository.model.LocalArtifact;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
@@ -38,6 +38,7 @@ public class ArtifactBeanQuery extends AbstractBeanQuery<LocalArtifact> {
|
||||
private static final long serialVersionUID = -333786310371208962L;
|
||||
private Sort sort = new Sort(Direction.DESC, "filename");
|
||||
private transient ArtifactManagement artifactManagement = null;
|
||||
private transient EntityFactory entityFactory;
|
||||
private transient Page<LocalArtifact> firstPagetArtifacts = null;
|
||||
private Long baseSwModuleId = null;
|
||||
|
||||
@@ -73,7 +74,7 @@ public class ArtifactBeanQuery extends AbstractBeanQuery<LocalArtifact> {
|
||||
|
||||
@Override
|
||||
protected LocalArtifact constructBean() {
|
||||
return new JpaLocalArtifact();
|
||||
return entityFactory.generateLocalArtifact();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,4 +117,11 @@ public class ArtifactBeanQuery extends AbstractBeanQuery<LocalArtifact> {
|
||||
}
|
||||
return artifactManagement;
|
||||
}
|
||||
|
||||
private EntityFactory getEntityFactory() {
|
||||
if (entityFactory == null) {
|
||||
entityFactory = SpringContextHelper.getBean(EntityFactory.class);
|
||||
}
|
||||
return entityFactory;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ package org.eclipse.hawkbit.ui.artifacts.smtable;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaSoftwareModule;
|
||||
|
||||
/**
|
||||
*
|
||||
* Proxy for software module to display details in Software modules table.
|
||||
@@ -19,7 +17,7 @@ import org.eclipse.hawkbit.repository.jpa.model.JpaSoftwareModule;
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyBaseSoftwareModuleItem extends JpaSoftwareModule {
|
||||
public class ProxyBaseSoftwareModuleItem {
|
||||
|
||||
private static final long serialVersionUID = -1555306616599140635L;
|
||||
|
||||
@@ -39,6 +37,11 @@ public class ProxyBaseSoftwareModuleItem extends JpaSoftwareModule {
|
||||
|
||||
private String modifiedByUser;
|
||||
|
||||
private String name;
|
||||
private String version;
|
||||
private String vendor;
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
@@ -47,6 +50,38 @@ public class ProxyBaseSoftwareModuleItem extends JpaSoftwareModule {
|
||||
swId = RANDOM_OBJ.nextLong();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(final String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public void setVendor(final String vendor) {
|
||||
this.vendor = vendor;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(final String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCreatedByUser() {
|
||||
return createdByUser;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,18 @@ public class DistributionSetIdName implements Serializable {
|
||||
private final Long id;
|
||||
private final String name;
|
||||
private final String version;
|
||||
|
||||
|
||||
public static DistributionSetIdName generate(final DistributionSet distributionSet) {
|
||||
return new DistributionSetIdName(distributionSet.getId(), distributionSet.getName(),
|
||||
distributionSet.getVersion());
|
||||
|
||||
}
|
||||
|
||||
public static DistributionSetIdName generate(final Long id, final String name, final String version) {
|
||||
return new DistributionSetIdName(id, name, version);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the {@link DistributionSet#getId()}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.components;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaDistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.ui.common.DistributionSetIdName;
|
||||
|
||||
@@ -17,7 +16,7 @@ import org.eclipse.hawkbit.ui.common.DistributionSetIdName;
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyDistribution extends JpaDistributionSet {
|
||||
public class ProxyDistribution {
|
||||
|
||||
private static final long serialVersionUID = -8891449133620645310L;
|
||||
|
||||
@@ -35,6 +34,11 @@ public class ProxyDistribution extends JpaDistributionSet {
|
||||
|
||||
private String nameVersion;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String version;
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @return the nameVersion
|
||||
*/
|
||||
@@ -43,7 +47,7 @@ public class ProxyDistribution extends JpaDistributionSet {
|
||||
}
|
||||
|
||||
public DistributionSetIdName getDistributionSetIdName() {
|
||||
return DistributionSetIdName.generate(this);
|
||||
return DistributionSetIdName.generate(id, name, version);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,4 +106,36 @@ public class ProxyDistribution extends JpaDistributionSet {
|
||||
this.modifiedByUser = modifiedByUser;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(final String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(final String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.components;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaTargetFilterQuery;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyTargetFilter extends JpaTargetFilterQuery {
|
||||
public class ProxyTargetFilter {
|
||||
|
||||
private static final long serialVersionUID = 6622060929679084419L;
|
||||
|
||||
@@ -23,6 +21,12 @@ public class ProxyTargetFilter extends JpaTargetFilterQuery {
|
||||
|
||||
private String modifiedDate;
|
||||
|
||||
private String name;
|
||||
private Long id;
|
||||
private String createdBy;
|
||||
private String lastModifiedBy;
|
||||
private String query;
|
||||
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
@@ -46,4 +50,44 @@ public class ProxyTargetFilter extends JpaTargetFilterQuery {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLastModifiedBy() {
|
||||
return lastModifiedBy;
|
||||
}
|
||||
|
||||
public void setLastModifiedBy(final String lastModifiedBy) {
|
||||
this.lastModifiedBy = lastModifiedBy;
|
||||
}
|
||||
|
||||
public String getQuery() {
|
||||
return query;
|
||||
}
|
||||
|
||||
public void setQuery(final String query) {
|
||||
this.query = query;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(final String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
import org.eclipse.hawkbit.repository.EntityFactory;
|
||||
import org.eclipse.hawkbit.repository.SystemManagement;
|
||||
import org.eclipse.hawkbit.repository.exception.EntityAlreadyExistsException;
|
||||
import org.eclipse.hawkbit.repository.jpa.TenantMetaDataRepository;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetType;
|
||||
import org.eclipse.hawkbit.repository.model.TenantMetaData;
|
||||
@@ -92,9 +91,6 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
|
||||
@Autowired
|
||||
private transient SystemManagement systemManagement;
|
||||
|
||||
@Autowired
|
||||
private transient TenantMetaDataRepository tenantMetaDataRepository;
|
||||
|
||||
@Autowired
|
||||
private transient EntityFactory entityFactory;
|
||||
|
||||
@@ -225,8 +221,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
|
||||
}
|
||||
|
||||
private DistributionSetType getDefaultDistributionSetType() {
|
||||
final TenantMetaData tenantMetaData = tenantMetaDataRepository
|
||||
.findByTenantIgnoreCase(systemManagement.currentTenant());
|
||||
final TenantMetaData tenantMetaData = systemManagement.getTenantMetadata();
|
||||
return tenantMetaData.getDefaultDsType();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,10 @@ package org.eclipse.hawkbit.ui.rollout.rollout;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaRollout;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.Rollout.RolloutStatus;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
||||
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
|
||||
|
||||
import com.vaadin.server.FontAwesome;
|
||||
@@ -20,7 +22,7 @@ import com.vaadin.server.FontAwesome;
|
||||
* Proxy rollout with custom properties.
|
||||
*
|
||||
*/
|
||||
public class ProxyRollout extends JpaRollout {
|
||||
public class ProxyRollout {
|
||||
|
||||
private static final long serialVersionUID = 4539849939617681918L;
|
||||
|
||||
@@ -46,6 +48,17 @@ public class ProxyRollout extends JpaRollout {
|
||||
|
||||
private Set<SoftwareModule> swModules;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String version;
|
||||
private String description;
|
||||
private DistributionSet distributionSet;
|
||||
private String createdBy;
|
||||
private String lastModifiedBy;
|
||||
private long forcedTime;
|
||||
private RolloutStatus status;
|
||||
private TotalTargetCountStatus totalTargetCountStatus;
|
||||
|
||||
/**
|
||||
* @return the isRequiredMigrationStep
|
||||
*/
|
||||
@@ -214,4 +227,83 @@ public class ProxyRollout extends JpaRollout {
|
||||
return FontAwesome.CIRCLE_O.getHtml();
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(final String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(final String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public DistributionSet getDistributionSet() {
|
||||
return distributionSet;
|
||||
}
|
||||
|
||||
public void setDistributionSet(final DistributionSet distributionSet) {
|
||||
this.distributionSet = distributionSet;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(final String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getLastModifiedBy() {
|
||||
return lastModifiedBy;
|
||||
}
|
||||
|
||||
public void setLastModifiedBy(final String lastModifiedBy) {
|
||||
this.lastModifiedBy = lastModifiedBy;
|
||||
}
|
||||
|
||||
public long getForcedTime() {
|
||||
return forcedTime;
|
||||
}
|
||||
|
||||
public void setForcedTime(final long forcedTime) {
|
||||
this.forcedTime = forcedTime;
|
||||
}
|
||||
|
||||
public RolloutStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(final RolloutStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public TotalTargetCountStatus getTotalTargetCountStatus() {
|
||||
return totalTargetCountStatus;
|
||||
}
|
||||
|
||||
public void setTotalTargetCountStatus(final TotalTargetCountStatus totalTargetCountStatus) {
|
||||
this.totalTargetCountStatus = totalTargetCountStatus;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +138,6 @@ public class RolloutBeanQuery extends AbstractBeanQuery<ProxyRollout> {
|
||||
final TotalTargetCountStatus totalTargetCountActionStatus = rollout.getTotalTargetCountStatus();
|
||||
proxyRollout.setTotalTargetCountStatus(totalTargetCountActionStatus);
|
||||
proxyRollout.setTotalTargetsCount(String.valueOf(rollout.getTotalTargets()));
|
||||
|
||||
proxyRollout.setDescription(distributionSet.getDescription());
|
||||
proxyRollout.setType(distributionSet.getType().getName());
|
||||
proxyRollout.setIsRequiredMigrationStep(distributionSet.isRequiredMigrationStep());
|
||||
proxyRollout.setSwModules(distributionSet.getModules());
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.rollout.rolloutgroup;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaRolloutGroup;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorAction;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorCondition;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupStatus;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessAction;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessCondition;
|
||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
||||
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
|
||||
|
||||
/**
|
||||
* Proxy rollout group with renderer properties.
|
||||
*
|
||||
*/
|
||||
public class ProxyRolloutGroup extends JpaRolloutGroup {
|
||||
public class ProxyRolloutGroup {
|
||||
|
||||
private static final long serialVersionUID = -2745056813306692356L;
|
||||
|
||||
@@ -41,6 +46,23 @@ public class ProxyRolloutGroup extends JpaRolloutGroup {
|
||||
|
||||
private String totalTargetsCount;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String createdBy;
|
||||
private String lastModifiedBy;
|
||||
private RolloutGroupStatus status;
|
||||
private TotalTargetCountStatus totalTargetCountStatus;
|
||||
|
||||
private RolloutGroupSuccessCondition successCondition;
|
||||
private String successConditionExp;
|
||||
private RolloutGroupSuccessAction successAction;
|
||||
private String successActionExp;
|
||||
private RolloutGroupErrorCondition errorCondition;
|
||||
private String errorConditionExp;
|
||||
private RolloutGroupErrorAction errorAction;
|
||||
private String errorActionExp;
|
||||
|
||||
private RolloutRendererData rolloutRendererData;
|
||||
|
||||
public RolloutRendererData getRolloutRendererData() {
|
||||
@@ -216,4 +238,124 @@ public class ProxyRolloutGroup extends JpaRolloutGroup {
|
||||
this.totalTargetsCount = totalTargetsCount;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(final String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(final String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getLastModifiedBy() {
|
||||
return lastModifiedBy;
|
||||
}
|
||||
|
||||
public void setLastModifiedBy(final String lastModifiedBy) {
|
||||
this.lastModifiedBy = lastModifiedBy;
|
||||
}
|
||||
|
||||
public RolloutGroupStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(final RolloutGroupStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public TotalTargetCountStatus getTotalTargetCountStatus() {
|
||||
return totalTargetCountStatus;
|
||||
}
|
||||
|
||||
public void setTotalTargetCountStatus(final TotalTargetCountStatus totalTargetCountStatus) {
|
||||
this.totalTargetCountStatus = totalTargetCountStatus;
|
||||
}
|
||||
|
||||
public RolloutGroupSuccessCondition getSuccessCondition() {
|
||||
return successCondition;
|
||||
}
|
||||
|
||||
public void setSuccessCondition(final RolloutGroupSuccessCondition successCondition) {
|
||||
this.successCondition = successCondition;
|
||||
}
|
||||
|
||||
public String getSuccessConditionExp() {
|
||||
return successConditionExp;
|
||||
}
|
||||
|
||||
public void setSuccessConditionExp(final String successConditionExp) {
|
||||
this.successConditionExp = successConditionExp;
|
||||
}
|
||||
|
||||
public RolloutGroupSuccessAction getSuccessAction() {
|
||||
return successAction;
|
||||
}
|
||||
|
||||
public void setSuccessAction(final RolloutGroupSuccessAction successAction) {
|
||||
this.successAction = successAction;
|
||||
}
|
||||
|
||||
public String getSuccessActionExp() {
|
||||
return successActionExp;
|
||||
}
|
||||
|
||||
public void setSuccessActionExp(final String successActionExp) {
|
||||
this.successActionExp = successActionExp;
|
||||
}
|
||||
|
||||
public RolloutGroupErrorCondition getErrorCondition() {
|
||||
return errorCondition;
|
||||
}
|
||||
|
||||
public void setErrorCondition(final RolloutGroupErrorCondition errorCondition) {
|
||||
this.errorCondition = errorCondition;
|
||||
}
|
||||
|
||||
public String getErrorConditionExp() {
|
||||
return errorConditionExp;
|
||||
}
|
||||
|
||||
public void setErrorConditionExp(final String errorConditionExp) {
|
||||
this.errorConditionExp = errorConditionExp;
|
||||
}
|
||||
|
||||
public RolloutGroupErrorAction getErrorAction() {
|
||||
return errorAction;
|
||||
}
|
||||
|
||||
public void setErrorAction(final RolloutGroupErrorAction errorAction) {
|
||||
this.errorAction = errorAction;
|
||||
}
|
||||
|
||||
public String getErrorActionExp() {
|
||||
return errorActionExp;
|
||||
}
|
||||
|
||||
public void setErrorActionExp(final String errorActionExp) {
|
||||
this.errorActionExp = errorActionExp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user