|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.fisheye.plugin.web.conditions.AbstractFisheyeCondition
public abstract class AbstractFisheyeCondition
Base class for FishEye and Crucible conditions. Plugins extend this class to create their own conditions. Instances of conditions are created as the decision to display a web-item is taken, and are then discarded.
Constructor Summary | |
---|---|
AbstractFisheyeCondition()
|
Method Summary | |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
getParams()
Get a Map of the parameters provided to the condition. |
protected java.lang.String |
getRequiredParam(java.lang.String name)
Get a named parameter, throwing an exception if it is not set. |
void |
init(java.util.Map<java.lang.String,java.lang.String> params)
|
protected abstract boolean |
shouldDisplay(Helper context)
Subclasses must implement this method and return a boolean indicating whether to display the item. |
boolean |
shouldDisplay(java.util.Map context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractFisheyeCondition()
Method Detail |
---|
public final void init(java.util.Map<java.lang.String,java.lang.String> params) throws com.atlassian.plugin.PluginParseException
init
in interface com.atlassian.plugin.web.Condition
com.atlassian.plugin.PluginParseException
public final boolean shouldDisplay(java.util.Map context)
shouldDisplay
in interface com.atlassian.plugin.web.Condition
protected final java.util.Map<java.lang.String,java.lang.String> getParams()
@NotNull protected final java.lang.String getRequiredParam(java.lang.String name)
name
- a String naming the parameter
protected abstract boolean shouldDisplay(Helper context)
context
- a Helper containing the context in which the web-item would be shown
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |