Enum BlueUrlTokenizer.UrlPart

java.lang.Object
java.lang.Enum<BlueUrlTokenizer.UrlPart>
io.jenkins.blueocean.preload.BlueUrlTokenizer.UrlPart
All Implemented Interfaces:
Serializable, Comparable<BlueUrlTokenizer.UrlPart>
Enclosing class:
BlueUrlTokenizer

public static enum BlueUrlTokenizer.UrlPart extends Enum<BlueUrlTokenizer.UrlPart>
Enum of URL "parts".

Use BlueUrlTokenizer.getPart(UrlPart) to get a specific URL "part", or call BlueUrlTokenizer.hasPart(UrlPart) to check for it's existence.

*** TBD: decide whether to stick with this model, or to switch to more of a straight getters/setters style on the BlueUrlTokenizer instance. Reason for trying this approach ("parts" enum) is that I (TF) think the straight properties style with getters/setters would get messy as we add support for parsing more URL paths/parts i.e. a getters/setters API explosion. That said ... not sure I love this approach either, hence marked BlueoceanUrl as @Restricted(NoExternalUse.class). Let's suck it and see for a bit and change if it sucks :)

  • Enum Constant Details

    • DASHBOARD_PIPELINES

      public static final BlueUrlTokenizer.UrlPart DASHBOARD_PIPELINES
      Main blue ocean pipelines dashboard. i.e. /blue/pipelines/
    • ORGANIZATION

      public static final BlueUrlTokenizer.UrlPart ORGANIZATION
      A URL pointing at a page associated with an "organization" resource. e.g. /blue/organizations/jenkins/...

      Call Use BlueUrlTokenizer.getPart(UrlPart) to get the organization name.

    • PIPELINE

      public static final BlueUrlTokenizer.UrlPart PIPELINE
      A URL pointing at a pipeline. e.g. /blue/organizations/jenkins/f1%2Ff3%20with%20spaces%2Ff3%20pipeline/...

      Call Use BlueUrlTokenizer.getPart(UrlPart) to get the pipeline name. Note that the URL may have additional parts (e.g. PIPELINE_TAB or PIPELINE_RUN_DETAIL).

    • PIPELINE_TAB

      public static final BlueUrlTokenizer.UrlPart PIPELINE_TAB
      A URL pointing at a pipeline tab. e.g. /blue/organizations/jenkins/f1%2Ff3%20with%20spaces%2Ff3%20pipeline/activity

      Call Use BlueUrlTokenizer.getPart(UrlPart) to get the tab name.

    • PIPELINE_RUN_DETAIL

      public static final BlueUrlTokenizer.UrlPart PIPELINE_RUN_DETAIL
      A URL pointing at a pipeline Run Details. e.g. // e.g. /blue/organizations/jenkins/f1%2Ff3%20with%20spaces%2Ff3%20pipeline/detail/...

      See BRANCH for sub-component of this URL.

    • BRANCH

      public static final BlueUrlTokenizer.UrlPart BRANCH
      A URL pointing at a pipeline Run Details for a specific branch. e.g. // e.g. /blue/organizations/jenkins/f1%2Ff3%20with%20spaces%2Ff3%20pipeline/detail/magic-branch-X/...

      See PIPELINE_RUN_DETAIL_ID for sub-component of this URL.

      Call Use BlueUrlTokenizer.getPart(UrlPart) to get the branch name.

    • PIPELINE_RUN_DETAIL_ID

      public static final BlueUrlTokenizer.UrlPart PIPELINE_RUN_DETAIL_ID
      A URL pointing at a pipeline Run Details for a specific run of a specific branch. e.g. // e.g. /blue/organizations/jenkins/f1%2Ff3%20with%20spaces%2Ff3%20pipeline/detail/magic-branch-X/55/...

      See PIPELINE_RUN_DETAIL_ID for sub-component of this URL.

      Call Use BlueUrlTokenizer.getPart(UrlPart) to get the Run ID.

    • PIPELINE_RUN_DETAIL_TAB

      public static final BlueUrlTokenizer.UrlPart PIPELINE_RUN_DETAIL_TAB
      A URL pointing at one of the tabs on a pipeline Run Details for a specific run of a specific branch. e.g. // e.g. /blue/organizations/jenkins/f1%2Ff3%20with%20spaces%2Ff3%20pipeline/detail/magic-branch-X/55/artifacts

      Call Use BlueUrlTokenizer.getPart(UrlPart) to get the tab name.

  • Method Details

    • values

      public static BlueUrlTokenizer.UrlPart[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BlueUrlTokenizer.UrlPart valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null