View Javadoc

1   package com.atlassian.plugin.webresource;
2   
3   import java.util.Map;
4   
5   /**
6    * A formatter to format web resources into HTML.
7    * <p/>
8    * The {@link #matches(String)} method should be called before calling {@link #formatResource(String, Map)},
9    * to ensure correct formatting of the resource.
10   */
11  interface WebResourceFormatter extends WebResourceFilter
12  {
13      /**
14       * Returns a formatted resource string.
15       * @param url url path to the resource
16       * @param parameters a {@link Map} of resource parameters
17       * @return a formatted resource {@link String}.
18       */
19      String formatResource(String url, Map<String, String> parameters);
20  }