blob: 79d2ab82927ca5bb9e4774156d93421b9fdfeeec [file] [log] [blame]
/*
*
* Copyright (c) 2011 - 2017 - 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
*
* Initial contribution:
* Loetz GmbH & Co. KG
*
*/
package org.eclipse.osbp.ui.api.datamart;
import org.eclipse.osbp.runtime.common.event.EventDispatcherEvent;
import org.eclipse.osbp.ui.api.layout.IViewLayoutManager;
/**
* The Interface IDatamartFilterGenerator.
*/
public interface IDatamartFilterGenerator {
/**
* Creates the UI filters.
*
* @param layoutManager the layout manager
* @return true, if successful
*/
boolean createUIFilters(IViewLayoutManager layoutManager);
/**
* Select item.
*
* @param filterID the filter ID
* @param selection the selection
*/
void selectItem(String filterID, String selection);
/**
* Check if event topic contains datamart´s primary id.
*
* @param event the event
* @return true, if event topic contains the primary id of the datamart
*
*/
boolean isPrimaryFilterId(EventDispatcherEvent event);
/**
* Select item.
*
* @param event the event
* @param byId, if true also id events are processed
* @return true, if selection must trigger a dataRefresh
*/
boolean selectItem(EventDispatcherEvent event, boolean byId);
/**
* Reset item.
*
* @param filterID the filter ID
*/
void resetItem(String filterID);
/**
* Update filter.
*/
void updateFilter();
/**
* Adds the filter change listener.
*
* @param listener the listener
*/
void addFilterChangeListener(FilterChangeListener listener);
/**
* Removes the change listener.
*
* @param listener the listener
*/
void removeFilterChangeListener(FilterChangeListener listener);
/**
* The listener interface for receiving filterChange events.
* The class that is interested in processing a filterChange
* event implements this interface, and the object created
* with that class is registered with a component using the
* component's <code>addFilterChangeListener<code> method. When
* the filterChange event occurs, that object's appropriate
* method is invoked.
*
* @see FilterChangeEvent
*/
public interface FilterChangeListener {
/**
* Filter changed. Notify all listeners.
*
* @param changedFilter the changed filter
*/
void filterChanged(DatamartFilter changedFilter);
}
}