47 lines
1.1 KiB
Java
47 lines
1.1 KiB
Java
package org.gcube.informationsystem.web.rest;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.Map;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
|
|
|
//Risorsa da inviare per la creazione
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
public class FormDataJson {
|
|
private Map<String, String> properties;
|
|
private Map<String, String> extraProperties;
|
|
public FormDataJson(){
|
|
properties = new HashMap<>();
|
|
extraProperties = new HashMap<>();
|
|
}
|
|
|
|
@JsonAnySetter
|
|
public void addProperty(String property, String value){
|
|
properties.put(property, value);
|
|
}
|
|
@JsonAnySetter
|
|
public void addExtraProperty(String extraProp, String value){
|
|
properties.put(extraProp, value);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
class Student {
|
|
private Map<String, String> properties;
|
|
public Student(){
|
|
properties = new HashMap<>();
|
|
}
|
|
public Map<String, String> getProperties(){
|
|
return properties;
|
|
}
|
|
@JsonAnySetter
|
|
public void add(String property, String value){
|
|
properties.put(property, value);
|
|
}
|
|
}*/ |