public class CmsUserIconHelper extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
ADMIN_COLOR
The color reserved for admin users.
|
static java.lang.String |
BIG_ICON_SUFFIX
The big icon suffix.
|
static java.lang.String |
ICON_FOLDER
The target folder name.
|
static java.lang.String |
SMALL_ICON_SUFFIX
The small icon suffix.
|
static java.lang.String |
TEMP_FOLDER
The temp folder name.
|
static java.lang.String |
USER_IMAGE_FOLDER
The user image folder.
|
static java.lang.String |
USER_IMAGE_INFO
The user image additional info key.
|
Constructor and Description |
---|
CmsUserIconHelper(CmsObject adminCms)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBigIconPath(CmsObject cms,
CmsUser user)
Returns the big ident-icon path for the given user.
|
java.lang.String |
getSmallIconPath(CmsObject cms,
CmsUser user)
Returns the small ident-icon path for the given user.
|
void |
handleImageUpload(CmsObject cms,
CmsUser user,
java.lang.String uploadedFile)
Handles a user image upload.
|
void |
setUserImage(CmsObject cms,
CmsUser user,
java.lang.String rootPath)
Sets the user image for the given user.
|
public static final java.awt.Color ADMIN_COLOR
public static final java.lang.String BIG_ICON_SUFFIX
public static final java.lang.String ICON_FOLDER
public static final java.lang.String SMALL_ICON_SUFFIX
public static final java.lang.String TEMP_FOLDER
public static final java.lang.String USER_IMAGE_FOLDER
public static final java.lang.String USER_IMAGE_INFO
public CmsUserIconHelper(CmsObject adminCms)
adminCms
- the admin cms contextpublic java.lang.String getBigIconPath(CmsObject cms, CmsUser user)
cms
- the cms contextuser
- the userpublic java.lang.String getSmallIconPath(CmsObject cms, CmsUser user)
cms
- the cms contextuser
- the userpublic void handleImageUpload(CmsObject cms, CmsUser user, java.lang.String uploadedFile)
cms
- the cms contextuser
- the useruploadedFile
- the uploaded filepublic void setUserImage(CmsObject cms, CmsUser user, java.lang.String rootPath) throws CmsException
cms
- the cms contextuser
- the userrootPath
- the image root pathCmsException
- in case anything goes wrong