![JAR search and dependency download from the Maven repository](/logo.png)
net.ymate.platform.base.AbstractModule Maven / Gradle / Ivy
/*
* Copyright 2007-2107 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.ymate.platform.base;
import java.util.Map;
import net.ymate.platform.commons.util.ExpressionUtils;
import net.ymate.platform.commons.util.RuntimeUtils;
import net.ymate.platform.configuration.Cfgs;
/**
*
* AbstractModule
*
*
* 框架模块加载器接口抽象实现类;
*
*
* @author 刘镇([email protected])
* @version 0.0.0
*
*
* 版本号 动作 修改人 修改时间
*
*
*
* 0.0.0
* 创建类
* 刘镇
* 2013年7月30日下午9:27:01
*
*
*/
public abstract class AbstractModule implements IModule {
/* (non-Javadoc)
* @see net.ymate.platform.module.base.IModule#initialize(java.util.Map)
*/
public void initialize(Map moduleCfgs) throws Exception {
}
/* (non-Javadoc)
* @see net.ymate.platform.module.base.IModule#destroy()
*/
public void destroy() throws Exception {
}
/**
* @param origin 原始字符串
* @return 替换${user.dir}变量
*/
protected String doParseVariableUserDir(String origin) {
if (Cfgs.isInited()) {
return ExpressionUtils.bind(origin).set("user.dir", Cfgs.getUserDir()).getResult();
}
return ExpressionUtils.bind(origin).set("user.dir", RuntimeUtils.getRootPath()).getResult();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy