1 /*******************************************************************************
2 * Copyright (c) 2012-2013 University of Stuttgart.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * and the Apache License 2.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * Oliver Kopp - initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.winery.repository.client;
14 import org.eclipse.winery.common.interfaces.IWineryRepository;
16 public interface IWineryRepositoryClient extends IWineryRepository {
19 * Adds an URI to the list of known repositories
21 * SIDE EFFECT: If currently no primary repository is defined, the given
22 * repository is used as primary repository
24 * @param uri the URI of the repository
26 void addRepository(String uri);
29 * Get the currently defined primary repository
31 String getPrimaryRepository();
34 * Sets the primary repository
36 * SIDE EFFECT: If the repository is not known as general repository (via
37 * addRepository), the given repository is added to the list of known
42 void setPrimaryRepository(String uri);
45 * Checks whether the primary repository is available to be used. Typically,
46 * this method should return "true". In case of network or server failures,
47 * the result is "false". Note that the availability may change over time
48 * and also a repository might become unavailable during querying it.
50 * This method also returns "false" if no primary repository is set. For
51 * instance, this is the case of no repository is registered at the client.
53 * @return true if the repository is reachable over network, false otherwise
55 boolean primaryRepositoryAvailable();