Class InputParserImpl
java.lang.Object
com.atlassian.bamboo.plugins.rest.common.InputParserImpl
- All Implemented Interfaces:
InputParser
Utility service for parsing PlanKeys
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull PlanKey
parseChainKey
(@Nullable String chainKeyString) Parse a chain key from the input string.@NotNull PlanKey
parseJobKey
(@NotNull PlanKey chainKey, @Nullable String jobKeyString) Parse a job key from the input string.@NotNull PlanKey
parseJobKey
(@Nullable String jobKeyString) Parse a job key from the input string.
-
Constructor Details
-
InputParserImpl
@Inject public InputParserImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver)
-
-
Method Details
-
parseChainKey
Parse a chain key from the input string.- Specified by:
parseChainKey
in interfaceInputParser
- Parameters:
chainKeyString
- to parse.- Returns:
- parsed key.
- Throws:
NotFoundException
- if the key is invalid.
-
parseJobKey
Parse a job key from the input string.- Specified by:
parseJobKey
in interfaceInputParser
- Parameters:
jobKeyString
- to parse.- Returns:
- parsed key.
- Throws:
NotFoundException
- if the key is invalid.
-
parseJobKey
@NotNull public @NotNull PlanKey parseJobKey(@NotNull @NotNull PlanKey chainKey, @Nullable @Nullable String jobKeyString) Parse a job key from the input string. Will work if the jobKeyString is in short form or long form.- Specified by:
parseJobKey
in interfaceInputParser
- Parameters:
chainKey
- of plan job key is for.jobKeyString
- to parse.- Returns:
- parsed key.
- Throws:
NotFoundException
- if the key is invalid.
-