org.webframe.support.driver
Class AbstractModulePluginDriver

java.lang.Object
  extended by org.webframe.support.driver.AbstractModulePluginDriver
All Implemented Interfaces:
ModulePluginDriver

public abstract class AbstractModulePluginDriver
extends Object
implements ModulePluginDriver

提供模块插件实现类的默认位置配置标准,例如:模块插件实现类org.webframe.core.CoreModulePluginDriver, 我们的Test模块的包路径为org.webframe.test,该包中直接包括model Bean和freemarker模板, 那么CoreModulePluginDriver实现AbstractModulePluginDriver抽象类后,就不需要重新任何方法,只需添加静态块 注册该CoreModulePluginDriver实例

Version:
$Id: codetemplates.xml,v 1.1 2009/09/07 08:48:12 Exp $ Create: 2011-3-19 下午05:59:37
Author:
黄国庆

Constructor Summary
AbstractModulePluginDriver()
           
 
Method Summary
 String getEntityLocation()
          获取数据库model Bean相对于该实现类的相对路径,或者相对于该jar的相对路径。 例如:我们的模块插件驱动实现类org.webframe.test.TestModulePluginDriver, model Bean的位置org.webframe.test.Test,那么该实现类getEntityLocation() 方法应该返回"/org/webframe/test"或者"*"字符串;
 String getSpringContextLocation()
          不支持", ; \t \n"字符串表示多路径
 String getViewTempletLocation()
          获取model页面freemarker模板的路径,例如:我们的模块插件驱动实现类 org.webframe.test.TestModulePluginDriver, model freemarker模板的位置org/webframe/test/new.ftl,那么该实现类 getViewTempletLocation()方法应该返回"/org/webframe"。
 String getWebSourcesLocation()
          支持", ; \t \n"字符串表示多路径,例如:返回值为/js,/jsp,/style,表示模块插件包 根目录下的js、jsp、style三个目录中的资源
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.webframe.support.driver.ModulePluginDriver
getModuleName
 

Constructor Detail

AbstractModulePluginDriver

public AbstractModulePluginDriver()
Method Detail

getEntityLocation

public String getEntityLocation()
Description copied from interface: ModulePluginDriver
获取数据库model Bean相对于该实现类的相对路径,或者相对于该jar的相对路径。 例如:我们的模块插件驱动实现类org.webframe.test.TestModulePluginDriver, model Bean的位置org.webframe.test.Test,那么该实现类getEntityLocation() 方法应该返回"/org/webframe/test"或者"*"字符串;

Specified by:
getEntityLocation in interface ModulePluginDriver
Returns:

getViewTempletLocation

public String getViewTempletLocation()
Description copied from interface: ModulePluginDriver
获取model页面freemarker模板的路径,例如:我们的模块插件驱动实现类 org.webframe.test.TestModulePluginDriver, model freemarker模板的位置org/webframe/test/new.ftl,那么该实现类 getViewTempletLocation()方法应该返回"/org/webframe"。

Specified by:
getViewTempletLocation in interface ModulePluginDriver
Returns:

getWebSourcesLocation

public String getWebSourcesLocation()
Description copied from interface: ModulePluginDriver
支持", ; \t \n"字符串表示多路径,例如:返回值为/js,/jsp,/style,表示模块插件包 根目录下的js、jsp、style三个目录中的资源

Specified by:
getWebSourcesLocation in interface ModulePluginDriver
Returns:

getSpringContextLocation

public String getSpringContextLocation()
Description copied from interface: ModulePluginDriver
不支持", ; \t \n"字符串表示多路径

Specified by:
getSpringContextLocation in interface ModulePluginDriver
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.