com.netgrif.application.engine.StringToDataSetConverter.groovy 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
import com.netgrif.application.engine.workflow.domain.DataField
import groovy.json.JsonSlurper
import org.springframework.core.convert.converter.Converter
import org.springframework.stereotype.Component
@Component
class StringToDataSetConverter implements Converter> {
private JsonSlurper slurper = new JsonSlurper()
@Override
LinkedHashMap convert(String s) {
return (slurper.parseText(s) as Map).collectEntries {
return [(it.key): new DataField(it.value)]
} as LinkedHashMap
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy