1 package com.atlassian.plugin.web.conditions;
2
3 import com.atlassian.plugin.PluginParseException;
4 import com.atlassian.plugin.web.Condition;
5
6 import java.util.Map;
7
8 public class InvertedCondition implements Condition
9 {
10 private Condition wrappedCondition;
11
12 public InvertedCondition(Condition wrappedCondition)
13 {
14 this.wrappedCondition = wrappedCondition;
15 }
16
17 public void init(Map<String,String> params) throws PluginParseException
18 {
19 }
20
21 public boolean shouldDisplay(Map<String,Object> context)
22 {
23 return !wrappedCondition.shouldDisplay(context);
24 }
25 }