workspace-tree-widget/src/main/java/org/gcube/portlets/user/workspace/client/rpc/GWTWorkspaceServiceAsync.java

180 lines
7.0 KiB
Java

package org.gcube.portlets.user.workspace.client.rpc;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.gcube.portlets.user.workspace.client.model.BulkCreatorModel;
import org.gcube.portlets.user.workspace.client.model.FileDetailsModel;
import org.gcube.portlets.user.workspace.client.model.FileGridModel;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import org.gcube.portlets.user.workspace.client.model.FolderModel;
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
import org.gcube.portlets.user.workspace.client.model.MessageModel;
import org.gcube.portlets.user.workspace.client.model.ScopeModel;
import org.gcube.portlets.user.workspace.client.model.SmartFolderModel;
import org.gcube.portlets.user.workspace.client.model.SubTree;
import org.gcube.portlets.user.workspace.client.workspace.GWTWorkspaceItem;
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
import org.gcube.portlets.user.workspace.shared.accounting.GxtAccountingField;
import com.google.gwt.user.client.rpc.AsyncCallback;
public interface GWTWorkspaceServiceAsync {
void getRootForTree(AsyncCallback<FolderModel> callback);
void getRootForTree(String scopeId, AsyncCallback<FolderModel> callback);
void getFolderChildren(FolderModel folder, AsyncCallback<List<FileModel>> callback);
void getFolderChildrenForFileGrid(FileModel folder, AsyncCallback<List<FileGridModel>> callback);
void moveItem(String itemId, String destinationId, AsyncCallback<Boolean> callback);
void removeItem(String itemId, AsyncCallback<Boolean> callback);
void renameItem(String itemId, String newName, String oldName, AsyncCallback<Boolean> callback);
void createFolder(String nameFolder, String description, FileModel parent, AsyncCallback<FolderModel> callback);
void getDetailsFile(FileModel item, AsyncCallback<FileDetailsModel> callback);
void getChildrenSubTreeToRootByIdentifier(String itemIdentifier, AsyncCallback<ArrayList<SubTree>> callback);
void getItemsBySearchName(String text, AsyncCallback<List<FileGridModel>> callback);
void getSmartFolderResultsByCategory(String category, AsyncCallback<List<FileGridModel>> callback);
void createSmartFolder(String name, String description, String query, AsyncCallback<SmartFolderModel> callback);
void getSmartFolderResultsById(String folderId, AsyncCallback<List<FileGridModel>> callback);
void getAllSmartFolders(AsyncCallback<List<SmartFolderModel>> callback);
void getImageById(String identifier, boolean isInteralImage, boolean fullDetails, AsyncCallback<GWTWorkspaceItem> callback);
void getUrlById(String identifier, boolean isInternalUrl, boolean fullDetails, AsyncCallback<GWTWorkspaceItem> callback);
void createExternalUrl(FileModel parentFileModel, String name, String description, String url, AsyncCallback<FileModel> callback);
void setValueInSession(String name, String value, AsyncCallback<Void> callback);
void removeSmartFolder(String itemId, String name, AsyncCallback<Boolean> callback);
void getAllScope(AsyncCallback<List<ScopeModel>> callback);
void getAllContacts(AsyncCallback<List<InfoContactModel>> callback);
// void sendTo(List<InfoContactModel> listContacts, List<FileModel> listAttachments, String subject, String text, AsyncCallback<Boolean> callback);
void sendToById(List<String> listContactsId, List<String> listAttachmentsId, String subject, String text, AsyncCallback<Boolean> callback);
void getAllMessagesReceived(AsyncCallback<List<MessageModel>> callback);
void getAllMessagesSent(AsyncCallback<List<MessageModel>> callback);
void getMessageById(String messageIdentifier, String messageType, AsyncCallback<MessageModel> asyncCallback);
void sentToByMessageModel(MessageModel message, AsyncCallback<Boolean> callback);
void saveAttachments(String messageIdentifier, String messageType,
AsyncCallback<Boolean> callback);
void saveAttach(String attachId, AsyncCallback<Boolean> callback);
void markMessage(String messageIdentifier, String messageType,
boolean boolMark, String markType, AsyncCallback<Boolean> callback);
void deleteMessage(String messageIdentifier, String messageType,
AsyncCallback<Boolean> callback);
void getNewMessagesReceived(AsyncCallback<List<MessageModel>> callback);
void copyItem(String itemId, String destinationFolderId, AsyncCallback<Boolean> callback);
void getListFolderBulkCreator(AsyncCallback<List<BulkCreatorModel>> callback);
void deleteBulk(String bulkId, AsyncCallback<Boolean> callback);
void getUrlWebDav(String itemId, AsyncCallback<String> callback);
void searchInSentMessagesByText(String text,
AsyncCallback<List<MessageModel>> callback);
void searchInReceivedMessagesByText(String text,
AsyncCallback<List<MessageModel>> callback);
void getTimeSeriesById(String identifier,
AsyncCallback<GWTWorkspaceItem> callback);
void shareFolder(FileModel folder, List<InfoContactModel> listContacts,
boolean isNewFolder, AsyncCallback<Boolean> callback);
void getListUserSharedByFolderSharedId(String itemId,
AsyncCallback<List<InfoContactModel>> callback);
void unSharedFolderByFolderSharedId(String folderSharedId,
AsyncCallback<Boolean> callback);
void getListParentsByItemIdentifier(String itemIdentifier,
boolean includeItemAsParent, AsyncCallback<List<FileModel>> callback);
void getURLFromApplicationProfile(String oid, AsyncCallback<String> callback);
void getOwnerByItemId(String itemId,
AsyncCallback<InfoContactModel> callback);
void itemExistsInWorkpaceFolder(String parentId, String itemName,
AsyncCallback<String> callback);
void getListUserSharedBySharedItem(String sharedItemId,
AsyncCallback<List<InfoContactModel>> callback);
void getItemCreationDateById(String itemId,
AsyncCallback<Date> asyncCallback);
void loadSizeByItemId(String itemId, AsyncCallback<Long> asyncCallback);
void loadLastModificationDateById(String itemId,
AsyncCallback<Date> callback);
void getParentByItemId(String identifier,
AsyncCallback<FileModel> asyncCallback);
void getAccountingReaders(String identifier,
AsyncCallback<List<GxtAccountingField>> callback);
void getAccountingHistory(String identifier,
AsyncCallback<List<GxtAccountingField>> callback);
void getItemForFileGrid(String itemId, AsyncCallback<FileGridModel> callback);
void getFolderChildrenForFileGridById(String folderId,
AsyncCallback<List<FileGridModel>> callback);
void getShortUrl(String longUrl, AsyncCallback<String> callback);
void getPublicLinkForFolderItemId(String itemId, boolean shortenUrl,
AsyncCallback<String> callback);
/**
*
*/
void isSessionExpired(AsyncCallback<Boolean> callback);
void deleteListItemsForIds(List<String> ids, AsyncCallback<Void> callback);
void copyItems(List<String> idsItem, String destinationFolderId,
AsyncCallback<Boolean> callback);
void moveItems(List<String> ids, String destinationId,
AsyncCallback<Boolean> callback);
void getACLs(AsyncCallback<List<WorkspaceACL>> callback);
void setACLs(String folderId, List<String> listLogins, String aclType,
AsyncCallback<Void> callback);
}