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

📄 jbviewdefprofiles.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.config.javabeans;

import java.io.Serializable;

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


/**
 * Class corresponding to the "viewdef_profiles" element of views.xml.<br>
 * This is a list of profiles which can see a view.
 */
public class JBViewDefProfiles implements Serializable
{
    /** Profiles table, key = lower case profile name. */
    private Map viewDefProfileMap = new HashMap();

    /** Creates new JBViewDefs. */
    public JBViewDefProfiles()
    {
    }

    /**
     * Returns the list of profiles.
     * @return List of JBViewDefProfile
     */
    public Map getViewDefProfileList()
    {
        return viewDefProfileMap;
    }

    /**
     * Adds a profile to the list.
     *
     * @param v profile to add
     */
    public void addViewDefProfile(JBViewDefProfile v)
    {
        this.viewDefProfileMap.put(v.getName().trim().toLowerCase(), v);
    }

    /**
     * Gets a profile from its name.
     * ASSERT : name should not be null
     *
     * @param name profile name
     *
     * @return JBViewDefProfile object
     */
    public JBViewDefProfile findViewDefProfileByName(String name)
    {
        // rendre case insensitive en mettant le param en lowercase
        String key = name.trim().toLowerCase();

        return (JBViewDefProfile) viewDefProfileMap.get(key);
    }

    /**
     * see Object.toString().
     *
     * @return Object.toString()
     */
    public String toString()
    {
        StringBuffer buf = new StringBuffer();
        java.util.Iterator it = null;

        if (viewDefProfileMap != null)
        {
            buf.append("Map components of viewDefMap = ");
            buf.append(System.getProperty("line.separator"));
            it = viewDefProfileMap.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 + -