Class CommonRestrictions


  • public final class CommonRestrictions
    extends Object
    Commonly encountered restrictions that can be applied to Properties instances. Each method return a newly created list that can safely be modified without impacting subsequent calls.
    Since:
    2.4.0
    Author:
    Pascal Essiembre
    • Method Detail

      • xmlFeedContentTypes

        public static PropertyMatchers xmlFeedContentTypes​(String field)

        Common content-types defining an XML feed (RSS, Atom). The field has to contain one of these for the restriction to apply:

        • application/atom+xml
        • application/rdf+xml
        • application/rss+xml
        • application/xml
        • text/xml
        Parameters:
        field - name of Properties field
        Returns:
        list of restrictions
        Since:
        3.0.0
      • domContentTypes

        public static PropertyMatchers domContentTypes​(String field)

        Common content-types defining a DOM document. That is, documents that are HTML, XHTML, or XML-based. The field has to contain one of these for the restriction to apply:

        • application/atom+xml
        • application/mathml+xml
        • application/rss+xml
        • application/vnd.wap.xhtml+xml
        • application/x-asp
        • application/xhtml+xml
        • application/xml
        • application/xslt+xml
        • image/svg+xml
        • text/html
        • text/xml
        Parameters:
        field - name of Properties field
        Returns:
        list of restrictions
      • htmlContentTypes

        public static PropertyMatchers htmlContentTypes​(String field)

        Default content-types defining an HTML or XHTML document. The field has to contain one of these for the restriction to apply:

        • application/vnd.wap.xhtml+xml
        • application/xhtml+xml
        • text/html
        Parameters:
        field - name of Properties field
        Returns:
        list of restrictions
        Since:
        2.8.0
      • xmlContentTypes

        public static PropertyMatchers xmlContentTypes​(String field)

        Common content-types defining an XML document. The field has to contain one of these for the restriction to apply:

        • application/atom+xml
        • application/mathml+xml
        • application/rss+xml
        • application/xhtml+xml
        • application/xml
        • application/xslt+xml
        • image/svg+xml
        • text/xml
        Parameters:
        field - name of Properties field
        Returns:
        list of restrictions
      • imageIOStandardContentTypes

        public static PropertyMatchers imageIOStandardContentTypes​(String field)

        Content types of standard image format supported by all Java ImageIO implementations: JPEG, PNG, GIF, BMP, WBMP. The field has to contain one of these for the restriction to apply:

        • image/bmp
        • image/gif
        • image/jpeg
        • image/png
        • image/vnd.wap.wbmp
        • image/x-windows-bmp
        Parameters:
        field - name of Properties field
        Returns:
        list of restrictions
        Since:
        3.0.0