Class ArtifactDataInstance

  • All Implemented Interfaces:
    ArtifactData

    public final class ArtifactDataInstance
    extends java.lang.Object
    implements ArtifactData
    Information about a single artifact in the artifact list
    Since:
    2017.1
    Author:
    vbedrosova
    See Also:
    ArtifactListData
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String URL_KEY  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ArtifactDataInstance create​(java.lang.String path, long size)
      Creates a new instance without any additional properties
      static ArtifactDataInstance create​(java.lang.String path, long size, java.util.Map<java.lang.String,​java.lang.String> properties)
      Creates a new instance
      boolean equals​(java.lang.Object o)  
      java.lang.String getPath()
      Returns relative path of this artifact
      java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Returns custom artifact properties provided by the implementation, e.g.
      long getSize()
      Returns artifact size in bytes
      java.lang.String getUrl()
      Returns http download URL (getProperties value for URL_KEY) of this artifact if available.
      int hashCode()  
      java.lang.String toString()  
      ArtifactDataInstance withProperty​(java.lang.String key, java.lang.String value)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • create

        @NotNull
        public static ArtifactDataInstance create​(@NotNull
                                                  java.lang.String path,
                                                  long size,
                                                  @NotNull
                                                  java.util.Map<java.lang.String,​java.lang.String> properties)
        Creates a new instance
        Parameters:
        path - - relative path to artifact inside build artifacts, including the artifact file name
        size - - size (bytes) of artifact
        properties - - additional properties map
      • create

        @NotNull
        public static ArtifactDataInstance create​(@NotNull
                                                  java.lang.String path,
                                                  long size)
        Creates a new instance without any additional properties
      • withProperty

        @NotNull
        public ArtifactDataInstance withProperty​(@NotNull
                                                 java.lang.String key,
                                                 @NotNull
                                                 java.lang.String value)
      • getPath

        @NotNull
        public java.lang.String getPath()
        Description copied from interface: ArtifactData
        Returns relative path of this artifact
        Specified by:
        getPath in interface ArtifactData
        Returns:
        see above
      • getSize

        public long getSize()
        Description copied from interface: ArtifactData
        Returns artifact size in bytes
        Specified by:
        getSize in interface ArtifactData
        Returns:
        see above
      • getProperties

        @NotNull
        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Description copied from interface: ArtifactData
        Returns custom artifact properties provided by the implementation, e.g. URL_KEY
        Specified by:
        getProperties in interface ArtifactData
        Returns:
        see above
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object