Software module metadata available to targets (in DMF and DDI) (#608)

* Software module metadata can be configure as target visible.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Added metadata to DDI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Managed by UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Complete DMF integration and started UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add DMF tests and completed UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add RSQL test. Fix sonar issues.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add JavaDocs. foreachtenant robustness.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Review feedback included.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Updated DMF docs.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* targetVisible optional in builder.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix typos.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix checkbox ID.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* DB optimization.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix component ID of sm metadat details tab.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-12-16 17:17:54 +01:00
committed by GitHub
parent c3035231e2
commit 80d9f1b8fc
108 changed files with 1883 additions and 917 deletions

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.builder;
import java.util.Optional;
/**
* Create and update builder DTO.
*
* @param <T>
* update or create builder interface
*/
public abstract class AbstractMetadataUpdateCreate<T> {
protected String key;
protected String value;
public T key(final String key) {
this.key = key;
return (T) this;
}
public String getKey() {
return key;
}
public T value(final String value) {
this.value = value;
return (T) this;
}
public Optional<String> getValue() {
return Optional.ofNullable(value);
}
}

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.builder;
import java.util.Optional;
/**
* Create and update builder DTO.
*
* @param <T>
* update or create builder interface
*/
public abstract class AbstractSoftwareModuleMetadataUpdateCreate<T> extends AbstractMetadataUpdateCreate<T> {
protected Boolean targetVisible;
protected long softwareModuleId;
public T softwareModuleId(final long softwareModuleId) {
this.softwareModuleId = softwareModuleId;
return (T) this;
}
public long getSoftwareModuleId() {
return softwareModuleId;
}
public Optional<Boolean> isTargetVisible() {
return Optional.ofNullable(targetVisible);
}
public T targetVisible(final Boolean targetVisible) {
this.targetVisible = targetVisible;
return (T) this;
}
}

View File

@@ -0,0 +1,23 @@
/**
* 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.builder;
/**
* Update implementation.
*/
public class GenericSoftwareModuleMetadataUpdate
extends AbstractSoftwareModuleMetadataUpdateCreate<SoftwareModuleMetadataUpdate>
implements SoftwareModuleMetadataUpdate {
public GenericSoftwareModuleMetadataUpdate(final long softwareModuleId, final String key) {
super.softwareModuleId = softwareModuleId;
this.key = key;
}
}