public class

IsScmCondition

extends Object
implements Condition
java.lang.Object
   ↳ com.atlassian.bitbucket.web.conditions.IsScmCondition

Class Overview

Checks for a "repository" in the context and displays if that repository has a specified SCM. If the context does not contain a "repository" the associated component will not be displayed.

Usage:


 <condition class="com.atlassian.bitbucket.web.conditions.IsScmCondition">
     <param name="key">repository</param>
     <param name="scm">git</param>
 </condition>
 

The "key" param is optional, and defaults to "repository" if not set. That's appropriate for most contexts. An example of a place where the "key" might be set is when using this condition for a fragment on "bitbucket.internal.page.repository.fork", where the context contains "upstream" and "fork" rather than "repository".

Summary

Public Constructors
IsScmCondition()
Public Methods
void init(Map<StringString> params)
boolean shouldDisplay(Map<StringObject> context)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Public Constructors

public IsScmCondition ()

Public Methods

public void init (Map<StringString> params)

Throws
PluginParseException

public boolean shouldDisplay (Map<StringObject> context)