public class

MockHelpUrlsParser

extends Object
implements HelpUrlsParser
java.lang.Object
   ↳ com.atlassian.jira.help.MockHelpUrlsParser

Summary

Public Constructors
MockHelpUrlsParser()
Public Methods
MockHelpUrl createUrl(String key, String url)
MockHelpUrl createUrlOd(String key, String url)
@Nonnull HelpUrlsParser defaultUrl(String url, String title)
Returns a new parser that will use the passed URL (title) in URLs that don't have a URL (title) set.
Option<String> getApplicationHelpSpace()
HelpUrl getDefault()
HelpUrl getGeneratedDefault(String value)
HelpUrl getGeneratedUrl(HelpUrl url, String value)
@Nonnull HelpUrlsParser onDemand(boolean onDemand)
Returns a new parser that will either use or ignore .ondemand properties.
@Nonnull MockHelpUrls parse(Map<StringString> properties)
Parse the passed properties and return an equivalent HelpUrls instance.
@Nonnull HelpUrls parse(Properties properties)
Parse the passed properties and return an equivalent HelpUrls instance.
@Nonnull HelpUrls parse(Properties externalProperties, Properties internalProperties)
Parse the passed properties and return an equivalent HelpUrls instance.
@Nonnull HelpUrls parse(Map<StringString> userProperties, Map<StringString> adminProperties)
Parse two passed maps with user and admin properties and return an equivalent HelpUrls instance.
MockHelpUrlsParser register(HelpUrl url)
MockHelpUrlsParser registerOd(HelpUrl url)
void setApplicationHelpSpace(Option<String> applicationHelpSpace)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.help.HelpUrlsParser

Public Constructors

public MockHelpUrlsParser ()

Public Methods

public MockHelpUrl createUrl (String key, String url)

public MockHelpUrl createUrlOd (String key, String url)

@Nonnull public HelpUrlsParser defaultUrl (String url, String title)

Returns a new parser that will use the passed URL (title) in URLs that don't have a URL (title) set. It is possible for the parser to ignore these values if the input name-value pairs during a parse have their own configured default.

Parameters
url the default URL.
title the default title of the URL.
Returns
  • a new parser with the URL and title of the default HelpUrl configured.

public Option<String> getApplicationHelpSpace ()

public HelpUrl getDefault ()

public HelpUrl getGeneratedDefault (String value)

public HelpUrl getGeneratedUrl (HelpUrl url, String value)

@Nonnull public HelpUrlsParser onDemand (boolean onDemand)

Returns a new parser that will either use or ignore .ondemand properties.

Parameters
onDemand true if the parser should use .ondemand properties, or false if they should be ignored.
Returns
  • a new parser configured to either use or ignore .ondemand properties

@Nonnull public MockHelpUrls parse (Map<StringString> properties)

Parse the passed properties and return an equivalent HelpUrls instance.

Parameters
properties the properties to parse.
Returns
  • the HelpUrls representation of the passed properties.

@Nonnull public HelpUrls parse (Properties properties)

Parse the passed properties and return an equivalent HelpUrls instance.

Parameters
properties the properties to parse.
Returns
  • the HelpUrls representation of the passed properties.

@Nonnull public HelpUrls parse (Properties externalProperties, Properties internalProperties)

Parse the passed properties and return an equivalent HelpUrls instance.

This method should not be called by plugins as the format of internalProperties is not documented and is subject to change.

Parameters
externalProperties the properties to parse.
internalProperties the internal properties to parse. These properties follow a different format to the that documented on this interface and should only be used by JIRA internally.
Returns
  • the HelpUrls representation of the passed properties.

@Nonnull public HelpUrls parse (Map<StringString> userProperties, Map<StringString> adminProperties)

Parse two passed maps with user and admin properties and return an equivalent HelpUrls instance. Default url will be read from the first map. Any other entries existing in both maps will be overwritten by entries from second (admin properties) map.

Parameters
userProperties map containing user properties
adminProperties map containing admin properties
Returns
  • the HelpUrls representation of the passed properties.

public MockHelpUrlsParser register (HelpUrl url)

public MockHelpUrlsParser registerOd (HelpUrl url)

public void setApplicationHelpSpace (Option<String> applicationHelpSpace)