edu.uky.rch.ept.projectexplorer.model
Class RepositoryList

java.lang.Object
  extended byedu.uky.rch.ept.projectexplorer.model.RepositoryList

public class RepositoryList
extends Object

Repository List manages the repositories for the user. This class is not meant to be instantiated by the clients. It was be used to query/add/delete repositories.

Author:
sandeep

Field Summary
static String ATT_DESCRIPTION
           
static String ATT_ROOT
           
static String TAG_REPOSITORIES
           
static String TAG_REPOSITORY
           
 
Method Summary
 boolean addRepository(Repository repository)
          Adds the given repository to the user's workbench.
static RepositoryList getInstance()
          Returns an instance of this class.
 Repository[] getRepositories()
          Returns references to the exisiting repositories.
 boolean hasRepositories()
          Checks if currently there are any repositories in the user's workbench.
 boolean removeRepository(Repository repository)
          Remove the given repository from the user's workbench.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_REPOSITORIES

public static String TAG_REPOSITORIES

TAG_REPOSITORY

public static String TAG_REPOSITORY

ATT_ROOT

public static String ATT_ROOT

ATT_DESCRIPTION

public static String ATT_DESCRIPTION
Method Detail

getInstance

public static RepositoryList getInstance()
Returns an instance of this class.

Returns:
reference to the repository list

addRepository

public boolean addRepository(Repository repository)
Adds the given repository to the user's workbench.

Parameters:
repository - the repository to add
Returns:
true if the repository was successfully added, false otherwise

removeRepository

public boolean removeRepository(Repository repository)
Remove the given repository from the user's workbench. This does not clear the contents of the repository.

Parameters:
repository - the repository to remove
Returns:
true if the repository was successfully removed, false otherwise.

hasRepositories

public boolean hasRepositories()
Checks if currently there are any repositories in the user's workbench. Workspace if a special kind of repository which is always present and is not counted here.

Returns:
true if any repositories exist, false otherwise.

getRepositories

public Repository[] getRepositories()
Returns references to the exisiting repositories.

Returns:
an array of repositories