All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.glassfish.admingui.connector.GadgetContentInjector Maven / Gradle / Ivy

There is a newer version: 7.2024.1.Alpha1
Show newest version

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);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy