92 lines
2.5 KiB
Java
92 lines
2.5 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 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 {
|
|
|
|
/**
|
|
* Checks if is content moderator enabled.
|
|
*
|
|
* @param callback the callback
|
|
*/
|
|
void isContentModeratorEnabled(AsyncCallback<Boolean> callback);
|
|
|
|
/**
|
|
* Reject item.
|
|
*
|
|
* @param itemNames the item names
|
|
* @param permanentlyDelete the permanently delete
|
|
* @param reasonMsg the reason msg
|
|
* @param callback the callback
|
|
*/
|
|
void rejectItem(List<String> itemNames, boolean permanentlyDelete, String reasonMsg,
|
|
AsyncCallback<OperationReport> 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);
|
|
|
|
/**
|
|
* Gets the data for status.
|
|
*
|
|
* @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
|
|
* @param moderatorMessage the moderator message
|
|
* @param callback the callback
|
|
*/
|
|
void approveItem(List<String> itemNames, String moderatorMessage, AsyncCallback<OperationReport> callback);
|
|
|
|
/**
|
|
* Permanently delete.
|
|
*
|
|
* @param itemNames the item names
|
|
* @param callback the callback
|
|
*/
|
|
void permanentlyDelete(List<String> itemNames, AsyncCallback<OperationReport> callback);
|
|
|
|
/**
|
|
* Sets the status.
|
|
*
|
|
* @param theStatus the the status
|
|
* @param itemNames the item names
|
|
* @param callback the callback
|
|
*/
|
|
void setStatus(ItemStatus theStatus, List<String> itemNames, AsyncCallback<Void> callback);
|
|
|
|
}
|