Package com.logicaldoc.core.automation
Class UserTool
java.lang.Object
com.logicaldoc.core.automation.UserTool
Utility methods to handle some user related operations from within the
Automation
- Since:
- 8.6.1
- Author:
- Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates and retrieves the avatar image for a given usergetAvatarImg(long userId, int size) Generates the HTML img tag for displaying an avatargetAvatarImg(String username, int size) Generates the HTML img tag for displaying an avatargetUser(long userId) Retrieves a user objectRetrieves a user object
-
Constructor Details
-
UserTool
public UserTool()
-
-
Method Details
-
getUser
Retrieves a user object- Parameters:
username- the username- Returns:
- the user object
-
getUser
Retrieves a user object- Parameters:
userId- the user ID- Returns:
- the user object
-
getAvatar
Generates and retrieves the avatar image for a given user- Parameters:
username- username of the user- Returns:
- the avatar in Base64
-
getAvatarImg
Generates the HTML img tag for displaying an avatar- Parameters:
username- username of the usersize- image size- Returns:
- the avatar in Base64
-
getAvatarImg
Generates the HTML img tag for displaying an avatar- Parameters:
userId- identifier of the usersize- image size- Returns:
- the avatar in Base64
-