ckan-content-moderator-widget/src/main/java/org/gcube/portlets/widgets/ckancontentmoderator/client/events/SelectItemsWithItemStatusEv...

69 lines
1.5 KiB
Java
Raw Normal View History

2021-06-25 16:56:43 +02:00
package org.gcube.portlets.widgets.ckancontentmoderator.client.events;
import org.gcube.datacatalogue.utillibrary.shared.ItemStatus;
import com.google.gwt.event.shared.GwtEvent;
/**
2021-06-28 15:40:53 +02:00
* The Class SelectItemsWithItemStatusEvent.
2021-06-25 16:56:43 +02:00
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
2021-06-28 15:40:53 +02:00
* Jun 28, 2021
2021-06-25 16:56:43 +02:00
*/
2021-06-28 15:40:53 +02:00
public class SelectItemsWithItemStatusEvent extends GwtEvent<SelectItemsWithItemStatusEventHandler> {
public static Type<SelectItemsWithItemStatusEventHandler> TYPE = new Type<SelectItemsWithItemStatusEventHandler>();
2021-06-25 16:56:43 +02:00
private ItemStatus itemStatus;
2021-06-29 17:56:15 +02:00
private String displayMessage;
2021-06-25 16:56:43 +02:00
/**
* Instantiates a new click item event.
*
* @param itemStatus the item status
2021-06-29 17:56:15 +02:00
* @param displayMessage the display message
2021-06-25 16:56:43 +02:00
*/
2021-06-29 17:56:15 +02:00
public SelectItemsWithItemStatusEvent(ItemStatus itemStatus, String displayMessage) {
2021-06-25 16:56:43 +02:00
this.itemStatus = itemStatus;
2021-06-29 17:56:15 +02:00
this.displayMessage = displayMessage;
2021-06-25 16:56:43 +02:00
}
/**
* Gets the associated type.
*
* @return the associated type
*/
@Override
2021-06-28 15:40:53 +02:00
public Type<SelectItemsWithItemStatusEventHandler> getAssociatedType() {
2021-06-25 16:56:43 +02:00
return TYPE;
}
/**
* Dispatch.
*
* @param handler the handler
*/
@Override
2021-06-28 15:40:53 +02:00
protected void dispatch(SelectItemsWithItemStatusEventHandler handler) {
2021-06-25 16:56:43 +02:00
handler.onValueChanged(this);
}
/**
* Gets the item status.
*
* @return the item status
*/
public ItemStatus getItemStatus() {
return itemStatus;
}
2021-06-29 17:56:15 +02:00
/**
* Gets the display message.
*
* @return the display message
*/
public String getDisplayMessage() {
return displayMessage;
}
2021-06-25 16:56:43 +02:00
}