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

org.glassfish.admingui.connector.GadgetModulePrefsInjector 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 = "ModulePrefs", metadata = "@author=optional,@author=datatype:java.lang.String,@author=leaf,@author_email=optional,@author_email=datatype:java.lang.String,@author_email=leaf,@description=optional,@description=datatype:java.lang.String,@description=leaf,@screenshot=optional,@screenshot=datatype:java.lang.String,@screenshot=leaf,@thumbnail=optional,@thumbnail=datatype:java.lang.String,@thumbnail=leaf,@title=optional,@title=datatype:java.lang.String,@title=leaf,@title_url=optional,@title_url=datatype:java.lang.String,@title_url=leaf,target=org.glassfish.admingui.connector.GadgetModulePrefs")
@InjectionTarget(GadgetModulePrefs.class)
public class GadgetModulePrefsInjector
    extends ConfigInjector
{


    public void inject(Dom dom, GadgetModulePrefs target) {
        attribute_setTitle(dom, target);
        attribute_setTitleUrl(dom, target);
        attribute_setDescription(dom, target);
        attribute_setAuthor(dom, target);
        attribute_setAuthorEmail(dom, target);
        attribute_setScreenshot(dom, target);
        attribute_setThumbnail(dom, target);
    }

    public void injectAttribute(Dom dom, String name, GadgetModulePrefs target) {
        if ("title".equals(name)) {
            attribute_setTitle(dom, target);
        }
        if ("title_url".equals(name)) {
            attribute_setTitleUrl(dom, target);
        }
        if ("description".equals(name)) {
            attribute_setDescription(dom, target);
        }
        if ("author".equals(name)) {
            attribute_setAuthor(dom, target);
        }
        if ("author_email".equals(name)) {
            attribute_setAuthorEmail(dom, target);
        }
        if ("screenshot".equals(name)) {
            attribute_setScreenshot(dom, target);
        }
        if ("thumbnail".equals(name)) {
            attribute_setThumbnail(dom, target);
        }
    }

    public void injectElement(Dom dom, String name, GadgetModulePrefs target) {
    }

    public void attribute_setTitle(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("title");
        if (v1 == null) {
            return ;
        }
        target.setTitle(v1);
    }

    public void attribute_setTitleUrl(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("title_url");
        if (v1 == null) {
            return ;
        }
        target.setTitleUrl(v1);
    }

    public void attribute_setDescription(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("description");
        if (v1 == null) {
            return ;
        }
        target.setDescription(v1);
    }

    public void attribute_setAuthor(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("author");
        if (v1 == null) {
            return ;
        }
        target.setAuthor(v1);
    }

    public void attribute_setAuthorEmail(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("author_email");
        if (v1 == null) {
            return ;
        }
        target.setAuthorEmail(v1);
    }

    public void attribute_setScreenshot(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("screenshot");
        if (v1 == null) {
            return ;
        }
        target.setScreenshot(v1);
    }

    public void attribute_setThumbnail(Dom dom, GadgetModulePrefs target) {
        String v1 = dom.attribute("thumbnail");
        if (v1 == null) {
            return ;
        }
        target.setThumbnail(v1);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy