| /** |
| * |
| * 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.infogrid.api; |
| |
| import java.util.List; |
| |
| import org.eclipse.osbp.infogrid.api.IGridSourceDescriptor.ConfigCallback; |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridSource; |
| |
| /** |
| * This facade gives you access to the underlying implementations. As an |
| * application developer it is a good idea to use this service. |
| * |
| * @NoImplement by clients |
| * @Scope(singleton) |
| */ |
| public interface IGridSourceFacade { |
| |
| /** |
| * Returns the grid source model element with the given id. |
| * |
| * @param id |
| * @return |
| */ |
| CxGridSource getSource(String id); |
| |
| /** |
| * Returns all grid sources matching the given inputType. |
| * |
| * @param rootType |
| * @return |
| */ |
| List<CxGridSource> getSources(Class<?> inputType); |
| |
| /** |
| * Returns a configured IGridSourceDescriptor for the given grid source id.<br> |
| * The inputType is used to configure the filter statements for the |
| * connection between input type and root type.<br> |
| * The callback is invoked after the descriptor was created. Some |
| * descriptors like an ECView descriptor need additional information like |
| * I18nService,... Since I18nService,... is session scoped, a singleton OSGi |
| * can not access that information itself. |
| * |
| * @param sourceId |
| * Id of the grid source |
| * @param callback |
| * is called after the creation |
| * @return |
| */ |
| IGridSourceDescriptor getDescriptor(Class<?> inputType, String sourceId, |
| ConfigCallback callback); |
| |
| /** |
| * Returns a configured IGridSourceDescriptor for the given grid source. <br> |
| * The inputType is used to configure the filter statements for the |
| * connection between input type and root type.<br> |
| * The callback is invoked after the descriptor was created. Some |
| * descriptors like an ECView descriptor need additional information like |
| * I18nService,... Since I18nService,... is session scoped, a singleton OSGi |
| * can not access that information itself. |
| * |
| * @param callback |
| * is called after the creation |
| * @param source |
| * the grid source |
| * |
| * @return |
| */ |
| IGridSourceDescriptor getDescriptor(Class<?> inputType, |
| CxGridSource cxSource, ConfigCallback callback); |
| |
| /** |
| * Returns all IGridSourceDescriptor available for the given inputType.<br> |
| * The inputType is used to configure the filter statements for the |
| * connection between input type and root type.<br> |
| * The callback is invoked after the descriptor was created. Some |
| * descriptors like an ECView descriptor need additional information like |
| * I18nService,... Since I18nService,... is session scoped, a singleton OSGi |
| * can not access that information itself. |
| * |
| * @param inputType |
| * - The input type for which a gridsource should be shown. Based |
| * on GridSource's input definition, the allowed inputs are |
| * defined there. |
| * @param callback |
| * is called after the creation |
| * @return |
| */ |
| List<IGridSourceDescriptor> getDescriptors(Class<?> inputType, |
| ConfigCallback callback); |
| |
| } |