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.CMSUserRole; 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.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; /** * The Interface CkanContentModeratorService. * * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it * * Jan 11, 2022 */ @RemoteServiceRelativePath("ckanContentModeratorService") public interface CkanContentModeratorService extends RemoteService { /** * Checks if is content moderator enabled. * * @return true, if is content moderator enabled */ public boolean isContentModeratorEnabled(); /** * Sets the status. Currently, this only used to change the status from Rejected * to Pending * * @param theStatus the the status * @param itemNames the item names * @return the operation report * @throws Exception the exception */ public OperationReport setStatus(ItemStatus theStatus, List itemNames) throws Exception; /** * Reject item. * * @param itemNames the item names * @param permanentlyDelete the permanently delete * @param reasonMsg the reason msg * @return the operation report * @throws Exception the exception */ public OperationReport rejectItem(List itemNames, boolean permanentlyDelete, String reasonMsg) throws Exception; /** * Permanently delete. * * @param itemNames the item names * @return the operation report * @throws Exception the exception */ public OperationReport permanentlyDelete(List itemNames) throws Exception; /** * Gets the list items for status. * * @param theStatus the the status * @param limit the limit * @param offset the offset * @return the list items for status * @throws Exception the exception */ public List getListItemsForStatus(ItemStatus theStatus, int limit, int offset) throws Exception; /** * Gets the data for status. * * @param status the status * @param startIndex the start index * @param lenght the lenght * @param serverIndex the server index * @return the data for status * @throws Exception the exception * @par@Override am lenght the lenght */ SearchedData getDataForStatus(ItemStatus status, int startIndex, int lenght, int serverIndex) throws Exception; /** * Approve item. * * @param itemNames the item names * @param moderatorMessage the moderator message * @return the operation report * @throws Exception the exception */ OperationReport approveItem(List itemNames, String moderatorMessage) throws Exception; /** * Gets the CMS roles for user in the context. * * @return the CMS roles for user in the context * @throws Exception the exception */ ModerationUserRole getCMSRolesForUserInTheContext() throws Exception; }