Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 1997-2013, www.tinygroup.org (tinygroup@126.com). Licensed under the GPL, Version 3.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.gnu.org/licenses/gpl.html 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 org.tinygroup.template;
 
 import java.util.Map;

用于载入模板 Created by luoguo on 2014/6/9.
 
 public interface ResourceLoader<T> {
    
是否检查模板是否被修改过

Parameters:
checkModified
 
     void setCheckModified(boolean checkModified);

    
确定某个路径对应的文件是否被修改

Parameters:
path
Returns:
 
     boolean isModified(String path);

    
清置修改状态

Parameters:
path
 
     void resetModified(String path);
    
返回路径

Parameters:
templatePath
Returns:
Throws:
TemplateException
 
     String getLayoutPath(String templatePath);

    
返回模板对象,如果不存在则返回null

Parameters:
path
Returns:
 
     Template getTemplate(String paththrows TemplateException;

    
返回布局对象

Parameters:
path
Returns:
Throws:
TemplateException
 
     Template getLayout(String paththrows TemplateException;

    
返回宏库文件

Parameters:
path
Returns:
Throws:
TemplateException
 
     Template getMacroLibrary(String paththrows TemplateException;

    
获取资源对应的文本

Parameters:
path
Returns:
 
     String getResourceContent(String pathString encodethrows TemplateException;

    
添加模板对象

Parameters:
template
Returns:
 
     ResourceLoader addTemplate(Template templatethrows TemplateException;

    
创建并注册模板

Parameters:
templateMaterial
Returns:
    Template createTemplate(T templateMaterialthrows TemplateException;

    
返回注入模板引擎

Parameters:
templateEngine
    void setTemplateEngine(TemplateEngine templateEngine);

    
返回类加载器

Returns:
    ClassLoader getClassLoader();

    
设置类加载器

Parameters:
classLoader
    void setClassLoader(ClassLoader classLoader);

    
获取流程引擎

Returns:
返回模板文件的扩展

Returns:
    String getTemplateExtName();

    
返回布局文件的扩展名

Returns:
    String getLayoutExtName();

    
返回仓库中的所有资源

Returns:
New to GrepCode? Check out our FAQ X