@Experimental @Generated @ThreadSafe @Immutable public class RepositoryPolicy extends Object implements Serializable, InputLocationTracker
| Modifier and Type | Class and Description |
|---|---|
static class |
RepositoryPolicy.Builder
Builder class used to create RepositoryPolicy instances.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getChecksumPolicy()
What to do when verification of an artifact checksum fails.
|
String |
getEnabled()
Whether to use this repository for downloading this type of artifact.
|
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
String |
getUpdatePolicy()
The frequency for downloading updates - can be
always,
daily
(default),
interval:XXX
(in minutes) or
never
(only if it doesn't exist locally). |
boolean |
isEnabled() |
static RepositoryPolicy.Builder |
newBuilder()
Creates a new
RepositoryPolicy builder instance. |
static RepositoryPolicy.Builder |
newBuilder(boolean withDefaults)
Creates a new
RepositoryPolicy builder instance using default values or not. |
static RepositoryPolicy.Builder |
newBuilder(RepositoryPolicy from)
Creates a new
RepositoryPolicy builder instance using the specified object as a basis. |
static RepositoryPolicy.Builder |
newBuilder(RepositoryPolicy from,
boolean forceCopy)
Creates a new
RepositoryPolicy builder instance using the specified object as a basis. |
static RepositoryPolicy |
newInstance()
Creates a new
RepositoryPolicy instance. |
static RepositoryPolicy |
newInstance(boolean withDefaults)
Creates a new
RepositoryPolicy instance using default values or not. |
RepositoryPolicy.Builder |
with()
Creates a new builder with this object as the basis.
|
RepositoryPolicy |
withChecksumPolicy(String checksumPolicy)
Creates a new
RepositoryPolicy instance using the specified checksumPolicy. |
RepositoryPolicy |
withEnabled(String enabled)
Creates a new
RepositoryPolicy instance using the specified enabled. |
RepositoryPolicy |
withUpdatePolicy(String updatePolicy)
Creates a new
RepositoryPolicy instance using the specified updatePolicy. |
public String getEnabled()
String for technical reasons, the semantic type is actually
Boolean. Default value is true.Stringpublic String getUpdatePolicy()
always,
daily
(default),
interval:XXX
(in minutes) or
never
(only if it doesn't exist locally).Stringpublic String getChecksumPolicy()
ignore,
fail
(default for Maven 4 and above) or
warn
(default for Maven 2 and 3)Stringpublic InputLocation getLocation(Object key)
getLocation in interface InputLocationTracker@Nonnull public RepositoryPolicy.Builder with()
Builder@Nonnull public RepositoryPolicy withEnabled(String enabled)
RepositoryPolicy instance using the specified enabled.enabled - the new String to useRepositoryPolicy with the specified enabled@Nonnull public RepositoryPolicy withUpdatePolicy(String updatePolicy)
RepositoryPolicy instance using the specified updatePolicy.updatePolicy - the new String to useRepositoryPolicy with the specified updatePolicy@Nonnull public RepositoryPolicy withChecksumPolicy(String checksumPolicy)
RepositoryPolicy instance using the specified checksumPolicy.checksumPolicy - the new String to useRepositoryPolicy with the specified checksumPolicy@Nonnull public static RepositoryPolicy newInstance()
RepositoryPolicy instance.
Equivalent to newInstance( true ).RepositoryPolicynewInstance(boolean)@Nonnull public static RepositoryPolicy newInstance(boolean withDefaults)
RepositoryPolicy instance using default values or not.
Equivalent to newBuilder( withDefaults ).build().withDefaults - the boolean indicating whether default values should be usedRepositoryPolicy@Nonnull public static RepositoryPolicy.Builder newBuilder()
RepositoryPolicy builder instance.
Equivalent to newBuilder( true ).BuildernewBuilder(boolean)@Nonnull public static RepositoryPolicy.Builder newBuilder(boolean withDefaults)
RepositoryPolicy builder instance using default values or not.withDefaults - the boolean indicating whether default values should be usedBuilder@Nonnull public static RepositoryPolicy.Builder newBuilder(RepositoryPolicy from)
RepositoryPolicy builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false ).from - the RepositoryPolicy instance to use as a basisBuilder@Nonnull public static RepositoryPolicy.Builder newBuilder(RepositoryPolicy from, boolean forceCopy)
RepositoryPolicy builder instance using the specified object as a basis.from - the RepositoryPolicy instance to use as a basisforceCopy - the boolean indicating if a copy should be forcedBuilderpublic boolean isEnabled()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.