Class Mirror

All Implemented Interfaces:
Serializable

@Experimental @Generated @ThreadSafe @Immutable public class Mirror extends IdentifiableBase implements Serializable
A download mirror for a given repository.
See Also:
  • Method Details

    • getMirrorOf

      public String getMirrorOf()
      The server ID of the repository being mirrored, e.g., "central". This MUST NOT match the mirror id.
      Returns:
      a String
    • getName

      public String getName()
      The optional name that describes the mirror.
      Returns:
      a String
    • getUrl

      public String getUrl()
      The URL of the mirror repository.
      Returns:
      a String
    • getLayout

      public String getLayout()
      The layout of the mirror repository. Since Maven 3.
      Returns:
      a String
    • getMirrorOfLayouts

      public String getMirrorOfLayouts()
      The layouts of repositories being mirrored. This value can be used to restrict the usage of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
      Returns:
      a String
    • isBlocked

      public boolean isBlocked()
      Whether this mirror should be blocked from any download request but fail the download process, explaining why.
      Returns:
      a boolean
    • with

      @Nonnull public Mirror.Builder with()
      Creates a new builder with this object as the basis.
      Overrides:
      with in class IdentifiableBase
      Returns:
      a Builder
    • withId

      @Nonnull public Mirror withId(String id)
      Creates a new Mirror instance using the specified id.
      Overrides:
      withId in class IdentifiableBase
      Parameters:
      id - the new String to use
      Returns:
      a Mirror with the specified id
    • withMirrorOf

      @Nonnull public Mirror withMirrorOf(String mirrorOf)
      Creates a new Mirror instance using the specified mirrorOf.
      Parameters:
      mirrorOf - the new String to use
      Returns:
      a Mirror with the specified mirrorOf
    • withName

      @Nonnull public Mirror withName(String name)
      Creates a new Mirror instance using the specified name.
      Parameters:
      name - the new String to use
      Returns:
      a Mirror with the specified name
    • withUrl

      @Nonnull public Mirror withUrl(String url)
      Creates a new Mirror instance using the specified url.
      Parameters:
      url - the new String to use
      Returns:
      a Mirror with the specified url
    • withLayout

      @Nonnull public Mirror withLayout(String layout)
      Creates a new Mirror instance using the specified layout.
      Parameters:
      layout - the new String to use
      Returns:
      a Mirror with the specified layout
    • withMirrorOfLayouts

      @Nonnull public Mirror withMirrorOfLayouts(String mirrorOfLayouts)
      Creates a new Mirror instance using the specified mirrorOfLayouts.
      Parameters:
      mirrorOfLayouts - the new String to use
      Returns:
      a Mirror with the specified mirrorOfLayouts
    • withBlocked

      @Nonnull public Mirror withBlocked(boolean blocked)
      Creates a new Mirror instance using the specified blocked.
      Parameters:
      blocked - the new boolean to use
      Returns:
      a Mirror with the specified blocked
    • newInstance

      @Nonnull public static Mirror newInstance()
      Creates a new Mirror instance. Equivalent to newInstance( true ).
      Returns:
      a new Mirror
      See Also:
    • newInstance

      @Nonnull public static Mirror newInstance(boolean withDefaults)
      Creates a new Mirror instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Mirror
    • newBuilder

      @Nonnull public static Mirror.Builder newBuilder()
      Creates a new Mirror builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static Mirror.Builder newBuilder(boolean withDefaults)
      Creates a new Mirror builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Mirror.Builder newBuilder(Mirror from)
      Creates a new Mirror builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the Mirror instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Mirror.Builder newBuilder(Mirror from, boolean forceCopy)
      Creates a new Mirror builder instance using the specified object as a basis.
      Parameters:
      from - the Mirror instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder
    • toString

      public String toString()
      Overrides:
      toString in class Object