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 org.gcube.portlets.widgets.ckancontentmoderator.shared.ModerationUserRole; import org.gcube.portlets.widgets.ckancontentmoderator.shared.OperationReport; import org.gcube.portlets.widgets.ckancontentmoderator.shared.SearchedData; import com.google.gwt.user.client.rpc.AsyncCallback; /** * The Interface CkanContentModeratorServiceAsync. * * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it * * Jan 11, 2022 */ public interface CkanContentModeratorServiceAsync { /** * Reject item. * * @param itemNames the item names * @param permanentlyDelete the permanently delete * @param reasonMsg the reason msg * @param callback the callback */ void rejectItem(List itemNames, boolean permanentlyDelete, String reasonMsg, AsyncCallback callback); /** * Gets the list items for status. * * @param theStatus the the status * @param offset the offset * @param limit the limit * @param restrictedToLoggedInUser the restricted to logged in user * @param sortForField the sort for field * @param callback the callback * @return the list items for status */ void getListItemsForStatus(ItemStatus theStatus, int offset, int limit, boolean restrictedToLoggedInUser, String sortForField, AsyncCallback> callback); /** * Gets the data for status. * * @param status the status * @param offset the offset * @param limit the limit * @param serverStartIndex the server start index * @param restrictedToLoggedInUser the restricted to logged in user * @param sortForField the sort for field * @param asyncCallback the async callback * @return the data for status */ void getDataForStatus(ItemStatus status, int offset, int limit, int serverStartIndex, boolean restrictedToLoggedInUser, String sortForField, AsyncCallback asyncCallback); /** * Approve item. * * @param itemNames the item names * @param moderatorMessage the moderator message * @param callback the callback */ void approveItem(List itemNames, String moderatorMessage, AsyncCallback callback); /** * Permanently delete. * * @param itemNames the item names * @param callback the callback */ void permanentlyDelete(List itemNames, AsyncCallback callback); /** * Sets the status. * * @param theStatus the the status * @param itemNames the item names * @param callback the callback */ void setStatus(ItemStatus theStatus, List itemNames, AsyncCallback callback); /** * Gets the CMS roles for user in the context. * * @param callback the callback * @return the CMS roles for user in the context */ void getCMSRolesForUserInTheContext(AsyncCallback callback); /** * Checks if is moderation enabled. * * @param reloadConfig the reload config * @param callback the callback */ void isModerationEnabled(boolean reloadConfig, AsyncCallback callback); /** * Checks if is moderator role assigned. * * @param callback the callback */ void isModeratorRoleAssigned(AsyncCallback callback); /** * Exists my item in moderation. * * @param callback the callback * @return true if the user has at least one item moderatorated or in * moderation. */ void existsMyItemInModeration(AsyncCallback callback); /** * Gets the item for name. * * @param itemName the item name * @param callback the callback * @return the item for name */ void getItemForName(String itemName, AsyncCallback callback); }