Class Artifact

All Implemented Interfaces:
IArtifact, IUnitCreator, IEventSource

@Ser public class Artifact extends JebEventSource implements IArtifact
Basic implementation for a named artifact that takes a flexible IInput object.
  • Field Details

    • EMPTY

      public static final Artifact EMPTY
      Empty placeholder artifact backed by an empty byte array.
  • Constructor Details

    • Artifact

      public Artifact(String name, IInput input)
      Create an artifact backed by the provided input object.
      Parameters:
      name - artifact name
      input - artifact input
  • Method Details

    • getParent

      public IUnitCreator getParent()
      Get the parent creator of this artifact.
      Specified by:
      getParent in interface IArtifact
      Specified by:
      getParent in interface IUnitCreator
      Returns:
      null, because artifacts are root creators
    • getInput

      public IInput getInput()
      Get the input backing this artifact.
      Specified by:
      getInput in interface IArtifact
      Specified by:
      getInput in interface IUnitCreator
      Returns:
      input object
    • setInput

      public void setInput(IInput input)
      Set the input backing this artifact.
      Parameters:
      input - new input object
    • getName

      public String getName()
      Get the artifact name.
      Specified by:
      getName in interface IArtifact
      Specified by:
      getName in interface IUnitCreator
      Returns:
      artifact name
    • setName

      public void setName(String name)
      Set the artifact name.
      Specified by:
      setName in interface IArtifact
      Parameters:
      name - new artifact name
    • getNotes

      public String getNotes()
      Get the user notes associated with this artifact.
      Specified by:
      getNotes in interface IArtifact
      Returns:
      user notes
    • setNotes

      public void setNotes(String notes)
      Set the user notes associated with this artifact.
      Specified by:
      setNotes in interface IArtifact
      Parameters:
      notes - new notes
    • getCreationTimestamp

      public long getCreationTimestamp()
      Get the artifact creation timestamp.
      Specified by:
      getCreationTimestamp in interface IArtifact
      Returns:
      creation timestamp in milliseconds since the epoch
    • toString

      public String toString()
      Overrides:
      toString in class Object