Interface AttachmentValidationConfiguration


  • @Role
    @Unstable
    public interface AttachmentValidationConfiguration
    Configuration values for the attachment validation.
    Since:
    14.10
    Version:
    $Id: 3a6e5c0fe124eaef83d0431e44dc61604c69e135 $
    • Method Detail

      • getAllowedMimetypes

        List<String> getAllowedMimetypes()
        Returns:
        the list of allowed attachment mimetypes of the current document. A joker (@code '*') can be used to match any media (e.g., "image/png", "text/*")
      • getAllowedMimetypes

        List<String> getAllowedMimetypes​(org.xwiki.model.reference.DocumentReference documentReference)
        Parameters:
        documentReference - the reference of a document
        Returns:
        the list of allowed attachment mimetypes of the provided document. A joker (@code '*') can be used to match any media (e.g., * "image/png", "text/*")
        Since:
        14.10.2, 15.0RC1
      • getBlockerMimetypes

        List<String> getBlockerMimetypes()
        Returns:
        the list of blocker attachment mimetype of the current document. A joker (@code '*') can be used to match any media (e.g., "image/png", "text/*")
      • getBlockerMimetypes

        List<String> getBlockerMimetypes​(org.xwiki.model.reference.DocumentReference documentReference)
        Parameters:
        documentReference - the reference of a document
        Returns:
        the list of blocker attachment mimetypes of the provided document. A joker (@code '*') can be used to match any media (e.g., * "image/png", "text/*")
        Since:
        14.10.2, 15.0RC1
      • getMaxUploadSize

        long getMaxUploadSize​(org.xwiki.model.reference.EntityReference entityReference)
        Parameters:
        entityReference - the entity reference to use as the context when looking for the configuration
        Returns:
        the max allowed file size in bytes
        Since:
        15.5RC1, 14.10.13