com.netgrif.application.engine.workflow.web.responsebodies.DataFieldsResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.workflow.web.responsebodies;
import com.netgrif.application.engine.petrinet.domain.dataset.Field;
import lombok.Getter;
import lombok.Setter;
import org.springframework.hateoas.CollectionModel;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.stream.Collectors;
@Setter
@Getter
public class DataFieldsResource extends CollectionModel implements Serializable, Iterable {
private static final long serialVersionUID = 73213276016133399L;
private Collection content;
public DataFieldsResource(Collection content, Locale locale) {
super();
this.content = content.stream()
.map(f -> LocalisedFieldFactory.from(f, locale))
.collect(Collectors.toList());
}
@Override
public Iterator iterator() {
return this.content.iterator();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy