Package org.apache.maven.model
Class RepositoryBase
- java.lang.Object
-
- org.apache.maven.model.RepositoryBase
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,InputLocationTracker
- Direct Known Subclasses:
Repository
public class RepositoryBase extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, InputLocationTracker
A repository contains the information needed for establishing connections with remote repository.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
id
A unique identifier for a repository.private InputLocation
idLocation
Field idLocation.private java.lang.String
layout
The type of layout this repository uses for locating and storing artifacts - can belegacy
ordefault
.private InputLocation
layoutLocation
Field layoutLocation.private InputLocation
location
Field location.private java.util.Map<java.lang.Object,InputLocation>
locations
Field locations.private java.lang.String
name
Human readable name of the repository.private InputLocation
nameLocation
Field nameLocation.private java.lang.String
url
The url of the repository, in the formprotocol://hostname/path
.private InputLocation
urlLocation
Field urlLocation.
-
Constructor Summary
Constructors Constructor Description RepositoryBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryBase
clone()
Method clone.boolean
equals(java.lang.Object other)
Method equals.java.lang.String
getId()
Get a unique identifier for a repository.java.lang.String
getLayout()
Get the type of layout this repository uses for locating and storing artifacts - can belegacy
ordefault
.InputLocation
getLocation(java.lang.Object key)
Gets the location of the specified field in the input source.java.lang.String
getName()
Get human readable name of the repository.private InputLocation
getOtherLocation(java.lang.Object key)
java.lang.String
getUrl()
Get the url of the repository, in the formprotocol://hostname/path
.int
hashCode()
Method hashCode.void
setId(java.lang.String id)
Set a unique identifier for a repository.void
setLayout(java.lang.String layout)
Set the type of layout this repository uses for locating and storing artifacts - can belegacy
ordefault
.void
setLocation(java.lang.Object key, InputLocation location)
Sets the location of the specified field.void
setName(java.lang.String name)
Set human readable name of the repository.void
setOtherLocation(java.lang.Object key, InputLocation location)
void
setUrl(java.lang.String url)
Set the url of the repository, in the formprotocol://hostname/path
.java.lang.String
toString()
Method toString.
-
-
-
Field Detail
-
id
private java.lang.String id
A unique identifier for a repository. This is used to match the repository to configuration in thesettings.xml
file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged.
-
name
private java.lang.String name
Human readable name of the repository.
-
url
private java.lang.String url
The url of the repository, in the formprotocol://hostname/path
.
-
layout
private java.lang.String layout
The type of layout this repository uses for locating and storing artifacts - can belegacy
ordefault
.
-
locations
private java.util.Map<java.lang.Object,InputLocation> locations
Field locations.
-
location
private InputLocation location
Field location.
-
idLocation
private InputLocation idLocation
Field idLocation.
-
nameLocation
private InputLocation nameLocation
Field nameLocation.
-
urlLocation
private InputLocation urlLocation
Field urlLocation.
-
layoutLocation
private InputLocation layoutLocation
Field layoutLocation.
-
-
Method Detail
-
clone
public RepositoryBase clone()
Method clone.- Overrides:
clone
in classjava.lang.Object
- Returns:
- RepositoryBase
-
equals
public boolean equals(java.lang.Object other)
Method equals.- Overrides:
equals
in classjava.lang.Object
- Parameters:
other
-- Returns:
- boolean
-
getId
public java.lang.String getId()
Get a unique identifier for a repository. This is used to match the repository to configuration in thesettings.xml
file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged.- Returns:
- String
-
getLayout
public java.lang.String getLayout()
Get the type of layout this repository uses for locating and storing artifacts - can belegacy
ordefault
.- Returns:
- String
-
getLocation
public InputLocation getLocation(java.lang.Object key)
Description copied from interface:InputLocationTracker
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Parameters:
key
-- Returns:
- InputLocation
-
getName
public java.lang.String getName()
Get human readable name of the repository.- Returns:
- String
-
setLocation
public void setLocation(java.lang.Object key, InputLocation location)
Description copied from interface:InputLocationTracker
Sets the location of the specified field.- Specified by:
setLocation
in interfaceInputLocationTracker
- Parameters:
key
-location
-
-
setOtherLocation
public void setOtherLocation(java.lang.Object key, InputLocation location)
- Parameters:
key
-location
-
-
getOtherLocation
private InputLocation getOtherLocation(java.lang.Object key)
- Parameters:
key
-- Returns:
- InputLocation
-
getUrl
public java.lang.String getUrl()
Get the url of the repository, in the formprotocol://hostname/path
.- Returns:
- String
-
hashCode
public int hashCode()
Method hashCode.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- int
-
setId
public void setId(java.lang.String id)
Set a unique identifier for a repository. This is used to match the repository to configuration in thesettings.xml
file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged.- Parameters:
id
-
-
setLayout
public void setLayout(java.lang.String layout)
Set the type of layout this repository uses for locating and storing artifacts - can belegacy
ordefault
.- Parameters:
layout
-
-
setName
public void setName(java.lang.String name)
Set human readable name of the repository.- Parameters:
name
-
-
setUrl
public void setUrl(java.lang.String url)
Set the url of the repository, in the formprotocol://hostname/path
.- Parameters:
url
-
-
toString
public java.lang.String toString()
Method toString.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String
-
-