com.netgrif.application.engine.elastic.web.requestbodies.CaseSearchRequest Maven / Gradle / Ivy
package com.netgrif.application.engine.elastic.web.requestbodies;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CaseSearchRequest implements Serializable {
private static final long serialVersionUID = 5468800723081186371L;
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List process;
@Deprecated(since = "6.3.0")
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List processIdentifier;
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List author;
public Map data;
public String fullText;
public String uriNodeId;
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List transition;
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List role;
public String query;
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List stringId;
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
public List group;
public Map tags;
public CaseSearchRequest(Map request) {
if (request.containsKey("process") && request.get("process") instanceof List) {
List processIdentifiers = (List) request.get("process");
this.process = processIdentifiers.stream().map(PetriNet::new).collect(Collectors.toList());
}
if (request.containsKey("processIdentifier") && request.get("processIdentifier") instanceof List) {
this.processIdentifier = (List) request.get("processIdentifier");
}
if (request.containsKey("author") && request.get("author") instanceof List) {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy