|
The MetadataService is what you're talking about. It translates between strings and other useful dimensions (in this case, MediaType instances). Right now, though, it only supports "extensions" as the strings, which mean to be filename extensions. So that's why we have "txt" as the shorthand for MediaType.TEXT_PLAIN.
It seems a good idea to me to change MetadataService to support other kinds of shortcuts. In fact, as others have pointed out, it should be desirable to have the actual full MIME type as a shortcut.
-Tal
An alternative would be to have a MimeType class which had String constant values for all the common MediaTypes, then you would only need to use strings if you had a non common media type. |
- Restlet 1.2 M2 released Jerome Louvel
- Re: Restlet 1.2 M2 released Jonathan Hall
- RE: Restlet 1.2 M2 released Jerome Louvel
- Re: Restlet 1.2 M2 released Jonathan Hall
- Re: Restlet 1.2 M2 released Stephan Koops
- Re: Restlet 1.2 M2 released [throw pre... Stephan Koops
- Re: Restlet 1.2 M2 released [throw... Paul Austin
- Re: Restlet 1.2 M2 released [t... Tal Liron
- Re: Restlet 1.2 M2 released [t... David Fogel
- Re: Restlet 1.2 M2 released [t... Tal Liron
- RE: Restlet 1.2 M2 released [t... Jerome Louvel
- Re: Restlet 1.2 M2 released [t... Tal Liron
- RE: Restlet 1.2 M2 released [t... Jerome Louvel
- Re: Restlet 1.2 M2 released [t... Tal Liron
- RE: Restlet 1.2 M2 released [t... Jerome Louvel
- Re: Restlet 1.2 M2 released [t... Tal Liron
- Re: Restlet 1.2 M2 released [t... Rémi Dewitte
- Re: Restlet 1.2 M2 released [t... Tal Liron

