public class InitialHelpUrlsParser extends Object
HelpUrlsParser
in PICO. It provides
an DefaultHelpUrlsParser
instance with an initial onDemand(boolean)
that does a runtime check
to determine how to process .ondemand
properties.Constructor and Description |
---|
InitialHelpUrlsParser(BuildUtilsInfo buildUtilsInfo,
LocalHelpUrls localUrls) |
Modifier and Type | Method and Description |
---|---|
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(Map<String,String> userProperties,
Map<String,String> adminProperties)
Parse two passed maps with user and admin 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. |
public InitialHelpUrlsParser(BuildUtilsInfo buildUtilsInfo, LocalHelpUrls localUrls)
@Nonnull public HelpUrlsParser onDemand(boolean onDemand)
HelpUrlsParser
.ondemand
properties.onDemand
in interface HelpUrlsParser
onDemand
- true
if the parser should use .ondemand
properties, or false
if they
should be ignored..ondemand
properties@Nonnull public HelpUrlsParser defaultUrl(String url, String title)
HelpUrlsParser
defaultUrl
in interface HelpUrlsParser
url
- the default URL.title
- the default title of the URL.HelpUrl
configured.@Nonnull public HelpUrls parse(@Nonnull Properties properties)
HelpUrlsParser
HelpUrls
instance.parse
in interface HelpUrlsParser
properties
- the properties to parse.HelpUrls
representation of the passed properties.@Nonnull public HelpUrls parse(@Nonnull Properties externalProperties, @Nonnull Properties internalProperties)
HelpUrlsParser
HelpUrls
instance.
This method should not be called by plugins as the format of internalProperties
is not documented
and is subject to change.
parse
in interface HelpUrlsParser
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.HelpUrls
representation of the passed properties.@Nonnull public HelpUrls parse(@Nonnull Map<String,String> properties)
HelpUrlsParser
HelpUrls
instance.parse
in interface HelpUrlsParser
properties
- the properties to parse.HelpUrls
representation of the passed properties.@Nonnull public HelpUrls parse(@Nonnull Map<String,String> userProperties, @Nonnull Map<String,String> adminProperties)
HelpUrlsParser
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.parse
in interface HelpUrlsParser
userProperties
- map containing user propertiesadminProperties
- map containing admin propertiesHelpUrls
representation of the passed properties.Copyright © 2002-2017 Atlassian. All Rights Reserved.