Interface IAttachmentHandler

    • Method Detail

      • getByRecordAndUser

        PagedResult<Attachment> getByRecordAndUser​(UserContext uc,
                                                   UUID formRecordUuid,
                                                   IUser user,
                                                   int page,
                                                   int pageSize)
        Finds the attachments of the form record given by its UUID if the given user can access the form record.
        Parameters:
        uc - user context for accessing the database.
        formRecordUuid - the UUID of the form record
        user - to get the attachments for.
        page - to get. If a page less than or equal to zero is given, paging is disabled and all entities are returned in one page.
        pageSize - size of the page to get. If a page size less than zerois given, paging is disabled and all entities are returned in one page.
        Returns:
        a list of form record attachment of the form record the user has access to ordered by their upload date (desc). null if the form record given by the UUID could not be found.
        Since:
        8.2.0
      • getByUuidAndUser

        Attachment getByUuidAndUser​(UserContext uc,
                                    UUID attachmentUuid,
                                    IUser user)
        Finds the attachment for the given UUID if the user can access the attachment. User can access an attachment if they can access the form record of the attachment.
        Parameters:
        uc - user context for database transactions.
        attachmentUuid - UUID of the request attachment.
        user - to get the attachment for.
        Returns:
        the form record attachment if the user can access it and null otherwise.
        Since:
        8.2.0