Class ProcessAccessBean

    • Constructor Detail

      • ProcessAccessBean

        public ProcessAccessBean()
    • Method Detail

      • hasAccesses

        public boolean hasAccesses()
        Checks if the current form record has any accesses.
        Returns:
        true if the form record has accesses, false otherwise
      • getAccessUsers

        public List<UserViewModel> getAccessUsers()
        Returns a list of UserViewModel for the current form record. The list is loaded from the database if it is null.
        Returns:
        the list of UserViewModel for the current form record and all users with access to it.
      • getAccessDisplayName

        public String getAccessDisplayName​(FormRecordAccess access)
        Returns the display name of the user associated with the given access. If the user is not found or has no display name, it returns a default value.
        Parameters:
        access - the access to check
        Returns:
        the display name of the user, or a default value if not found
      • deleteAccess

        public void deleteAccess​(FormRecordAccess access)
        Deletes the given access from the database. This method is used to remove access rights for a user.
        Parameters:
        access - the access to delete
      • isExpired

        public boolean isExpired​(FormRecordAccess access)
        Checks if the access is expired. An access is considered expired if the accessGrantedUntil field is not null and the current time is after the accessGrantedUntil time.
        Parameters:
        access - the access to check
        Returns:
        true if the access is expired, false otherwise
      • toReadableDate

        public String toReadableDate​(Instant instant)
        Converts the given instant to a readable date string.
        Parameters:
        instant - the instant to convert
        Returns:
        the formatted date string, or an empty string if the instant is null
      • isSubmitter

        public boolean isSubmitter​(FormRecordAccess access)
        Checks if the user is a submitter of the form record.
        Parameters:
        access - the access to check
        Returns:
        true if the user's access grant type is REVIEW or PROVIDE , false otherwise
      • getAccessGrantTypeTooltip

        public String getAccessGrantTypeTooltip​(FormRecordAccess access)
        Parameters:
        access - the access to check
        Returns:
        Returns a tooltip string for the access grant type of the given access.