1 /* 2 * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.properties.resource.repository; 17 18 import de.smartics.properties.resource.domain.ArtifactId; 19 import de.smartics.properties.resource.domain.ClassPathEnvironment; 20 21 /** 22 * Interface to a repository that provides properties resources. These resources 23 * include property descriptors and property definitions. 24 * <p> 25 * A repository may be some local file directory or it may provide access to a 26 * remote artifact repository. 27 * </p> 28 * <p> 29 * Implementors of this interface may consider to also support 30 * {@link de.smartics.properties.resource.heap.ResourceHeap}. 31 * </p> 32 */ 33 public interface ResourceRepository 34 { 35 // ********************************* Fields ********************************* 36 37 // --- constants ------------------------------------------------------------ 38 39 // ****************************** Initializer ******************************* 40 41 // ****************************** Inner Classes ***************************** 42 43 // ********************************* Methods ******************************** 44 45 // --- get&set -------------------------------------------------------------- 46 47 // --- business ------------------------------------------------------------- 48 49 /** 50 * Resolves the properties resources from the given artifact. 51 * 52 * @param artifactId the identifier of the artifact containing properties 53 * resources. 54 * @return the properties resources. 55 * @throws RepositoryException on any problem accessing the repository. 56 */ 57 ClassPathEnvironment resolve(ArtifactId artifactId) 58 throws RepositoryException; 59 60 /** 61 * Returns the URL to the remote repository. 62 * 63 * @return the URL to the remote repository. 64 */ 65 String getRemoteRepositoryUrl(); 66 67 // --- object basics -------------------------------------------------------- 68 69 }