2015-06-24 15:16:13 +02:00
|
|
|
package org.gcube.portlets.widgets.wsexplorer.client.rpc;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
|
|
|
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
2015-06-30 12:31:49 +02:00
|
|
|
import org.gcube.portlets.widgets.wsexplorer.shared.ItemCategory;
|
2015-06-24 15:16:13 +02:00
|
|
|
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
|
|
|
|
import org.gcube.portlets.widgets.wsexplorer.shared.WorkspaceNavigatorServiceException;
|
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteService;
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The client side stub for the RPC service.
|
2015-07-10 11:57:39 +02:00
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* Jul 10, 2015
|
2015-06-24 15:16:13 +02:00
|
|
|
*/
|
2015-07-08 15:30:39 +02:00
|
|
|
@RemoteServiceRelativePath("WorkspaceExplorerService")
|
2015-06-24 15:16:13 +02:00
|
|
|
public interface WorkspaceExplorerService extends RemoteService {
|
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the breadcrumbs by item identifier.
|
|
|
|
*
|
|
|
|
* @param itemIdentifier the item identifier
|
|
|
|
* @param includeItemAsParent the include item as parent
|
|
|
|
* @return the breadcrumbs by item identifier
|
|
|
|
* @throws Exception the exception
|
2015-06-24 15:16:13 +02:00
|
|
|
*/
|
2015-06-30 14:52:40 +02:00
|
|
|
List<Item> getBreadcrumbsByItemIdentifier(String itemIdentifier,
|
2015-06-24 15:16:13 +02:00
|
|
|
boolean includeItemAsParent) throws Exception;
|
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Check name.
|
|
|
|
*
|
|
|
|
* @param name the name
|
|
|
|
* @return true, if successful
|
|
|
|
* @throws WorkspaceNavigatorServiceException the workspace navigator service exception
|
2015-06-24 15:16:13 +02:00
|
|
|
*/
|
|
|
|
boolean checkName(String name) throws WorkspaceNavigatorServiceException;
|
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the folder.
|
|
|
|
*
|
|
|
|
* @param folderId the folder id
|
|
|
|
* @param showableTypes the showable types
|
|
|
|
* @param purgeEmpyFolders the purge empy folders
|
|
|
|
* @param filterCriteria the filter criteria
|
|
|
|
* @return the folder
|
|
|
|
* @throws WorkspaceNavigatorServiceException the workspace navigator service exception
|
2015-06-24 15:16:13 +02:00
|
|
|
*/
|
|
|
|
Item getFolder(String folderId, List<ItemType> showableTypes,
|
|
|
|
boolean purgeEmpyFolders, FilterCriteria filterCriteria)
|
|
|
|
throws WorkspaceNavigatorServiceException;
|
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the root.
|
|
|
|
*
|
|
|
|
* @param showableTypes the showable types
|
|
|
|
* @param purgeEmpyFolders the purge empy folders
|
|
|
|
* @param filterCriteria the filter criteria
|
|
|
|
* @return the root
|
|
|
|
* @throws WorkspaceNavigatorServiceException the workspace navigator service exception
|
2015-06-24 15:16:13 +02:00
|
|
|
*/
|
|
|
|
Item getRoot(List<ItemType> showableTypes, boolean purgeEmpyFolders,
|
|
|
|
FilterCriteria filterCriteria)
|
|
|
|
throws WorkspaceNavigatorServiceException;
|
2015-06-25 17:22:13 +02:00
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the my special folder.
|
|
|
|
*
|
|
|
|
* @param showableTypes the showable types
|
|
|
|
* @param purgeEmpyFolders the purge empy folders
|
|
|
|
* @param filterCriteria the filter criteria
|
|
|
|
* @return the my special folder
|
|
|
|
* @throws WorkspaceNavigatorServiceException the workspace navigator service exception
|
2015-06-25 17:22:13 +02:00
|
|
|
*/
|
|
|
|
Item getMySpecialFolder(List<ItemType> showableTypes,
|
|
|
|
boolean purgeEmpyFolders, FilterCriteria filterCriteria)
|
|
|
|
throws WorkspaceNavigatorServiceException;
|
2015-06-30 12:31:49 +02:00
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the item by category.
|
|
|
|
*
|
|
|
|
* @param category the category
|
|
|
|
* @return the item by category
|
|
|
|
* @throws WorkspaceNavigatorServiceException the workspace navigator service exception
|
2015-06-30 12:31:49 +02:00
|
|
|
*/
|
|
|
|
Item getItemByCategory(ItemCategory category)throws WorkspaceNavigatorServiceException;
|
2015-07-06 17:18:23 +02:00
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the size by item id.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @return the size by item id
|
|
|
|
* @throws Exception the exception
|
2015-07-06 17:18:23 +02:00
|
|
|
*/
|
2015-07-10 11:57:39 +02:00
|
|
|
Long getSizeByItemId(String itemId) throws Exception;
|
2015-07-06 17:18:23 +02:00
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the mime type.
|
|
|
|
*
|
|
|
|
* @param itemId the item id
|
|
|
|
* @return the mime type
|
|
|
|
* @throws Exception the exception
|
2015-07-06 17:18:23 +02:00
|
|
|
*/
|
|
|
|
String getMimeType(String itemId) throws Exception;
|
|
|
|
|
|
|
|
/**
|
2015-07-10 11:57:39 +02:00
|
|
|
* Gets the user acl for folder id.
|
|
|
|
*
|
|
|
|
* @param folderId the folder id
|
|
|
|
* @return the user acl for folder id
|
|
|
|
* @throws Exception the exception
|
2015-07-06 17:18:23 +02:00
|
|
|
*/
|
|
|
|
String getUserACLForFolderId(String folderId) throws Exception;
|
2016-02-01 16:03:11 +01:00
|
|
|
|
|
|
|
|
2015-07-10 11:57:39 +02:00
|
|
|
/**
|
|
|
|
* Gets the readable size by item id.
|
|
|
|
*
|
|
|
|
* @param id the id
|
|
|
|
* @return the readable size by item id
|
|
|
|
* @throws Exception the exception
|
|
|
|
*/
|
|
|
|
String getReadableSizeByItemId(String id) throws Exception;
|
2015-12-03 15:41:16 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param itemIdentifier
|
|
|
|
* @param parentLimit
|
|
|
|
* @param includeItemAsParent
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
List<Item> getBreadcrumbsByItemIdentifierToParentLimit(
|
|
|
|
String itemIdentifier, String parentLimit,
|
|
|
|
boolean includeItemAsParent) throws Exception;
|
2016-02-01 16:03:11 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param nameFolder
|
|
|
|
* @param description
|
|
|
|
* @param parentId
|
|
|
|
* @param showableTypes
|
|
|
|
* @param filterCriteria
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
Item createFolder(
|
2016-02-01 18:57:18 +01:00
|
|
|
String nameFolder, String description, String parentId)
|
2016-02-01 16:03:11 +01:00
|
|
|
throws Exception;
|
2015-06-24 15:16:13 +02:00
|
|
|
}
|