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

74 lines
1.8 KiB
Java

package org.gcube.portlets.widgets.ckancontentmoderator.client;
import java.util.List;
import org.gcube.datacatalogue.utillibrary.shared.ItemStatus;
import org.gcube.portlets.widgets.ckancontentmoderator.shared.CatalogueDataset;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* The Interface CkanContentModeratorServiceAsync.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jun 14, 2021
*/
public interface CkanContentModeratorServiceAsync {
/**
* Checks if is content moderator enabled.
*
* @param callback the callback
*/
void isContentModeratorEnabled(AsyncCallback<Boolean> callback);
/**
* Approve item.
*
* @param itemId the item id
* @param callback the callback
*/
void approveItem(String itemId, AsyncCallback<Void> callback);
/**
* Permanently delete.
*
* @param itemId the item id
* @param callback the callback
*/
void permanentlyDelete(String itemId, AsyncCallback<Void> callback);
/**
* Reject item.
*
* @param itemId the item id
* @param permanentlyDelete the permanently delete
* @param reasonMsg the reason msg
* @param callback the callback
*/
void rejectItem(String itemId, boolean permanentlyDelete, String reasonMsg, AsyncCallback<Void> callback);
/**
* Sets the status.
*
* @param itemId the item id
* @param theStatus the the status
* @param callback the callback
*/
void setStatus(String itemId, ItemStatus theStatus, AsyncCallback<Void> callback);
/**
* Gets the list items for status.
*
* @param theStatus the the status
* @param limit the limit
* @param offset the offset
* @param callback the callback
* @return the list items for status
*/
void getListItemsForStatus(ItemStatus theStatus, int limit, int offset,
AsyncCallback<List<CatalogueDataset>> callback);
}