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 Details

    • UserTool

      public UserTool()
  • Method Details

    • 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 user
      size - 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 user
      size - image size
      Returns:
      the avatar in Base64