org.glassfish.admingui.connector.GadgetUserPrefInjector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of payara-micro Show documentation
Show all versions of payara-micro Show documentation
Payara-Micro Distribution of the Payara Project
package org.glassfish.admingui.connector;
import org.jvnet.hk2.annotations.Service;
import org.jvnet.hk2.config.ConfigInjector;
import org.jvnet.hk2.config.Dom;
import org.jvnet.hk2.config.InjectionTarget;
@Service(name = "UserPref", metadata = "@datatype=optional,@datatype=datatype:java.lang.String,@datatype=leaf,@default_value=optional,@default_value=datatype:java.lang.String,@default_value=leaf,@display_name=optional,@display_name=datatype:java.lang.String,@display_name=leaf,@name=required,@name=datatype:java.lang.String,@name=leaf,@required=optional,@required=default:false,@required=datatype:java.lang.Boolean,@required=leaf,@urlparam=optional,@urlparam=datatype:java.lang.String,@urlparam=leaf,key=@name,keyed-as=org.glassfish.admingui.connector.GadgetUserPref,target=org.glassfish.admingui.connector.GadgetUserPref")
@InjectionTarget(GadgetUserPref.class)
public class GadgetUserPrefInjector
extends ConfigInjector
{
public void inject(Dom dom, GadgetUserPref target) {
attribute_setName(dom, target);
attribute_setDisplayName(dom, target);
attribute_setURLParam(dom, target);
attribute_setDataType(dom, target);
attribute_setRequired(dom, target);
attribute_setDefaultValue(dom, target);
}
public void injectAttribute(Dom dom, String name, GadgetUserPref target) {
if ("name".equals(name)) {
attribute_setName(dom, target);
}
if ("display_name".equals(name)) {
attribute_setDisplayName(dom, target);
}
if ("urlparam".equals(name)) {
attribute_setURLParam(dom, target);
}
if ("datatype".equals(name)) {
attribute_setDataType(dom, target);
}
if ("required".equals(name)) {
attribute_setRequired(dom, target);
}
if ("default_value".equals(name)) {
attribute_setDefaultValue(dom, target);
}
}
public void injectElement(Dom dom, String name, GadgetUserPref target) {
}
public void attribute_setName(Dom dom, GadgetUserPref target) {
String v1 = dom.attribute("name");
target.setName(v1);
}
public void attribute_setDisplayName(Dom dom, GadgetUserPref target) {
String v1 = dom.attribute("display_name");
if (v1 == null) {
return ;
}
target.setDisplayName(v1);
}
public void attribute_setURLParam(Dom dom, GadgetUserPref target) {
String v1 = dom.attribute("urlparam");
if (v1 == null) {
return ;
}
target.setURLParam(v1);
}
public void attribute_setDataType(Dom dom, GadgetUserPref target) {
String v1 = dom.attribute("datatype");
if (v1 == null) {
return ;
}
target.setDataType(v1);
}
public void attribute_setRequired(Dom dom, GadgetUserPref target) {
String v1 = dom.attribute("required");
if (v1 == null) {
return ;
}
target.setRequired(asBoolean(v1));
}
public void attribute_setDefaultValue(Dom dom, GadgetUserPref target) {
String v1 = dom.attribute("default_value");
if (v1 == null) {
return ;
}
target.setDefaultValue(v1);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy