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

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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3
    • Component/s: content2bean, core
    • Labels:
    • Epic Link:
    • Sprint:
      5.3 Sprint 3, 5.3 Sprint 4, 5.3 Sprint 5

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: