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

90 lines
2.3 KiB
Java
Raw Normal View History

2021-05-07 16:55:35 +02:00
package org.gcube.portlets.widgets.ckancontentmoderator.client;
2021-06-01 18:36:18 +02:00
import java.util.List;
2021-06-14 17:39:44 +02:00
import org.gcube.datacatalogue.utillibrary.shared.ItemStatus;
2021-06-14 11:27:53 +02:00
import org.gcube.portlets.widgets.ckancontentmoderator.shared.CatalogueDataset;
import org.gcube.portlets.widgets.ckancontentmoderator.shared.SearchedData;
2021-05-07 16:55:35 +02:00
import com.google.gwt.user.client.rpc.AsyncCallback;
2021-06-24 15:02:49 +02:00
2021-06-14 17:39:44 +02:00
/**
* The Interface CkanContentModeratorServiceAsync.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
2021-06-24 15:02:49 +02:00
* Jun 23, 2021
2021-06-14 17:39:44 +02:00
*/
2021-05-07 16:55:35 +02:00
public interface CkanContentModeratorServiceAsync {
2021-06-14 17:39:44 +02:00
/**
* Checks if is content moderator enabled.
*
* @param callback the callback
*/
2021-05-07 16:55:35 +02:00
void isContentModeratorEnabled(AsyncCallback<Boolean> callback);
2021-06-24 15:02:49 +02:00
2021-06-14 17:39:44 +02:00
/**
2021-06-24 15:02:49 +02:00
* Reject item.
2021-06-14 17:39:44 +02:00
*
2021-06-24 15:02:49 +02:00
* @param itemName the item name
* @param permanentlyDelete the permanently delete
* @param reasonMsg the reason msg
2021-06-14 17:39:44 +02:00
* @param callback the callback
*/
2021-06-24 15:02:49 +02:00
void rejectItem(String itemName, boolean permanentlyDelete, String reasonMsg, AsyncCallback<Void> callback);
2021-05-07 16:55:35 +02:00
2021-06-14 17:39:44 +02:00
/**
2021-06-24 15:02:49 +02:00
* Gets the list items for status.
2021-06-14 17:39:44 +02:00
*
2021-06-24 15:02:49 +02:00
* @param theStatus the the status
* @param limit the limit
* @param offset the offset
* @param callback the callback
* @return the list items for status
2021-06-14 17:39:44 +02:00
*/
2021-06-24 15:02:49 +02:00
void getListItemsForStatus(ItemStatus theStatus, int limit, int offset,
AsyncCallback<List<CatalogueDataset>> callback);
2021-05-07 16:55:35 +02:00
2021-06-14 17:39:44 +02:00
/**
2021-06-24 15:02:49 +02:00
* Gets the data for status.
2021-06-14 17:39:44 +02:00
*
2021-06-24 15:02:49 +02:00
* @param status the status
* @param startIndex the start index
* @param lenght the lenght
* @param serverIndex the server index
* @param asyncCallback the async callback
* @return the data for status
*/
void getDataForStatus(ItemStatus status, int startIndex, int lenght, int serverIndex,
AsyncCallback<SearchedData> asyncCallback);
/**
* Approve item.
*
* @param itemNames the item names
2021-06-14 17:39:44 +02:00
* @param callback the callback
*/
2021-06-24 15:02:49 +02:00
void approveItem(List<String> itemNames, AsyncCallback<Void> callback);
2021-05-07 16:55:35 +02:00
2021-06-14 17:39:44 +02:00
/**
2021-06-24 15:02:49 +02:00
* Permanently delete.
2021-06-14 17:39:44 +02:00
*
2021-06-24 15:02:49 +02:00
* @param itemNames the item names
2021-06-14 17:39:44 +02:00
* @param callback the callback
*/
2021-06-24 15:02:49 +02:00
void permanentlyDelete(List<String> itemNames, AsyncCallback<Void> callback);
2021-05-07 16:55:35 +02:00
2021-06-14 17:39:44 +02:00
/**
2021-06-24 15:02:49 +02:00
* Sets the status.
2021-06-14 17:39:44 +02:00
*
* @param theStatus the the status
2021-06-24 15:02:49 +02:00
* @param itemNames the item names
2021-06-14 17:39:44 +02:00
* @param callback the callback
*/
2021-06-24 15:02:49 +02:00
void setStatus(ItemStatus theStatus, List<String> itemNames, AsyncCallback<Void> callback);
2021-05-07 16:55:35 +02:00
}