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

org.zodiac.plugin.extension.resources.resolver.AbstractPluginStaticResource Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.plugin.extension.resources.resolver;

import java.util.Map;
import java.util.Set;

import org.springframework.core.io.Resource;
import org.zodiac.plugin.factory.PluginRegistryInfo;
import org.zodiac.sdk.toolkit.util.collection.CollUtil;
import org.zodiac.sdk.toolkit.util.lang.StrUtil;

class AbstractPluginStaticResource {

    /**
     * basePlugin bean
     */
    private PluginRegistryInfo pluginRegistryInfo;

    /**
     * 定义的classpath集合
     */
    private Set classPaths;

    /**
     * 定义的文件路径集合
     */
    private Set filePaths;

    /**
     * 缓存的资源。key 为资源的可以。值为资源
     */
    private Map cacheResourceMaps = CollUtil.concurrentMap();

    
    public AbstractPluginStaticResource() {
    }

    PluginRegistryInfo getPluginRegistryInfo() {
        return pluginRegistryInfo;
    }

    void setPluginRegistryInfo(PluginRegistryInfo pluginRegistryInfo) {
        this.pluginRegistryInfo = pluginRegistryInfo;
    }

    Set getClassPaths() {
        return classPaths;
    }

    void setClassPaths(Set classPaths) {
        this.classPaths = classPaths;
    }

    Set getFilePaths() {
        return filePaths;
    }

    void setFilePaths(Set filePaths) {
        this.filePaths = filePaths;
    }

    Resource getCacheResource(String key) {
        return cacheResourceMaps.get(key);
    }

    void putCacheResource(String key, Resource resource) {
        if (StrUtil.isEmpty(key) || resource == null) {
            return;
        }
        cacheResourceMaps.put(key, resource);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy