2021-12-14 15:26:09 +01:00
|
|
|
package org.gcube.portlets.user.geoportaldataviewer.client.events;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The Class SearchPerformedEvent.
|
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
|
|
|
*
|
|
|
|
* Dec 14, 2021
|
|
|
|
*/
|
|
|
|
public class SearchPerformedEvent extends GwtEvent<SearchPerformedEventHandler> {
|
|
|
|
public static Type<SearchPerformedEventHandler> TYPE = new Type<SearchPerformedEventHandler>();
|
2022-11-28 09:49:46 +01:00
|
|
|
private List<String> listProjectIDs;
|
2021-12-14 15:26:09 +01:00
|
|
|
private boolean searchReset;
|
2022-11-28 15:20:21 +01:00
|
|
|
private String profileID;
|
2021-12-14 15:26:09 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Instantiates a new search performed event.
|
|
|
|
*
|
2022-11-28 15:20:21 +01:00
|
|
|
* @param profileID the profile ID
|
2022-11-28 09:49:46 +01:00
|
|
|
* @param listProjectIds the list project ids
|
|
|
|
* @param searchReset the search reset
|
2021-12-14 15:26:09 +01:00
|
|
|
*/
|
2022-11-28 15:20:21 +01:00
|
|
|
public SearchPerformedEvent(String profileID, List<String> listProjectIds, boolean searchReset) {
|
|
|
|
this.profileID = profileID;
|
2022-11-28 09:49:46 +01:00
|
|
|
this.listProjectIDs = listProjectIds;
|
2021-12-14 15:26:09 +01:00
|
|
|
this.searchReset = searchReset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the associated type.
|
|
|
|
*
|
|
|
|
* @return the associated type
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public Type<SearchPerformedEventHandler> getAssociatedType() {
|
|
|
|
return TYPE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatch.
|
|
|
|
*
|
|
|
|
* @param handler the handler
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
protected void dispatch(SearchPerformedEventHandler handler) {
|
|
|
|
handler.onSearchDone(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-28 15:20:21 +01:00
|
|
|
/**
|
|
|
|
* Gets the profile ID. It is equal to collectionID
|
|
|
|
*
|
|
|
|
* @return the profile ID
|
|
|
|
*/
|
|
|
|
public String getProfileID() {
|
|
|
|
return profileID;
|
|
|
|
}
|
|
|
|
|
2021-12-14 15:26:09 +01:00
|
|
|
/**
|
2022-11-28 09:49:46 +01:00
|
|
|
* Gets the list project Ids.
|
2021-12-14 15:26:09 +01:00
|
|
|
*
|
2022-11-28 09:49:46 +01:00
|
|
|
* @return the list project Ids
|
2021-12-14 15:26:09 +01:00
|
|
|
*/
|
2022-11-28 09:49:46 +01:00
|
|
|
public List<String> getListProjectIDs() {
|
|
|
|
return listProjectIDs;
|
2021-12-14 15:26:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if is search reset.
|
|
|
|
*
|
|
|
|
* @return true, if is search reset
|
|
|
|
*/
|
|
|
|
public boolean isSearchReset() {
|
|
|
|
return searchReset;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|