com.atlassian.jira.help
Class MockHelpUrlsParser

java.lang.Object
  extended by com.atlassian.jira.help.MockHelpUrlsParser
All Implemented Interfaces:
HelpUrlsParser

public class MockHelpUrlsParser
extends Object
implements HelpUrlsParser

Since:
v6.2.4

Constructor Summary
MockHelpUrlsParser()
           
 
Method Summary
 MockHelpUrl createUrl(String key, String url)
           
 MockHelpUrl createUrlOd(String key, String url)
           
 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.
 HelpUrl getDefault()
           
 HelpUrl getGeneratedDefault(String value)
           
 HelpUrl getGeneratedUrl(HelpUrl url, String value)
           
 HelpUrlsParser onDemand(boolean onDemand)
          Returns a new parser that will either use or ignore .ondemand properties.
 HelpUrls parse(Map<String,String> properties)
          Parse the passed properties and return an equivalent HelpUrls instance.
 HelpUrls parse(Properties properties)
          Parse the passed properties and return an equivalent HelpUrls instance.
 HelpUrls parse(Properties externalProperties, Properties internalProperties)
          Parse the passed properties and return an equivalent HelpUrls instance.
 MockHelpUrlsParser register(HelpUrl url)
           
 MockHelpUrlsParser registerOd(HelpUrl url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockHelpUrlsParser

public MockHelpUrlsParser()
Method Detail

onDemand

@Nonnull
public HelpUrlsParser onDemand(boolean onDemand)
Description copied from interface: HelpUrlsParser
Returns a new parser that will either use or ignore .ondemand properties.

Specified by:
onDemand in interface HelpUrlsParser
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

defaultUrl

@Nonnull
public HelpUrlsParser defaultUrl(String url,
                                         String title)
Description copied from interface: HelpUrlsParser
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.

Specified by:
defaultUrl in interface HelpUrlsParser
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.

parse

@Nonnull
public HelpUrls parse(@Nonnull
                              Properties properties)
Description copied from interface: HelpUrlsParser
Parse the passed properties and return an equivalent HelpUrls instance.

Specified by:
parse in interface HelpUrlsParser
Parameters:
properties - the properties to parse.
Returns:
the HelpUrls representation of the passed properties.

parse

@Nonnull
public HelpUrls parse(@Nonnull
                              Properties externalProperties,
                              @Nonnull
                              Properties internalProperties)
Description copied from interface: HelpUrlsParser
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.

Specified by:
parse in interface HelpUrlsParser
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.

parse

@Nonnull
public HelpUrls parse(@Nonnull
                              Map<String,String> properties)
Description copied from interface: HelpUrlsParser
Parse the passed properties and return an equivalent HelpUrls instance.

Specified by:
parse in interface HelpUrlsParser
Parameters:
properties - the properties to parse.
Returns:
the HelpUrls representation of the passed properties.

getDefault

public HelpUrl getDefault()

registerOd

public MockHelpUrlsParser registerOd(HelpUrl url)

register

public MockHelpUrlsParser register(HelpUrl url)

createUrl

public MockHelpUrl createUrl(String key,
                             String url)

createUrlOd

public MockHelpUrl createUrlOd(String key,
                               String url)

getGeneratedUrl

public HelpUrl getGeneratedUrl(HelpUrl url,
                               String value)

getGeneratedDefault

public HelpUrl getGeneratedDefault(String value)


Copyright © 2002-2014 Atlassian. All Rights Reserved.