Class InputParserImpl

  • All Implemented Interfaces:
    InputParser

    @Component
    public class InputParserImpl
    extends Object
    implements InputParser
    Utility service for parsing PlanKeys
    • Constructor Detail

      • InputParserImpl

        @Autowired
        public InputParserImpl​(com.atlassian.sal.api.message.I18nResolver i18nResolver)
    • Method Detail

      • parseChainKey

        @NotNull
        public @NotNull PlanKey parseChainKey​(@Nullable
                                              @Nullable String chainKeyString)
        Parse a chain key from the input string.
        Specified by:
        parseChainKey in interface InputParser
        Parameters:
        chainKeyString - to parse.
        Returns:
        parsed key.
        Throws:
        NotFoundException - if the key is invalid.
      • parseJobKey

        @NotNull
        public @NotNull PlanKey parseJobKey​(@Nullable
                                            @Nullable String jobKeyString)
        Parse a job key from the input string.
        Specified by:
        parseJobKey in interface InputParser
        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 interface InputParser
        Parameters:
        chainKey - of plan job key is for.
        jobKeyString - to parse.
        Returns:
        parsed key.
        Throws:
        NotFoundException - if the key is invalid.