Class AbstractPipelineImpl

java.lang.Object
io.jenkins.blueocean.rest.model.Resource
io.jenkins.blueocean.rest.model.BluePipeline
io.jenkins.blueocean.service.embedded.rest.AbstractPipelineImpl
All Implemented Interfaces:
io.jenkins.blueocean.rest.model.BlueManagedSource, io.jenkins.blueocean.rest.model.BluePipelineItem, io.jenkins.blueocean.rest.model.BlueRunnableItem, io.jenkins.blueocean.rest.Reachable
Direct Known Subclasses:
FreeStylePipeline

public class AbstractPipelineImpl extends io.jenkins.blueocean.rest.model.BluePipeline
Pipeline abstraction implementation. Use it to extend other kind of jenkins jobs
Author:
Vivek Pandey
  • Field Details

    • organization

      protected final io.jenkins.blueocean.rest.model.BlueOrganization organization
    • isRunning

      public static final Predicate<Run> isRunning
  • Constructor Details

    • AbstractPipelineImpl

      protected AbstractPipelineImpl(io.jenkins.blueocean.rest.model.BlueOrganization organization, Job job)
  • Method Details

    • getOrganizationName

      public String getOrganizationName()
      Specified by:
      getOrganizationName in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getOrganizationName in class io.jenkins.blueocean.rest.model.BluePipeline
    • getOrganization

      @NonNull public io.jenkins.blueocean.rest.model.BlueOrganization getOrganization()
      Specified by:
      getOrganization in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getOrganization in class io.jenkins.blueocean.rest.model.BluePipeline
    • getName

      public String getName()
      Specified by:
      getName in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getName in class io.jenkins.blueocean.rest.model.BluePipeline
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getDisplayName in class io.jenkins.blueocean.rest.model.BluePipeline
    • getWeatherScore

      public Integer getWeatherScore()
      Specified by:
      getWeatherScore in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getWeatherScore in class io.jenkins.blueocean.rest.model.BluePipeline
    • getLatestRun

      public io.jenkins.blueocean.rest.model.BlueRun getLatestRun()
      Specified by:
      getLatestRun in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getLatestRun in class io.jenkins.blueocean.rest.model.BluePipeline
    • getEstimatedDurationInMillis

      public Long getEstimatedDurationInMillis()
      Specified by:
      getEstimatedDurationInMillis in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getEstimatedDurationInMillis in class io.jenkins.blueocean.rest.model.BluePipeline
    • getRuns

      public io.jenkins.blueocean.rest.model.BlueRunContainer getRuns()
      Specified by:
      getRuns in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getRuns in class io.jenkins.blueocean.rest.model.BluePipeline
    • getActions

      public Collection<io.jenkins.blueocean.rest.model.BlueActionProxy> getActions()
      Specified by:
      getActions in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getActions in class io.jenkins.blueocean.rest.model.BluePipeline
    • getQueue

      @Navigable public io.jenkins.blueocean.rest.model.BlueQueueContainer getQueue()
      Specified by:
      getQueue in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getQueue in class io.jenkins.blueocean.rest.model.BluePipeline
    • delete

      @WebMethod(name="") @DELETE public void delete() throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • favorite

      public io.jenkins.blueocean.rest.model.BlueFavorite favorite(@JsonBody io.jenkins.blueocean.rest.model.BlueFavoriteAction favoriteAction)
      Specified by:
      favorite in class io.jenkins.blueocean.rest.model.BluePipeline
    • getFullName

      public String getFullName()
      Specified by:
      getFullName in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getFullName in class io.jenkins.blueocean.rest.model.BluePipeline
    • getFullDisplayName

      public String getFullDisplayName()
      Specified by:
      getFullDisplayName in interface io.jenkins.blueocean.rest.model.BluePipelineItem
      Specified by:
      getFullDisplayName in class io.jenkins.blueocean.rest.model.BluePipeline
    • getDisabled

      public Boolean getDisabled()
      Specified by:
      getDisabled in class io.jenkins.blueocean.rest.model.BluePipeline
    • enable

      public void enable() throws IOException
      Specified by:
      enable in class io.jenkins.blueocean.rest.model.BluePipeline
      Throws:
      IOException
    • disable

      public void disable() throws IOException
      Specified by:
      disable in class io.jenkins.blueocean.rest.model.BluePipeline
      Throws:
      IOException
    • getFullDisplayName

      public static String getFullDisplayName(@Nullable io.jenkins.blueocean.rest.model.BlueOrganization org, @NonNull Item item)
      Returns full display name relative to the BlueOrganization base. Each display name is separated by '/' and each display name is url encoded
      Parameters:
      org - the organization the item belongs to
      item - to return the full display name of
      Returns:
      full display name
    • getFullName

      public static String getFullName(@Nullable io.jenkins.blueocean.rest.model.BlueOrganization org, @NonNull Item item)
      Returns full name relative to the BlueOrganization base. Each name is separated by '/'
      Parameters:
      org - the organization the item belongs to
      item - to return the full name of
      Returns:
    • getBaseGroup

      public static ItemGroup<?> getBaseGroup(io.jenkins.blueocean.rest.model.BlueOrganization org)
      Tries to obtain the base group for a BlueOrganization
      Parameters:
      org - to get the base group of
      Returns:
      the base group
    • getLink

      public io.jenkins.blueocean.rest.hal.Link getLink()
    • getRecursivePathFromFullName

      public static String getRecursivePathFromFullName(io.jenkins.blueocean.rest.model.BluePipeline pipeline)
      Calculates the recursive path for the BluePipeline. The path is relative to the org base
      Parameters:
      pipeline - to get the recursive path from
      Returns:
      the recursive path
    • getParameters

      public List<Object> getParameters()
      Specified by:
      getParameters in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getParameters in class io.jenkins.blueocean.rest.model.BluePipeline
    • getParameterDefinitions

      public static List<Object> getParameterDefinitions(Job job)
    • getJob

      public Job getJob()
      Gives underlying Jenkins job
      Returns:
      jenkins job
    • getPermissions

      public Map<String,Boolean> getPermissions()
      Specified by:
      getPermissions in class io.jenkins.blueocean.rest.model.BluePipeline
    • getScm

      public io.jenkins.blueocean.rest.model.BluePipelineScm getScm()
      Specified by:
      getScm in interface io.jenkins.blueocean.rest.model.BlueManagedSource
      Specified by:
      getScm in class io.jenkins.blueocean.rest.model.BluePipeline
    • getTrends

      public io.jenkins.blueocean.rest.model.BlueTrendContainer getTrends()
      Specified by:
      getTrends in interface io.jenkins.blueocean.rest.model.BlueRunnableItem
      Specified by:
      getTrends in class io.jenkins.blueocean.rest.model.BluePipeline
    • getPermissions

      public static Map<String,Boolean> getPermissions(AbstractItem item)
    • isFavorite

      public boolean isFavorite()