Package com.logicaldoc.core.automation
Class UserTool
- java.lang.Object
-
- com.logicaldoc.core.automation.UserTool
-
public class UserTool extends Object
Utility methods to handle some user related operations from within the Automation- Since:
- 8.6.1
- Author:
- Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description UserTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAvatar(String username)Generates and retrieves the avatar image for a given userStringgetAvatarImg(long userId, int size)Generates the HTML img tag for displaying an avatarStringgetAvatarImg(String username, int size)Generates the HTML img tag for displaying an avatarUsergetUser(long userId)Retrieves a user objectUsergetUser(String username)Retrieves a user object
-
-
-
Method Detail
-
getUser
public User getUser(String username)
Retrieves a user object- Parameters:
username- the username- Returns:
- the user object
-
getUser
public User getUser(long userId)
Retrieves a user object- Parameters:
userId- the user ID- Returns:
- the user object
-
getAvatar
public String getAvatar(String username)
Generates and retrieves the avatar image for a given user- Parameters:
username- username of the user- Returns:
- the avatar in Base64
-
getAvatarImg
public String getAvatarImg(String username, int size)
Generates the HTML img tag for displaying an avatar- Parameters:
username- username of the usersize- image size- Returns:
- the avatar in Base64
-
getAvatarImg
public String getAvatarImg(long userId, int size)
Generates the HTML img tag for displaying an avatar- Parameters:
userId- identifier of the usersize- image size- Returns:
- the avatar in Base64
-
-