类 TransientThingManager
java.lang.Object
org.xmeta.thingManagers.TransientThingManager
- 所有已实现的接口:
ThingManager
瞬态的模型的管理者。
- 作者:
- zyx
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddThingManagerListener(ThingManagerListener listener) 添加模型管理者事件。void清空缓存。booleancreateCategory(String categoryName) 创建新的目录。findResource(String name) 查找资源。getCategory(String name) 通过指定的目录名称获取目录。返回模型管理者定义的根目录列表。返回模型管理器的类装载器。获取模型管理器所依赖的类库的路径。long返回最后修改日期,一般是组后吸怪的那个模型或资源的日期。getName()获得模型管理者的名称。long获取下一个瞬态标识。获取模型管理器的配置。getResourceAsStream(String name) 获取资源当作输入流,如果没有返回null。返回项目所在的根目录。intgetSize()取得模型的数量。通过模型的名称取得模型。getThingIndex(String thingName) getThingIndexs(String categoryName) 返回指定目录下的模型索引列表。getThingIndexs(String categoryName, String descriptorPath) 根据描述者获取指定目录下的模型索引列表。取得指定目录下的模型列表。根据模型描述者取得指定目录下的模型列表。voidinit(Properties properties) 初始化模型管理器。boolean模型是否是可以保存的,如果不能保存,那么即使模型在内存中改变了,也不能同步到存储上。指定目录遍历该目录下的模型。指定模型的描述者遍历指定目录下的模型。voidrefresh()刷新模型管理者。void刷新指定目录。booleanremove()删除此模型管理者,在此方法里实现清除此模型管理者的相关内容。boolean从模型管理者中移除一个模型。booleanremoveCategory(String categoryName) 删除一个目录。voidboolean删除模型管理者的监听事件。boolean保存一个模型。void设置模型管理器的名称。voidsetRootDir(File root) 设置项目的所在根目录。
-
构造器详细资料
-
TransientThingManager
public TransientThingManager()
-
-
方法详细资料
-
getNextId
public long getNextId()获取下一个瞬态标识。- 返回:
- 标识
-
getName
从接口复制的说明:ThingManager获得模型管理者的名称。- 指定者:
getName在接口中ThingManager- 返回:
- 模型管理者的名称
-
clearCache
public void clearCache()从接口复制的说明:ThingManager清空缓存。- 指定者:
clearCache在接口中ThingManager
-
createCategory
从接口复制的说明:ThingManager创建新的目录。- 指定者:
createCategory在接口中ThingManager- 参数:
categoryName- 目录名称- 返回:
- 已创建或已存在的目录
-
getCategorys
从接口复制的说明:ThingManager返回模型管理者定义的根目录列表。- 指定者:
getCategorys在接口中ThingManager- 返回:
- 模型管理者的所有目录
-
getSize
public int getSize()取得模型的数量。- 返回:
- 模型的数量。
-
getThing
从接口复制的说明:ThingManager通过模型的名称取得模型。 比方法一般是World调用的,应用中取模型请通过World,World负责缓存。- 指定者:
getThing在接口中ThingManager- 参数:
thingPath- 模型的名称,此名称为全名(包含目录)- 返回:
- 模型
-
save
从接口复制的说明:ThingManager保存一个模型。- 指定者:
save在接口中ThingManager- 参数:
athing- 要保存的模型- 返回:
- 如果保存成功那么返回该模型的根父模型,否则返回null
-
remove
从接口复制的说明:ThingManager从模型管理者中移除一个模型。- 指定者:
remove在接口中ThingManager- 参数:
thing- 要移除的模型- 返回:
- 已经被移除的模型,如果没有则返回null
-
getCategory
从接口复制的说明:ThingManager通过指定的目录名称获取目录。- 指定者:
getCategory在接口中ThingManager- 参数:
name- 目录的名称- 返回:
- 目录,如果不存在返回null
-
refresh
public void refresh()从接口复制的说明:ThingManager刷新模型管理者。- 指定者:
refresh在接口中ThingManager
-
remove
public boolean remove()从接口复制的说明:ThingManager删除此模型管理者,在此方法里实现清除此模型管理者的相关内容。- 指定者:
remove在接口中ThingManager- 返回:
- 是否成功
-
removeDeadThings
public void removeDeadThings() -
getThings
从接口复制的说明:ThingManager取得指定目录下的模型列表。- 指定者:
getThings在接口中ThingManager- 参数:
categoryName- 目录名称- 返回:
- 模型列表
-
getThings
从接口复制的说明:ThingManager根据模型描述者取得指定目录下的模型列表。- 指定者:
getThings在接口中ThingManager- 参数:
categoryName- 目录名称descriptorPath- 模型描述者的路径- 返回:
- 模型列表
-
iterator
从接口复制的说明:ThingManager指定目录遍历该目录下的模型。- 指定者:
iterator在接口中ThingManager- 参数:
categoryName- 目录名称includeChild- 是否包含子目录- 返回:
- 模型遍历器
-
iterator
从接口复制的说明:ThingManager指定模型的描述者遍历指定目录下的模型。- 指定者:
iterator在接口中ThingManager- 参数:
categoryName- 目录名称descriptorPath- 描述者的路径includeChild- 是否包含子目录- 返回:
- 模型遍历器
-
getThingIndex
-
getThingIndexs
从接口复制的说明:ThingManager返回指定目录下的模型索引列表。- 指定者:
getThingIndexs在接口中ThingManager- 参数:
categoryName- 目录名称- 返回:
- 目录索引列表
-
getThingIndexs
从接口复制的说明:ThingManager根据描述者获取指定目录下的模型索引列表。- 指定者:
getThingIndexs在接口中ThingManager- 参数:
categoryName- 目录名称descriptorPath- 描述者路径- 返回:
- 目录索引列表
-
refresh
从接口复制的说明:ThingManager刷新指定目录。- 指定者:
refresh在接口中ThingManager- 参数:
categoryName- 目录includeChildCategory- 是否包含子目录
-
removeCategory
从接口复制的说明:ThingManager删除一个目录。- 指定者:
removeCategory在接口中ThingManager- 参数:
categoryName- 目录名称- 返回:
- 是否删除成功
-
addThingManagerListener
从接口复制的说明:ThingManager添加模型管理者事件。- 指定者:
addThingManagerListener在接口中ThingManager- 参数:
listener- 模型管理者的事件
-
removeThingManagerListener
从接口复制的说明:ThingManager删除模型管理者的监听事件。- 指定者:
removeThingManagerListener在接口中ThingManager- 参数:
listener- 模型管理者监听事件- 返回:
- 是否成功
-
getClassLoader
从接口复制的说明:ThingManager返回模型管理器的类装载器。- 指定者:
getClassLoader在接口中ThingManager- 返回:
- 类装载器
-
getClassPath
从接口复制的说明:ThingManager获取模型管理器所依赖的类库的路径。- 指定者:
getClassPath在接口中ThingManager- 返回:
- 类路径
-
getResourceAsStream
从接口复制的说明:ThingManager获取资源当作输入流,如果没有返回null。- 指定者:
getResourceAsStream在接口中ThingManager- 参数:
name- 资源名- 返回:
- 资源输入流
-
findResource
从接口复制的说明:ThingManager查找资源。- 指定者:
findResource在接口中ThingManager- 参数:
name- 资源名- 返回:
- 资源URL
-
init
从接口复制的说明:ThingManager初始化模型管理器。- 指定者:
init在接口中ThingManager- 参数:
properties- 参数
-
isSaveable
public boolean isSaveable()从接口复制的说明:ThingManager模型是否是可以保存的,如果不能保存,那么即使模型在内存中改变了,也不能同步到存储上。- 指定者:
isSaveable在接口中ThingManager- 返回:
- 是否可以创建和保存模型
-
setRootDir
从接口复制的说明:ThingManager设置项目的所在根目录。- 指定者:
setRootDir在接口中ThingManager- 参数:
root- 项目根目录
-
getRootDir
从接口复制的说明:ThingManager返回项目所在的根目录。- 指定者:
getRootDir在接口中ThingManager- 返回:
- 项目的根目录
-
getLastModified
public long getLastModified()从接口复制的说明:ThingManager返回最后修改日期,一般是组后吸怪的那个模型或资源的日期。- 指定者:
getLastModified在接口中ThingManager- 返回:
- 最后修改日期
-
setName
从接口复制的说明:ThingManager设置模型管理器的名称。- 指定者:
setName在接口中ThingManager- 参数:
name- 模型管理器的名称
-
getProperties
从接口复制的说明:ThingManager获取模型管理器的配置。- 指定者:
getProperties在接口中ThingManager- 返回:
- 模型管理器的属性
-