/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.jstestdriver.config; import java.io.File; import java.util.List; import com.google.jstestdriver.model.BasePaths; /** * The source of the configuration. * * @author Cory Smith (corbinrsmith@gmail.com) */ public interface ConfigurationSource { /** * @return The parent directory of the configuration, used as the default base * path. */ File getParentFile(); /** * Parses the Configuration from the source. * * @param baseDirs The base paths for all the test resources to resolve against. * @param configParser the parser of the configuration. * @return The parsed configuration object. * @throws ConfigurationException If the configuration file does not exist. */ Configuration parse(BasePaths baseDirs, ConfigurationParser configParser) throws ConfigurationException; /** Returns the name of the current configuration. */ String getName(); }