org.glassfish.admingui.connector.GadgetContentInjector 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
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 = "Content", metadata = "@href=optional,@href=datatype:java.lang.String,@href=leaf,@type=optional,@type=datatype:java.lang.String,@type=leaf,target=org.glassfish.admingui.connector.GadgetContent")
@InjectionTarget(GadgetContent.class)
public class GadgetContentInjector
extends ConfigInjector
{
public void inject(Dom dom, GadgetContent target) {
attribute_setType(dom, target);
attribute_setHref(dom, target);
}
public void injectAttribute(Dom dom, String name, GadgetContent target) {
if ("type".equals(name)) {
attribute_setType(dom, target);
}
if ("href".equals(name)) {
attribute_setHref(dom, target);
}
}
public void injectElement(Dom dom, String name, GadgetContent target) {
}
public void attribute_setType(Dom dom, GadgetContent target) {
String v1 = dom.attribute("type");
if (v1 == null) {
return ;
}
target.setType(v1);
}
public void attribute_setHref(Dom dom, GadgetContent target) {
String v1 = dom.attribute("href");
if (v1 == null) {
return ;
}
target.setHref(v1);
}
}