On Tue, Oct 19, 2010 at 20:43, Vincent Massol <vincent(a)massol.net> wrote:
Hi,
We currently have 2 methods introduced in 2.5 timeframe in the WikiModel class:
String getAttachmentURL(ResourceReference attachmentReference);
String getImageURL(ResourceReference attachmentReference, Map<String, String>
parameters);
I think we should merge them into a single method in charge of returning the URL of any
resource reference:
How do you make the difference between a link to an attachment and an
image src then ?
getResourceURL(ResourceReference reference, Map<String, String> parameters);
Note that this would assume that all references have a URL associated to them. It's
not always true (it's true for documents, attachments, url, interwiki and the future
icon/symbol but false for path and mailto). We could return null for resource types that
have no associated URLs.
The reason I'm proposing this because in order to implement support for symbol/icon
I'd need to add a new method to WikiModel: getIconURL(ResourceReference iconReference)
but I feel it's better to have a single getResourceURL().
WDYT?
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne