View Javadoc

1   package com.atlassian.plugin.web;
2   
3   import com.atlassian.plugin.PluginParseException;
4   
5   import java.util.Map;
6   
7   /**
8    * Decides whether a web section or web item should be displayed
9    */
10  public interface Condition
11  {
12      /**
13       * Called after creation and autowiring.
14       *
15       * @param params The optional map of parameters specified in XML.
16       */
17      void init(Map<String,String> params) throws PluginParseException;
18  
19      /**
20       * Determine whether the web fragment should be displayed
21       *
22       * @return true if the user should see the fragment, false otherwise
23       */
24      boolean shouldDisplay(Map<String,Object> context);
25  }