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 callBlueUrlTokenizer.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 Summary
Enum Constants Enum Constant Description BRANCH
A URL pointing at a pipeline Run Details for a specific branch.DASHBOARD_PIPELINES
Main blue ocean pipelines dashboard.ORGANIZATION
A URL pointing at a page associated with an "organization" resource.PIPELINE
A URL pointing at a pipeline.PIPELINE_RUN_DETAIL
A URL pointing at a pipeline Run Details.PIPELINE_RUN_DETAIL_ID
A URL pointing at a pipeline Run Details for a specific run of a specific branch.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.PIPELINE_TAB
A URL pointing at a pipeline tab.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BlueUrlTokenizer.UrlPart
valueOf(String name)
Returns the enum constant of this type with the specified name.static BlueUrlTokenizer.UrlPart[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
orPIPELINE_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/activityCall 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 theRun
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/artifactsCall Use
BlueUrlTokenizer.getPart(UrlPart)
to get the tab name.
-
-
Method Detail
-
values
public static BlueUrlTokenizer.UrlPart[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BlueUrlTokenizer.UrlPart c : BlueUrlTokenizer.UrlPart.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
-