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 import de.smartics.util.annotations.marker.ServiceInterface; 21 22 /** 23 * Interface to a repository that provides properties resources. These resources 24 * include property descriptors and property definitions. 25 * <p> 26 * A repository may be some local file directory or it may provide access to a 27 * remote artifact repository. 28 * </p> 29 * <p> 30 * Implementors of this interface may consider to also support 31 * {@link de.smartics.properties.resource.heap.ResourceHeap}. 32 * </p> 33 */ 34 @ServiceInterface 35 public interface ResourceRepository 36 { 37 // ********************************* Fields ********************************* 38 39 // --- constants ------------------------------------------------------------ 40 41 // ****************************** Initializer ******************************* 42 43 // ****************************** Inner Classes ***************************** 44 45 // ********************************* Methods ******************************** 46 47 // --- get&set -------------------------------------------------------------- 48 49 // --- business ------------------------------------------------------------- 50 51 /** 52 * Resolves the properties resources from the given artifact. 53 * 54 * @param artifactId the identifier of the artifact containing properties 55 * resources. 56 * @return the properties resources. 57 * @throws RepositoryException on any problem accessing the repository. 58 */ 59 ClassPathEnvironment resolve(ArtifactId artifactId) 60 throws RepositoryException; 61 62 /** 63 * Returns the URL to the remote repository. 64 * 65 * @return the URL to the remote repository. 66 */ 67 String getRemoteRepositoryUrl(); 68 69 // --- object basics -------------------------------------------------------- 70 71 }