@Experimental @Generated @ThreadSafe @Immutable public class RepositoryBase extends Object implements Serializable, InputLocationTracker
Modifier and Type | Class and Description |
---|---|
static class |
RepositoryBase.Builder
Builder class used to create RepositoryBase instances.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getId()
A unique identifier for a repository.
|
String |
getLayout()
The type of layout this repository uses for locating and storing artifacts -
can be
legacy or default . |
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
String |
getName()
Human readable name of the repository.
|
String |
getUrl()
The url of the repository, in the form
protocol://hostname/path . |
int |
hashCode() |
static RepositoryBase.Builder |
newBuilder()
Creates a new
RepositoryBase builder instance. |
static RepositoryBase.Builder |
newBuilder(boolean withDefaults)
Creates a new
RepositoryBase builder instance using default values or not. |
static RepositoryBase.Builder |
newBuilder(RepositoryBase from)
Creates a new
RepositoryBase builder instance using the specified object as a basis. |
static RepositoryBase.Builder |
newBuilder(RepositoryBase from,
boolean forceCopy)
Creates a new
RepositoryBase builder instance using the specified object as a basis. |
static RepositoryBase |
newInstance()
Creates a new
RepositoryBase instance. |
static RepositoryBase |
newInstance(boolean withDefaults)
Creates a new
RepositoryBase instance using default values or not. |
RepositoryBase.Builder |
with()
Creates a new builder with this object as the basis.
|
RepositoryBase |
withId(String id)
Creates a new
RepositoryBase instance using the specified id. |
RepositoryBase |
withLayout(String layout)
Creates a new
RepositoryBase instance using the specified layout. |
RepositoryBase |
withName(String name)
Creates a new
RepositoryBase instance using the specified name. |
RepositoryBase |
withUrl(String url)
Creates a new
RepositoryBase instance using the specified url. |
public String getId()
settings.xml
file, for example. Furthermore, the identifier is
used during POM inheritance and profile injection to detect repositories that should be merged.String
public String getName()
String
public String getUrl()
protocol://hostname/path
.String
public String getLayout()
legacy
or default
.String
public InputLocation getLocation(Object key)
getLocation
in interface InputLocationTracker
@Nonnull public RepositoryBase.Builder with()
Builder
@Nonnull public RepositoryBase withId(String id)
RepositoryBase
instance using the specified id.id
- the new String
to useRepositoryBase
with the specified id@Nonnull public RepositoryBase withName(String name)
RepositoryBase
instance using the specified name.name
- the new String
to useRepositoryBase
with the specified name@Nonnull public RepositoryBase withUrl(String url)
RepositoryBase
instance using the specified url.url
- the new String
to useRepositoryBase
with the specified url@Nonnull public RepositoryBase withLayout(String layout)
RepositoryBase
instance using the specified layout.layout
- the new String
to useRepositoryBase
with the specified layout@Nonnull public static RepositoryBase newInstance()
RepositoryBase
instance.
Equivalent to newInstance( true )
.RepositoryBase
newInstance(boolean)
@Nonnull public static RepositoryBase newInstance(boolean withDefaults)
RepositoryBase
instance using default values or not.
Equivalent to newBuilder( withDefaults ).build()
.withDefaults
- the boolean indicating whether default values should be usedRepositoryBase
@Nonnull public static RepositoryBase.Builder newBuilder()
RepositoryBase
builder instance.
Equivalent to newBuilder( true )
.Builder
newBuilder(boolean)
@Nonnull public static RepositoryBase.Builder newBuilder(boolean withDefaults)
RepositoryBase
builder instance using default values or not.withDefaults
- the boolean indicating whether default values should be usedBuilder
@Nonnull public static RepositoryBase.Builder newBuilder(RepositoryBase from)
RepositoryBase
builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false )
.from
- the RepositoryBase
instance to use as a basisBuilder
@Nonnull public static RepositoryBase.Builder newBuilder(RepositoryBase from, boolean forceCopy)
RepositoryBase
builder instance using the specified object as a basis.from
- the RepositoryBase
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.