Extend the Rollout filtration fields with status and Distribution set
Extend the Rollout filtration fields with status and Distribution set
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Describing the fields of the Rollout model which can be used in the REST API
|
||||
* e.g. for sorting etc.
|
||||
@@ -25,12 +29,35 @@ public enum RolloutFields implements FieldNameProvider {
|
||||
/**
|
||||
* The id field.
|
||||
*/
|
||||
ID("id");
|
||||
ID("id"),
|
||||
/**
|
||||
* The status field.
|
||||
*/
|
||||
STATUS("status"),
|
||||
/**
|
||||
* The Distribution set field.
|
||||
*/
|
||||
DISTRIBUTIONSET("distributionSet", DistributionSetFields.ID.getFieldName(),
|
||||
DistributionSetFields.NAME.getFieldName(), DistributionSetFields.VERSION.getFieldName(),
|
||||
DistributionSetFields.TYPE.getFieldName());
|
||||
|
||||
private final String fieldName;
|
||||
|
||||
private final List<String> subEntityAttributes;
|
||||
|
||||
private RolloutFields(final String fieldName) {
|
||||
this.fieldName = fieldName;
|
||||
this.subEntityAttributes = Collections.emptyList();
|
||||
}
|
||||
|
||||
private RolloutFields(final String fieldName, final String... subEntityAttributes) {
|
||||
this.fieldName = fieldName;
|
||||
this.subEntityAttributes = Arrays.asList(subEntityAttributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getSubEntityAttributes() {
|
||||
return Collections.unmodifiableList(subEntityAttributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user