org.springframework.roo.project
Class Repository

java.lang.Object
  extended by org.springframework.roo.project.Repository
All Implemented Interfaces:
Comparable<Repository>

public class Repository
extends Object
implements Comparable<Repository>

Simplified immutable representation of a repository.

Structured after the model used by Maven and Ivy.

Since:
1.1
Author:
Stefan Schmidt

Constructor Summary
Repository(Element element)
          Convenience constructor for creating a repository instance from a XML Element
Repository(String id, String name, String url)
          Convenience constructor creating a repository instance
Repository(String id, String name, String url, boolean enableSnapshots)
          Convenience constructor for creating a repository instance
 
Method Summary
 int compareTo(Repository o)
           
 boolean equals(Object obj)
           
 String getId()
          The id of a repository
 String getName()
          The name of a repository
 String getUrl()
          The url of a repository
 int hashCode()
           
 boolean isEnableSnapshots()
          Indicates if snapshots are enabled
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Repository

public Repository(String id,
                  String name,
                  String url)
Convenience constructor creating a repository instance

Parameters:
id - the repository id (required)
name - the repository name (optional)
url - the repository url (required)

Repository

public Repository(String id,
                  String name,
                  String url,
                  boolean enableSnapshots)
Convenience constructor for creating a repository instance

Parameters:
id - the repository id (required)
name - the repository name (required)
url - the repository url (required)
snapshots - allowed? (required)

Repository

public Repository(Element element)
Convenience constructor for creating a repository instance from a XML Element

Parameters:
element - containing the repository definition (required)
Method Detail

getId

public String getId()
The id of a repository

Returns:
the id (never null)

getName

public String getName()
The name of a repository

Returns:
the name of the repository (null if not exists)

getUrl

public String getUrl()
The url of a repository

Returns:
the url (never null)

isEnableSnapshots

public boolean isEnableSnapshots()
Indicates if snapshots are enabled

Returns:
enableSnapshots

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(Repository o)
Specified by:
compareTo in interface Comparable<Repository>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.