| /** |
| * |
| * 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 org.eclipse.osbp.infogrid.model.gridsource.CxGridSource; |
| |
| /** |
| * Provides IGridSourceDescriptor for a given grid source. Many OSGi-services |
| * for this interface may be registered.<br> |
| * Use the constants following the pattern {PROP_*} in the OSGi service. |
| */ |
| public interface IGridSourceDescriptorProvider { |
| |
| /** |
| * The kind-property is part of the CxGridSource model. Its default value is |
| * ecview. And it may be used to define several kinds of descriptors. |
| */ |
| public static final String PROP_KIND = IGridSourceDescriptor.PROP_KIND; |
| |
| public static final String KIND_ECVIEW = IGridSourceDescriptor.KIND_ECVIEW; |
| public static final String KIND_VAADIN_NATIVE = IGridSourceDescriptor.KIND_VAADIN_NATIVE; |
| |
| /** |
| * If this property is set in the OSGi service, then it is only used for |
| * grid sources with this id. |
| */ |
| public static final String PROP_GRID_SOURCE_ID = "gridSourceId"; |
| |
| /** |
| * Returns a descriptor for the given grid source. The filters will be |
| * properly defined by the inputType.<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 inputType for the given descriptor |
| * @param source |
| * @param callback |
| * @return |
| */ |
| IGridSourceDescriptor createDescriptor(Class<?> inputType, |
| CxGridSource source, IGridSourceDescriptor.ConfigCallback callback); |
| } |