Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1545

The FileBinaryStore should store the MIME type

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Critical
    • 3.0.0.Beta1
    • 3.0.0.Alpha6
    • JCR
    • None

    Description

      Currently the FileBinaryStore just delegates to the MIME type detectors each time the MIME type is needed (via Binary.getMimeType()). It should instead determine it only once and store the information so that subsequent calls are faster.

      Once this is done, then we should add a way for the AbstractJcrNode implementations to tell the store the path where a particular Binary value is being used, so that the store can use that information to determine the MIME type if it is not known at that point.

      Note that normally, we try to keep all binary-related information independent of where the binary values are used. However, and while MIME types are best determined with the content, we can determine far more MIME types using the filename extension. This "hint" will allow the stores to fall back to the filename extensions to determine MIME types if it is needed. Of course, this assumes that the names/paths of the nodes containing BINARY values have the filename extension in them; this is not always a good assumption.

      This hint might even allow a BinaryStore implementation to track which properties are using which BINARY values, allowing the store's garbage collector to be more efficient.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: