001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2010-2010 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.olap4j; 011 012import mondrian.rolap.RolapConnection; 013import mondrian.rolap.RolapSchema; 014 015import java.util.List; 016import java.util.Map; 017 018/** 019 * Strategy to locate schemas and catalogs. Allows different 020 * {@link mondrian.olap.MondrianServer servers} to do things differently. 021 * 022 * @author jhyde 023 * @since 2010/11/12 024 */ 025public interface CatalogFinder { 026 /** 027 * Returns a list of catalogs. 028 * 029 * <p>The catalog names occur in the natural order of the repository. 030 * 031 * @param connection Connection to mondrian 032 * we want the catalog children. 033 * @return List of catalogs 034 */ 035 List<String> getCatalogNames( 036 RolapConnection connection); 037 038 /** 039 * Returns a list of (schema name, schema) pairs in a catalog of a 040 * particular name. 041 * 042 * <p>The name of the schema may not be the same as the value returned by 043 * {@link mondrian.rolap.RolapSchema#getName()}. In fact, a given schema 044 * may occur multiple times in the same catalog with different names. 045 * 046 * <p>The schemas occur in the natural order of the repository. 047 * 048 * @param connection Connection to mondrian 049 * @param catalogName Name of catalog 050 * @return List of catalogs 051 */ 052 Map<String, RolapSchema> getRolapSchemas( 053 RolapConnection connection, 054 String catalogName); 055} 056 057// End CatalogFinder.java