@Experimental @Generated @ThreadSafe @Immutable public class RepositoryPolicy extends Object implements Serializable
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 |
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()
Whether to use this repository for downloading this type of
artifact.
|
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(boolean enabled)
Creates a new
RepositoryPolicy instance using the specified enabled. |
RepositoryPolicy |
withUpdatePolicy(String updatePolicy)
Creates a new
RepositoryPolicy instance using the specified updatePolicy. |
public boolean isEnabled()
boolean
public String getUpdatePolicy()
String
public String getChecksumPolicy()
String
@Nonnull public RepositoryPolicy.Builder with()
Builder
@Nonnull public RepositoryPolicy withEnabled(boolean enabled)
RepositoryPolicy
instance using the specified enabled.enabled
- the new boolean
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 )
.RepositoryPolicy
newInstance(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 )
.Builder
newBuilder(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 forcedBuilder
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.