package org.gcube.portlets.user.workspace.client.event;

import com.google.gwt.event.shared.GwtEvent;

/**
 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
 *
 */
public class SearchTextEvent extends GwtEvent<SearchTextEventHandler> {
  public static Type<SearchTextEventHandler> TYPE = new Type<SearchTextEventHandler>();

  private String textSearch = null;
  
	public SearchTextEvent(String text) {
	this.textSearch = text;
	}

	@Override
	public Type<SearchTextEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}
	
	@Override
	protected void dispatch(SearchTextEventHandler handler) {
		handler.onSearchText(this);
		
	}

	public String getTextSearch() {
		return textSearch;
	}
	
}