package com.atlassian.plugin.web;

import com.atlassian.plugin.Plugin;
import com.atlassian.plugin.web.conditions.ConditionLoadingException;

import java.util.List;
import java.util.Map;

/**
 * Provides application specific methods to build/render web fragments
 */
public interface WebFragmentHelper
{
    Condition loadCondition(String className, Plugin plugin) throws ConditionLoadingException;

    ContextProvider loadContextProvider(String className, Plugin plugin) throws ConditionLoadingException;

    String getI18nValue(String key, List<?> arguments, Map<String,Object> context);

    String renderVelocityFragment(String fragment, Map<String,Object> context);
}

@@ -305,292 +305,2003 @@
     
-Condition loadCondition(String className, Plugin plugin) throws ConditionLoadingException;%0A%0A    ContextProvider loadContextProvider(String className, Plugin plugin) throws ConditionLoadingException;%0A%0A    String getI18nValue(String key, List%3C?%3E arguments, Map%3CString,Object%3E context);%0A
+/**%0A     * Creates a condition instance.  The following process should be used:%3Col%3E%0A     * %3Cli%3ELoad the class via the plugin instance%3C/li%3E%0A     * %3Cli%3EInstantiate the class using the plugin if it implements %7B@link com.atlassian.plugin.AutowireCapablePlugin%7D%0A     * %3Cli%3EIf not, instantiate the class with the host container%0A     *%0A     * @param className the condition class name%0A     * @param plugin the plugin from which the condition came%0A     * @return the condition instance%0A     * @throws ConditionLoadingException If the condition was unable to be created%0A     */%0A    Condition loadCondition(String className, Plugin plugin) throws ConditionLoadingException;%0A%0A    /**%0A     * Creates a context provider instance.  The following process should be used:%3Col%3E%0A     * %3Cli%3ELoad the class via the plugin instance%3C/li%3E%0A     * %3Cli%3EInstantiate the class using the plugin if it implements %7B@link com.atlassian.plugin.AutowireCapablePlugin%7D%0A     * %3Cli%3EIf not, instantiate the class with the host container%0A     *%0A     * @param className the context provider class name%0A     * @param plugin the plugin from which the context provider came%0A     * @return the context provider instance%0A     * @throws ConditionLoadingException If the context provider was unable to be created%0A     */%0A    ContextProvider loadContextProvider(String className, Plugin plugin) throws ConditionLoadingException;%0A%0A    /**%0A     * Look up a message key in the application%0A     *%0A     * @param key The message key%0A     * @param arguments The arguments to use to replace tokens with any expressions already processed%0A     * @param context The context (optional)%0A     * @return The text message%0A     */%0A    String getI18nValue(String key, List%3C?%3E arguments, Map%3CString,Object%3E context);%0A%0A    /**%0A     * Renders the string fragment as a Velocity template%0A     *%0A     * @param fragment The string fragment to render%0A     * @param context The context to use as the base of the Velocity context%0A     * @return The rendered string%0A     */
 %0A   

Add javadoc for WebFragmentHelper PLUG-230