| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.infogrid.api; |
| |
| import java.net.URL; |
| import java.util.List; |
| |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridSource; |
| |
| /** |
| * CxGridSource models can be located in any bundle. This cache aims to |
| * centralize all the different models and gives you access to these instances. |
| * <p> |
| * <b>Note:</b><br> |
| * The {@link CxGridSource#getRootTypeFQN()} property needs to be filled |
| * properly. Also the CxGridProperty#getDotPath value. Otherwise the |
| * rootTypeName and dotPath may not be resolvable, since a Xtext-Setup would be |
| * required. And due to minimal dependencies, we avoid these dependencies. |
| * |
| * @NoImplement by clients |
| * @Scope(singleton) |
| */ |
| public interface IGridSourceCache { |
| |
| /** |
| * Returns all grid source model elements. |
| * |
| * @return |
| */ |
| List<CxGridSource> getAllSources(); |
| |
| /** |
| * Returns the grid source model element with the given id. |
| * |
| * @param id |
| * @return |
| */ |
| CxGridSource getSource(String id); |
| |
| /** |
| * Returns all grid sources matching the given input type. |
| * |
| * @param inputType |
| * @return |
| */ |
| List<CxGridSource> getSources(Class<?> inputType); |
| |
| /** |
| * Registers new sources.<br> |
| * The {@link CxGridSource#getRootTypeFQN()} property needs to be filled |
| * properly. Also the CxGridProperty#getDotPath value. Otherwise the |
| * rootTypeName and dotPath may not be resolvable, since a Xtext-Setup would |
| * be required. And due to minimal dependencies, we avoid these |
| * dependencies. |
| * |
| * @param urls |
| */ |
| void registerSources(List<URL> urls); |
| |
| /** |
| * Unregisters sources. |
| * |
| * @param urls |
| */ |
| void unregisterSources(List<URL> urls); |
| |
| /** |
| * Registers a new source.<br> |
| * The {@link CxGridSource#getRootTypeFQN()} property needs to be filled |
| * properly. Also the CxGridProperty#getDotPath value. Otherwise the |
| * rootTypeName and dotPath may not be resolvable, since a Xtext-Setup would |
| * be required. And due to minimal dependencies, we avoid these |
| * dependencies. |
| * |
| * @param source |
| */ |
| void registerSource(CxGridSource source); |
| |
| /** |
| * Unregisters the source. |
| * |
| * @param source |
| */ |
| void unregisterSource(CxGridSource source); |
| |
| } |