public class LocalMemoryResourceStore extends Object implements CrudResourceStore
| 构造器和说明 |
|---|
LocalMemoryResourceStore() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addResource(String type,
Resource resource)
添加资源
|
void |
addTemplate(String type,
ResourceMap template)
添加模板
|
void |
clearAllResources()
清除所有内置资源
|
void |
clearAllTemplates()
清除所有内置模板
|
Resource |
deleteResource(String type,
String id)
删除资源
|
ResourceMap |
deleteTemplate(String type,
String id)
删除模板
|
void |
init(ImageCaptchaResourceManager resourceManager) |
List<Resource> |
listResourcesByTypeAndTag(String type,
String tag)
获取某个资源列表
|
List<ResourceMap> |
listTemplatesByTypeAndTag(String type,
String tag)
获取某个模板列表
|
List<Resource> |
randomGetResourceByTypeAndTag(String type,
String tag,
Integer quantity)
随机获取某个资源
|
List<ResourceMap> |
randomGetTemplateByTypeAndTag(String type,
String tag,
Integer quantity)
随机获取某个模板通过type
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTargetpublic void addResource(String type, Resource resource)
CrudResourceStoreaddResource 在接口中 CrudResourceStoretype - 验证码类型resource - 资源public void addTemplate(String type, ResourceMap template)
CrudResourceStoreaddTemplate 在接口中 CrudResourceStoretype - 验证码类型template - 模板public Resource deleteResource(String type, String id)
CrudResourceStoredeleteResource 在接口中 CrudResourceStoretype - 验证码类型id - 资源IDpublic ResourceMap deleteTemplate(String type, String id)
CrudResourceStoredeleteTemplate 在接口中 CrudResourceStoretype - 验证码类型id - 资源IDpublic List<Resource> listResourcesByTypeAndTag(String type, String tag)
CrudResourceStorelistResourcesByTypeAndTag 在接口中 CrudResourceStoretype - 验证码类型tag - 资源标签(可为空)public List<ResourceMap> listTemplatesByTypeAndTag(String type, String tag)
CrudResourceStorelistTemplatesByTypeAndTag 在接口中 CrudResourceStoretype - 验证码类型tag - 资源标签(可为空)public void init(ImageCaptchaResourceManager resourceManager)
init 在接口中 ResourceStorepublic List<Resource> randomGetResourceByTypeAndTag(String type, String tag, Integer quantity)
ResourceStorerandomGetResourceByTypeAndTag 在接口中 ResourceStoretype - typepublic List<ResourceMap> randomGetTemplateByTypeAndTag(String type, String tag, Integer quantity)
ResourceStorerandomGetTemplateByTypeAndTag 在接口中 ResourceStoretype - typepublic void clearAllResources()
CrudResourceStoreclearAllResources 在接口中 CrudResourceStorepublic void clearAllTemplates()
CrudResourceStoreclearAllTemplates 在接口中 CrudResourceStoreCopyright © 2025. All rights reserved.