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

📄 uicache.java

📁 国外的一套开源CRM
💻 JAVA
字号:
/*
 * 
 * Copyright (c) 2004 SourceTap - www.sourcetap.com
 *
 *  The contents of this file are subject to the SourceTap Public License 
 * ("License"); You may not use this file except in compliance with the 
 * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 */

package com.sourcetap.sfa.ui;

import org.ofbiz.base.util.UtilCache;


/**
 * DOCUMENT ME!
 *
 */
public class UICache extends UtilCache {
    private static final boolean DEBUG = false;

    public UICache() {
        super("UI Cache");
    }

    /**
     * DOCUMENT ME!
     *
     * @param attributeId 
     *
     * @return 
     */
    public UIAttribute getUiAttribute(String attributeId) {
        return (UIAttribute) (get("UIAttribute_" + attributeId));
    }

    /**
     * DOCUMENT ME!
     *
     * @param attributeId 
     * @param uiAttribute 
     */
    public synchronized void putUiAttribute(String attributeId,
        UIAttribute uiAttribute) {
        put("UIAttribute_" + attributeId, uiAttribute);
    }

    /**
     * DOCUMENT ME!
     *
     * @param attributeId 
     */
    public synchronized void removeUiAttribute(String attributeId) {
        remove("UIAttribute_" + attributeId);
    }

    /**
     * DOCUMENT ME!
     *
     * @param displayObjectId 
     *
     * @return 
     */
    public UIDisplayObject getUiDisplayObject(String displayObjectId) {
        return (UIDisplayObject) (get("UIDisplayObject_" + displayObjectId));
    }

    /**
     * DOCUMENT ME!
     *
     * @param displayObjectId 
     * @param uiDisplayObject 
     */
    public synchronized void putUiDisplayObject(String displayObjectId,
        UIDisplayObject uiDisplayObject) {
        put("UIDisplayObject_" + displayObjectId, uiDisplayObject);
    }

    /**
     * DOCUMENT ME!
     *
     * @param displayObjectId 
     */
    public synchronized void removeUiDisplayObject(String displayObjectId) {
        remove("UIDisplayObject_" + displayObjectId);
    }

    /**
     * DOCUMENT ME!
     *
     * @param entityId 
     *
     * @return 
     */
    public UIEntity getUiEntity(String entityId) {
        return (UIEntity) (get("UIEntity_" + entityId));
    }

    /**
     * DOCUMENT ME!
     *
     * @param entityId 
     * @param uiEntity 
     */
    public synchronized void putUiEntity(String entityId, UIEntity uiEntity) {
        put("UIEntity_" + entityId, uiEntity);
    }

    /**
     * DOCUMENT ME!
     *
     * @param entityId 
     */
    public synchronized void removeUiEntity(String entityId) {
        remove("UIEntity_" + entityId);
    }

    /**
     * DOCUMENT ME!
     *
     * @param sectionId 
     * @param partyId 
     * @param attributeId 
     *
     * @return 
     */
    public UIFieldInfo getUiFieldInfo(String sectionId, String partyId,
        String attributeId) {
        return (UIFieldInfo) (get("UIFieldInfo_" + sectionId + "_" + partyId +
            "_" + attributeId));
    }

    /**
     * DOCUMENT ME!
     *
     * @param sectionId 
     * @param partyId 
     * @param attributeId 
     * @param uiFieldInfo 
     */
    public synchronized void putUiFieldInfo(String sectionId, String partyId,
        String attributeId, UIFieldInfo uiFieldInfo) {
        put("UIFieldInfo_" + sectionId + "_" + partyId + "_" + attributeId,
            uiFieldInfo);
    }

    /**
     * DOCUMENT ME!
     *
     * @param sectionId 
     * @param partyId 
     * @param attributeId 
     */
    public synchronized void removeUiFieldInfo(String sectionId,
        String partyId, String attributeId) {
        remove("UIFieldInfo_" + sectionId + "_" + partyId + "_" + attributeId);
    }

    /**
     * DOCUMENT ME!
     *
     * @param screenName 
     *
     * @return 
     */
    public UIScreen getUiScreen(String screenName) {
        return (UIScreen) (get("UIScreen_" + screenName));
    }

    /**
     * DOCUMENT ME!
     *
     * @param screenName 
     * @param uiScreen 
     */
    public synchronized void putUiScreen(String screenName, UIScreen uiScreen) {
        put("UIScreen_" + screenName, uiScreen);
    }

    /**
     * DOCUMENT ME!
     *
     * @param screenName 
     */
    public synchronized void removeUiScreen(String screenName) {
        remove("UIScreen_" + screenName);
    }

    /**
     * DOCUMENT ME!
     *
     * @param screenName 
     * @param sectionName 
     * @param partyId 
     *
     * @return 
     */
    public UIScreenSection getUiScreenSection(String screenName,
        String sectionName, String partyId) {
        return (UIScreenSection) (get("UIScreenSection_" + screenName + "_" +
            sectionName + "_" + partyId));
    }

    /**
     * DOCUMENT ME!
     *
     * @param screenName 
     * @param sectionName 
     * @param partyId 
     * @param uiScreenSection 
     */
    public synchronized void putUiScreenSection(String screenName,
        String sectionName, String partyId, UIScreenSection uiScreenSection) {
        put("UIScreenSection_" + screenName + "_" + sectionName + "_" +
            partyId, uiScreenSection);
    }

    /**
     * DOCUMENT ME!
     *
     * @param screenName 
     * @param sectionName 
     * @param partyId 
     */
    public synchronized void removeUiScreenSection(String screenName,
        String sectionName, String partyId) {
        remove("UIScreenSection_" + screenName + "_" + sectionName + "_" +
            partyId);
    }

    /**
     * DOCUMENT ME!
     *
     * @param sectionId 
     * @param entityId 
     *
     * @return 
     */
    public UIScreenSectionEntity getUiScreenSectionEntity(String sectionId,
        String entityId) {
        return (UIScreenSectionEntity) (get("UIScreenSectionEntity_" +
            sectionId + "_" + entityId));
    }

    /**
     * DOCUMENT ME!
     *
     * @param sectionId 
     * @param entityId 
     * @param uiScreenSectionEntity 
     */
    public synchronized void putUiScreenSectionEntity(String sectionId,
        String entityId, UIScreenSectionEntity uiScreenSectionEntity) {
        put("UIScreenSectionEntity_" + sectionId + "_" + entityId,
            uiScreenSectionEntity);
    }

    /**
     * DOCUMENT ME!
     *
     * @param sectionId 
     * @param entityId 
     */
    public synchronized void removeUiScreenSectionEntity(String sectionId,
        String entityId) {
        remove("UIScreenSectionEntity_" + sectionId + "_" + entityId);
    }
}

⌨️ 快捷键说明

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