Klasse BuildAction<T>

java.lang.Object
io.jenkins.plugins.util.BuildAction<T>
Typparameter:
T - type of the results
Alle implementierten Schnittstellen:
Action, ModelObject, Serializable, RunAction2, SimpleBuildStep.LastBuildAction

public abstract class BuildAction<T> extends Object implements SimpleBuildStep.LastBuildAction, RunAction2, Serializable
Controls the life cycle of the results in a build. This action persists the results of a build and displays a summary on the build page. The actual visualization of the results is defined in the matching summary.jelly file. This action also provides access to the detail views: these are rendered using a new view instance.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • BuildAction

      protected BuildAction(Run<?,?> owner, T result)
      Creates a new instance of BuildAction.
      Parameter:
      owner - the associated build that created the result
      result - the result to persist with this action
    • BuildAction

      public BuildAction(Run<?,?> owner, T result, boolean canSerialize)
      Creates a new instance of BuildAction.
      Parameter:
      owner - the associated build that created the result
      result - the result to persist with this action
      canSerialize - determines whether the result should be persisted in the build folder
  • Methodendetails

    • createXmlStream

      protected abstract AbstractXmlStream<T> createXmlStream()
      Creates the XML stream to read the results. This method is invoked by the constructor in this BuildAction so this instance is not yet fully initialized when this factory method is called. So just return the stream instance without accessing any fields.
      Gibt zurück:
      the XML stream
    • getOwner

      public Run<?,?> getOwner()
    • onAttached

      public void onAttached(Run<?,?> r)
      Angegeben von:
      onAttached in Schnittstelle RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Angegeben von:
      onLoad in Schnittstelle RunAction2
    • readResolve

      protected Object readResolve()
      Called after de-serialization to improve the memory usage.
      Gibt zurück:
      this
    • getProjectActions

      public Collection<? extends Action> getProjectActions()
      Angegeben von:
      getProjectActions in Schnittstelle SimpleBuildStep.LastBuildAction
    • createProjectAction

      protected abstract JobAction<? extends BuildAction<T>> createProjectAction()
    • getResult

      public T getResult()
      Returns the repository statistics. Since the object requires some amount of memory, it is stored in a WeakReference. So if the current instance has been destroyed by the garbage collector then a new instance will be automatically created by reading the persisted XML data from Jenkins build folder.
      Gibt zurück:
      the statistics
    • getBuildResultBaseName

      protected abstract String getBuildResultBaseName()
    • getBuildActionFromHistoryStartingFrom

      public static <T extends BuildAction<?>> Optional<T> getBuildActionFromHistoryStartingFrom(@CheckForNull Run<?,?> baseline, Class<T> buildActionClass)
      Returns a BuildAction of the specified baseline build. If there is no such action for the baseline then the previous build is inspected, and so on. If no previous build contains a BuildAction then an empty result is returned.
      Typparameter:
      T - type of the results
      Parameter:
      baseline - the baseline to start the search with
      buildActionClass - the type of the action to find
      Gibt zurück:
      the next available BuildAction, or an empty result if there is no such action