类 AbstractThingManager
java.lang.Object
org.xmeta.thingManagers.AbstractThingManager
- 所有已实现的接口:
ThingManager
抽象的模型管理器。
- 作者:
- zhangyuxiang
-
字段概要
字段修饰符和类型字段说明protected List<ThingManagerListener>模型管理监听列表protected String模型管理者的名称包列表protected Propertiesprotected File -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddThingManagerListener(ThingManagerListener listener) 添加模型管理者事件。void清空缓存。abstract ThingdoLoadThing(String thingName) 装载模型。abstract booleandoRemoveThing(Thing thing) 执行删除模型。abstract booleandoSaveThing(Thing thing) 执行保存模型。getCategory(String categoryName) 通过指定的目录名称获取目录。getCategory(String categoryName, boolean refresh) 返回模型管理者定义的根目录列表。long返回最后修改日期,一般是组后吸怪的那个模型或资源的日期。getName()获得模型管理者的名称。获取模型管理器的配置。返回项目所在的根目录。通过模型的名称取得模型。getThingIndexs(String categoryName) 返回指定目录下的模型索引列表。getThingIndexs(String categoryName, String descriptorPath) 根据描述者获取指定目录下的模型索引列表。取得指定目录下的模型列表。根据模型描述者取得指定目录下的模型列表。voidinit(Properties properties) 初始化模型管理器。指定目录遍历该目录下的模型。指定模型的描述者遍历指定目录下的模型。void刷新指定目录。voidrefreshParentCategory(String categoryName) 刷新父目录,在创建或删除目录时使用。boolean从模型管理者中移除一个模型。boolean删除模型管理者的监听事件。boolean保存一个模型。void设置模型管理器的名称。voidsetRootDir(File root) 设置项目的所在根目录。从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.xmeta.ThingManager
createCategory, findResource, getClassLoader, getClassPath, getResourceAsStream, isSaveable, refresh, remove, removeCategory
-
字段详细资料
-
name
模型管理者的名称 -
listeners
模型管理监听列表 -
packages
包列表 -
rootDir
-
properties
-
-
构造器详细资料
-
AbstractThingManager
抽象模型管理者的构造方法。- 参数:
name- 模型管理者的名称
-
-
方法详细资料
-
clearCache
public void clearCache()从接口复制的说明:ThingManager清空缓存。- 指定者:
clearCache在接口中ThingManager
-
getCategory
从接口复制的说明:ThingManager通过指定的目录名称获取目录。- 指定者:
getCategory在接口中ThingManager- 参数:
categoryName- 目录的名称- 返回:
- 目录,如果不存在返回null
-
getCategory
-
refreshParentCategory
刷新父目录,在创建或删除目录时使用。- 参数:
categoryName- 目录名
-
getCategorys
从接口复制的说明:ThingManager返回模型管理者定义的根目录列表。- 指定者:
getCategorys在接口中ThingManager- 返回:
- 模型管理者的所有目录
-
getName
从接口复制的说明:ThingManager获得模型管理者的名称。- 指定者:
getName在接口中ThingManager- 返回:
- 模型管理者的名称
-
getThingIndexs
从接口复制的说明:ThingManager返回指定目录下的模型索引列表。- 指定者:
getThingIndexs在接口中ThingManager- 参数:
categoryName- 目录名称- 返回:
- 目录索引列表
-
getThingIndexs
从接口复制的说明:ThingManager根据描述者获取指定目录下的模型索引列表。- 指定者:
getThingIndexs在接口中ThingManager- 参数:
categoryName- 目录名称descriptorPath- 描述者路径- 返回:
- 目录索引列表
-
getThings
从接口复制的说明:ThingManager根据模型描述者取得指定目录下的模型列表。- 指定者:
getThings在接口中ThingManager- 参数:
categoryName- 目录名称descriptorPath- 模型描述者的路径- 返回:
- 模型列表
-
getThings
从接口复制的说明:ThingManager取得指定目录下的模型列表。- 指定者:
getThings在接口中ThingManager- 参数:
categoryName- 目录名称- 返回:
- 模型列表
-
iterator
从接口复制的说明:ThingManager指定目录遍历该目录下的模型。- 指定者:
iterator在接口中ThingManager- 参数:
categoryName- 目录名称includeChildCategory- 是否包含子目录- 返回:
- 模型遍历器
-
iterator
public Iterator<Thing> iterator(String categoryName, String descriptorPath, boolean includeChildCategory) 从接口复制的说明:ThingManager指定模型的描述者遍历指定目录下的模型。- 指定者:
iterator在接口中ThingManager- 参数:
categoryName- 目录名称descriptorPath- 描述者的路径includeChildCategory- 是否包含子目录- 返回:
- 模型遍历器
-
refresh
从接口复制的说明:ThingManager刷新指定目录。- 指定者:
refresh在接口中ThingManager- 参数:
categoryName- 目录includeChildCategory- 是否包含子目录
-
addThingManagerListener
从接口复制的说明:ThingManager添加模型管理者事件。- 指定者:
addThingManagerListener在接口中ThingManager- 参数:
listener- 模型管理者的事件
-
removeThingManagerListener
从接口复制的说明:ThingManager删除模型管理者的监听事件。- 指定者:
removeThingManagerListener在接口中ThingManager- 参数:
listener- 模型管理者监听事件- 返回:
- 是否成功
-
getThing
从接口复制的说明:ThingManager通过模型的名称取得模型。 比方法一般是World调用的,应用中取模型请通过World,World负责缓存。- 指定者:
getThing在接口中ThingManager- 参数:
thingName- 模型的名称,此名称为全名(包含目录)- 返回:
- 模型
-
doLoadThing
装载模型。- 参数:
thingName- 模型名- 返回:
- 模型
-
remove
从接口复制的说明:ThingManager从模型管理者中移除一个模型。- 指定者:
remove在接口中ThingManager- 参数:
thing- 要移除的模型- 返回:
- 已经被移除的模型,如果没有则返回null
-
doRemoveThing
执行删除模型。- 参数:
thing- 模型- 返回:
- 是否成功
-
save
从接口复制的说明:ThingManager保存一个模型。- 指定者:
save在接口中ThingManager- 参数:
thing- 要保存的模型- 返回:
- 如果保存成功那么返回该模型的根父模型,否则返回null
-
doSaveThing
执行保存模型。- 参数:
thing- 模型- 返回:
- 是否保存成功
-
init
从接口复制的说明:ThingManager初始化模型管理器。- 指定者:
init在接口中ThingManager- 参数:
properties- 参数
-
getProperties
从接口复制的说明:ThingManager获取模型管理器的配置。- 指定者:
getProperties在接口中ThingManager- 返回:
- 模型管理器的属性
-
setRootDir
从接口复制的说明:ThingManager设置项目的所在根目录。- 指定者:
setRootDir在接口中ThingManager- 参数:
root- 项目根目录
-
getRootDir
从接口复制的说明:ThingManager返回项目所在的根目录。- 指定者:
getRootDir在接口中ThingManager- 返回:
- 项目的根目录
-
setName
从接口复制的说明:ThingManager设置模型管理器的名称。- 指定者:
setName在接口中ThingManager- 参数:
name- 模型管理器的名称
-
getLastModified
public long getLastModified()从接口复制的说明:ThingManager返回最后修改日期,一般是组后吸怪的那个模型或资源的日期。- 指定者:
getLastModified在接口中ThingManager- 返回:
- 最后修改日期
-