public class Repository extends Object implements Comparable<Repository>
Structured after the model used by Maven and Ivy.
| Constructor and Description |
|---|
Repository(Element element)
Convenience constructor for creating a repository instance from an XML
Element
|
Repository(String id,
String name,
String url)
Constructor for snapshots disabled
|
Repository(String id,
String name,
String url,
boolean enableSnapshots)
Constructor for snapshots optionally enabled
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Repository o) |
boolean |
equals(Object obj) |
Element |
getElement(Document document,
String tagName)
Returns the XML element for this repository
|
String |
getId()
The id of the repository
|
String |
getName()
The name of the repository
|
String |
getUrl()
The url of the repository
|
int |
hashCode() |
boolean |
isEnableSnapshots()
Indicates if snapshots are enabled
|
String |
toString() |
public Repository(Element element)
element - containing the repository definition (required)public Repository(String id, String name, String url)
id - the repository id (required)name - the repository name (optional)url - the repository url (required)public Repository(String id, String name, String url, boolean enableSnapshots)
id - the repository id (required)name - the repository name (optional)url - the repository url (required)enableSnapshots - true if snapshots are allowed, otherwise falsepublic int compareTo(Repository o)
compareTo in interface Comparable<Repository>public Element getElement(Document document, String tagName)
document - the document in which to create the element (required)tagName - the name of the element to create (required)null elementpublic String getId()
public String getName()
public String getUrl()
public boolean isEnableSnapshots()
Copyright © 2009–2017 Pivotal Software, Inc.. All rights reserved.