com.atlassian.jira.help
Class InitialHelpUrlsParser

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

public class InitialHelpUrlsParser
extends Object

This is the actual HelpUrlsParser in PICO. It provides an DefaultHelpUrlsParser instance with an initial onDemand that does a runtime check to determine how to process .ondemand properties.

Since:
v6.2.4

Constructor Summary
InitialHelpUrlsParser(HelpUrlBuilder.Factory helpUrlBuilderFactory, LocalHelpUrls localUrls, FeatureManager featureManager)
           
 
Method Summary
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitialHelpUrlsParser

public InitialHelpUrlsParser(HelpUrlBuilder.Factory helpUrlBuilderFactory,
                             LocalHelpUrls localUrls,
                             FeatureManager featureManager)
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.


Copyright © 2002-2014 Atlassian. All Rights Reserved.