com.ajaxjs.config.ConfigService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ajaxjs-framework2 Show documentation
Show all versions of ajaxjs-framework2 Show documentation
AJAXJS aims to full-stack, not only the server-side framework,
but also integrates the front-end library. It's written in HTML5 + Java, a successor to the JVM platform, efficient, secure, stable, cross-platform and many other advantages, but it abandoned the traditional enterprise architecture brought about by the large and bloated,
emphasizing the lightweight, and fast, very suitable for the Internet fast application.
The newest version!
package com.ajaxjs.config;
import javax.servlet.ServletContext;
import java.util.Map;
/**
* 配置业务
*
* @author sp42 [email protected]
*
*/
public interface ConfigService {
/**
* 加载配置
*
* @param ctx
*/
public void init(ServletContext ctx);
/**
* 加载 JSON 配置
*
* @param cfgPath 配置文件所在路径
*/
public void load(String cfgPath);
/**
* 后台编辑 JSON 时候所需要的数据:一个是配置本身,另外是配置说明(Scheme)
*/
public String[] loadEdit();
/**
* 保存配置
*
* @param map 前端提交过来的配置数据
* @param ctx Web 上下文,配置保存在这里
*/
public void saveAllconfig(Map map, ServletContext ctx);
/**
* 所有的配置保存在这个 config 中
*/
public Map getConfig();
/**
* 所有的配置保存在这个 config 中(扁平化处理过的)
*/
public Map getFlatConfig();
/**
* 是否加载成功
*/
public boolean isLoaded();
}