content: /**
   *   Copyright 2012-2019 Wicked Charts (http://github.com/adessoAG/wicked-charts)
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *        http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  package de.adesso.wickedcharts.highcharts.options.interaction;
  
  import de.adesso.wickedcharts.highcharts.options.Function;
  import de.adesso.wickedcharts.highcharts.options.IProcessableOption;
  import de.adesso.wickedcharts.highcharts.options.Options;
  
  /**
   * This javascript function sends an AJAX request to the server. That request
   * contains some information about what point and series the user has selected
   * in the chart. That information is available on the server side as an
   * {@link InteractionEvent} object.
   * 
   * @author Tom Hombergs (tom.hombergs@gmail.com)
   * 
   */
  public abstract class InteractionFunction extends Function implements IProcessableOption {
  
  	/**
  	 * The key under which {@link InteractionFunction}s are registered in the
  	 * parent options. See {@link Options#markForProcessing(IProcessableOption)} .
  	 */
  	public static final String PROCESSING_KEY = "INTERACTION";
  
  	private static final long serialVersionUID = 1L;
  
  	/**
  	 * Constructor.
  	 * 
  	 * @param parentOptions
  	 *          the Options object that contain this function.
  	 */
  	public InteractionFunction(Options parentOptions) {
  		parentOptions.markForProcessing(this);
  		// the function body is left empty since it depends on the web framework
  		// what the javascript should look like. Hence, the IOptionsProcessor of the
  		// rendering framework must call setFunction() to define the javascript.
  	}
  
  	@Override
  	public String getProcessingKey() {
  		return PROCESSING_KEY;
  	}
  
  	/**
  	 * This method is called on the server side when the
  	 * {@link InteractionFunction} is called on the client side.
  	 * 
  	 * @param event
  	 *          the {@link InteractionEvent} containing information about which
  	 *          Point of which Series and which Chart has been interacted with.
  	 */
  	public abstract void onInteraction(InteractionEvent event);
  
  }
  