Package org.beangle.ems.avatar.service
Class FileSystemAvatarBase
- java.lang.Object
-
- org.beangle.ems.avatar.service.AbstractAvatarBase
-
- org.beangle.ems.avatar.service.FileSystemAvatarBase
-
- All Implemented Interfaces:
EventListener,org.beangle.commons.config.property.PropertyConfigListener,AvatarBase
public class FileSystemAvatarBase extends AbstractAvatarBase implements org.beangle.commons.config.property.PropertyConfigListener
基于文件系统的照片库- Author:
- chaostone
-
-
Field Summary
-
Fields inherited from class org.beangle.ems.avatar.service.AbstractAvatarBase
DEFAULT_AVATAR, readOnly, typeList, types
-
-
Constructor Summary
Constructors Constructor Description FileSystemAvatarBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAbsoluteAvatarPath(String name, String type)根据名称和类型得到文件绝对路径AvatargetAvatar(String name)StringgetAvatarDir()org.beangle.commons.collection.page.Page<String>getAvatarNames(org.beangle.commons.collection.page.PageLimit limit)StringgetDescription()voidonConfigEvent(org.beangle.commons.config.property.PropertyConfigEvent event)voidsetAvatarDir(String avatarDir)voidsetPropertyConfig(org.beangle.commons.config.property.PropertyConfig config)booleanupdateAvatar(String name, File avatar, String type)-
Methods inherited from class org.beangle.ems.avatar.service.AbstractAvatarBase
containType, getDefaultAvatar, getTypes, isReadOnly, setReadOnly, setTypes, updateAvatarBatch
-
-
-
-
Method Detail
-
getAvatarNames
public org.beangle.commons.collection.page.Page<String> getAvatarNames(org.beangle.commons.collection.page.PageLimit limit)
- Specified by:
getAvatarNamesin interfaceAvatarBase
-
getAbsoluteAvatarPath
public String getAbsoluteAvatarPath(String name, String type)
根据名称和类型得到文件绝对路径- Parameters:
name-type-
-
getAvatar
public Avatar getAvatar(String name)
- Specified by:
getAvatarin interfaceAvatarBase
-
getAvatarDir
public String getAvatarDir()
-
setAvatarDir
public void setAvatarDir(String avatarDir)
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceAvatarBase
-
setPropertyConfig
public void setPropertyConfig(org.beangle.commons.config.property.PropertyConfig config)
-
onConfigEvent
public void onConfigEvent(org.beangle.commons.config.property.PropertyConfigEvent event)
- Specified by:
onConfigEventin interfaceorg.beangle.commons.config.property.PropertyConfigListener
-
updateAvatar
public boolean updateAvatar(String name, File avatar, String type)
- Specified by:
updateAvatarin interfaceAvatarBase- Specified by:
updateAvatarin classAbstractAvatarBase
-
-