Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5686

Node2Bean converter for com.google.common.net.MediaType

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.3
    • None
    • content2bean, core
    • 5.3 Sprint 3, 5.3 Sprint 4, 5.3 Sprint 5

      Several places could benefit from configuring MediaType objects. Rather than reinventing parsing and matching via regular expressions or other mechanism, we could just use com.google.common.net.MediaType, which is a very convenient class to manipulate mime types.
      eg: MediaType.parse("image/png").is(MediaType.parse("image/*")) // returns true
      From the below, one can easily figure out why it'd be beneficial to configure stuff (e.g someFileMediaType.is(configuredMT) to query whether this file can be treated by a configured component), and how to implement a Node2Bean converter.

      http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/index.html?com/google/common/net/MediaType.html

        Acceptance criteria

              dlipp Daniel Lipp
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: