⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jbressourcerequest.java

📁 OPIAM stands for Open Identity and Access Management. This Suite will provide modules for user & rig
💻 JAVA
字号:
/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.faare.struts.service.beans;

import org.apache.log4j.Logger;

import java.util.HashMap;
import java.util.Map;


/**
 * This class corresponds to the "ressource_request" element of the requests_config.xml file.
 * It allows to associate search form fields with searched business bean fields.
 */
public class JBRessourceRequest implements java.io.Serializable
{
    /** Instance of logger. */
    private static Logger _logger = Logger.getLogger(JBRessourceRequest.class.getName());

    /** Searched business bean resource name (defined in profiles_config.xml). */
    private String name;

    /** List of JBFormField. */
    private Map formMap = new HashMap();

    /** Creates new JBRessourceRequest. */
    public JBRessourceRequest()
    {
    }

    /**
     * Returns the searched business bean resource name (defined in profiles_config.xml).
     * @return resource name
     */
    public String getName()
    {
        return name;
    }

    /**
     * Sets the the searched business bean resource name (defined in profiles_config.xml).
     * @param aname The name to set
     */
    public void setName(String aname)
    {
        this.name = aname;
    }

    /**
    * Returns the list of form fields.
    * @return Map with name as key, JBFormField as value
    */
    public Map getFormMap()
    {
        return formMap;
    }

    /**
     * Adds a form field.
     *
     * @param form form field
     */
    public void addForm(JBFormField form)
    {
        formMap.put(form.getName().trim(), form);
    }

    /**
     * Gets a search form field from its name.
     *
     * @param aname form field name
     *
     * @return form field
     */
    public JBFormField findFormByName(String aname)
    {
        _logger.debug("findFormByName name : " + aname);

        String key = aname.trim();

        return (JBFormField) formMap.get(key);
    }

    /**
     * Displays object definition.
     *
     * @return String formatted object definition.
     */
    public String toString()
    {
        StringBuffer buf = new StringBuffer();
        java.util.Iterator it = null;

        buf.append("      name = ");
        buf.append(name);
        buf.append(System.getProperty("line.separator"));

        if (formMap != null)
        {
            buf.append("   Map components of formMap = ");
            buf.append(System.getProperty("line.separator"));
            it = formMap.values().iterator();

            while (it.hasNext())
            {
                buf.append("   ...");
                buf.append(it.next());
                buf.append(System.getProperty("line.separator"));
            }
        }

        return buf.toString();
    }

    // end of toString method
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -