public class IsScmCondition extends Object implements com.atlassian.plugin.web.Condition
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".
Constructor and Description |
---|
IsScmCondition() |
Modifier and Type | Method and Description |
---|---|
void |
init(Map<String,String> params) |
boolean |
shouldDisplay(Map<String,Object> context) |
Copyright © 2019 Atlassian. All rights reserved.