Package org.apache.maven.api.settings
Class RepositoryBase
java.lang.Object
org.apache.maven.api.settings.TrackableBase
org.apache.maven.api.settings.IdentifiableBase
org.apache.maven.api.settings.RepositoryBase
- All Implemented Interfaces:
Serializable
,InputLocationTracker
- Direct Known Subclasses:
Repository
@Experimental
@Generated
@ThreadSafe
@Immutable
public class RepositoryBase
extends IdentifiableBase
implements Serializable, InputLocationTracker
Repository contains the information needed
for establishing connections with remote repository
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create RepositoryBase instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
RepositoryBase
(RepositoryBase.Builder builder) Constructor for this class, to be called from its subclasses andRepositoryBase.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionThe type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default".getLocation
(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.getName()
Human readable name of the repository.getUrl()
The url of the repository.static RepositoryBase.Builder
Creates a newRepositoryBase
builder instance.static RepositoryBase.Builder
newBuilder
(boolean withDefaults) Creates a newRepositoryBase
builder instance using default values or not.static RepositoryBase.Builder
newBuilder
(RepositoryBase from) Creates a newRepositoryBase
builder instance using the specified object as a basis.static RepositoryBase.Builder
newBuilder
(RepositoryBase from, boolean forceCopy) Creates a newRepositoryBase
builder instance using the specified object as a basis.static RepositoryBase
Creates a newRepositoryBase
instance.static RepositoryBase
newInstance
(boolean withDefaults) Creates a newRepositoryBase
instance using default values or not.with()
Creates a new builder with this object as the basis.Creates a newRepositoryBase
instance using the specified id.withLayout
(String layout) Creates a newRepositoryBase
instance using the specified layout.Creates a newRepositoryBase
instance using the specified name.Creates a newRepositoryBase
instance using the specified url.Methods inherited from class org.apache.maven.api.settings.IdentifiableBase
getId, newBuilder, newBuilder
Methods inherited from class org.apache.maven.api.settings.TrackableBase
getImportedFrom, newBuilder, newBuilder
-
Constructor Details
-
RepositoryBase
Constructor for this class, to be called from its subclasses andRepositoryBase.Builder
.- See Also:
-
-
Method Details
-
getName
Human readable name of the repository.- Returns:
- a
String
-
getUrl
The url of the repository.- Returns:
- a
String
-
getLayout
The type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default".- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Overrides:
getLocation
in classIdentifiableBase
-
getLocationKeys
Gets the keys of the locations of the input source.- Overrides:
getLocationKeys
in classIdentifiableBase
-
with
Creates a new builder with this object as the basis.- Overrides:
with
in classIdentifiableBase
- Returns:
- a
Builder
-
withId
Creates a newRepositoryBase
instance using the specified id.- Overrides:
withId
in classIdentifiableBase
- Parameters:
id
- the newString
to use- Returns:
- a
RepositoryBase
with the specified id
-
withName
Creates a newRepositoryBase
instance using the specified name.- Parameters:
name
- the newString
to use- Returns:
- a
RepositoryBase
with the specified name
-
withUrl
Creates a newRepositoryBase
instance using the specified url.- Parameters:
url
- the newString
to use- Returns:
- a
RepositoryBase
with the specified url
-
withLayout
Creates a newRepositoryBase
instance using the specified layout.- Parameters:
layout
- the newString
to use- Returns:
- a
RepositoryBase
with the specified layout
-
newInstance
Creates a newRepositoryBase
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
RepositoryBase
- See Also:
-
newInstance
Creates a newRepositoryBase
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
RepositoryBase
-
newBuilder
Creates a newRepositoryBase
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newRepositoryBase
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newRepositoryBase
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theRepositoryBase
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newRepositoryBase
builder instance using the specified object as a basis.- Parameters:
from
- theRepositoryBase
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-