All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netgrif.application.engine.workflow.web.responsebodies.DataFieldsResource Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.3.3
Show newest version
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