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

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