This commit is contained in:
Lucio Lelii 2018-07-05 14:26:08 +00:00
parent fc2d19204b
commit ec82e41948
6 changed files with 83 additions and 68 deletions

View File

@ -48,6 +48,11 @@
<dependencies> <dependencies>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-smartgears</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId> <artifactId>common-authorization</artifactId>

View File

@ -19,12 +19,12 @@ import javax.ws.rs.core.MediaType;
import org.apache.jackrabbit.api.security.JackrabbitAccessControlList; import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils; import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.storagehub.model.acls.ACL; import org.gcube.common.storagehub.model.acls.ACL;
import org.gcube.common.storagehub.model.acls.AccessType; import org.gcube.common.storagehub.model.acls.AccessType;
import org.gcube.common.storagehub.model.types.ACLList; import org.gcube.common.storagehub.model.types.ACLList;
import org.gcube.data.access.storagehub.AuthorizationChecker; import org.gcube.data.access.storagehub.AuthorizationChecker;
import org.gcube.data.access.storagehub.handlers.CredentialHandler; import org.gcube.data.access.storagehub.handlers.CredentialHandler;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -50,7 +50,7 @@ public class ACLManager {
@GET @GET
@Path("{id}/acls") @Path("{id}/acls")
public ACLList getACL() { public ACLList getACL() {
CalledMethodProvider.instance.set("getACLById"); InnerMethodName.instance.set("getACLById");
Session ses = null; Session ses = null;
List<ACL> acls = new ArrayList<>(); List<ACL> acls = new ArrayList<>();
try{ try{

View File

@ -7,7 +7,6 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Inject; import javax.inject.Inject;
import javax.jcr.Node; import javax.jcr.Node;
import javax.jcr.Session; import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import javax.jcr.security.AccessControlManager; import javax.jcr.security.AccessControlManager;
import javax.jcr.security.Privilege; import javax.jcr.security.Privilege;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
@ -23,7 +22,6 @@ import javax.ws.rs.core.MediaType;
import org.apache.jackrabbit.api.security.JackrabbitAccessControlList; import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils; import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
import org.gcube.common.authorization.library.provider.AuthorizationProvider; import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.storagehub.model.NodeConstants; import org.gcube.common.storagehub.model.NodeConstants;
import org.gcube.common.storagehub.model.Paths; import org.gcube.common.storagehub.model.Paths;
import org.gcube.common.storagehub.model.acls.AccessType; import org.gcube.common.storagehub.model.acls.AccessType;
@ -37,6 +35,7 @@ import org.gcube.data.access.storagehub.accounting.AccountingHandler;
import org.gcube.data.access.storagehub.handlers.CredentialHandler; import org.gcube.data.access.storagehub.handlers.CredentialHandler;
import org.gcube.data.access.storagehub.handlers.ItemHandler; import org.gcube.data.access.storagehub.handlers.ItemHandler;
import org.gcube.data.access.storagehub.handlers.VersionHandler; import org.gcube.data.access.storagehub.handlers.VersionHandler;
import org.gcube.smartgears.utils.InnerMethodName;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -70,7 +69,7 @@ public class ItemSharing {
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.MULTIPART_FORM_DATA) @Consumes(MediaType.MULTIPART_FORM_DATA)
public String share(@FormDataParam("users") Set<String> users, @FormDataParam("defaultAccessType") AccessType accessType){ public String share(@FormDataParam("users") Set<String> users, @FormDataParam("defaultAccessType") AccessType accessType){
CalledMethodProvider.instance.set("findChildrenByNamePattern"); InnerMethodName.instance.set("findChildrenByNamePattern");
Session ses = null; Session ses = null;
try{ try{
String login = AuthorizationProvider.instance.get().getClient().getId(); String login = AuthorizationProvider.instance.get().getClient().getId();

View File

@ -33,7 +33,6 @@ import org.apache.tika.detect.Detector;
import org.apache.tika.io.TikaInputStream; import org.apache.tika.io.TikaInputStream;
import org.apache.tika.metadata.Metadata; import org.apache.tika.metadata.Metadata;
import org.gcube.common.authorization.library.provider.AuthorizationProvider; import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.storagehub.model.items.AbstractFileItem; import org.gcube.common.storagehub.model.items.AbstractFileItem;
import org.gcube.common.storagehub.model.items.FolderItem; import org.gcube.common.storagehub.model.items.FolderItem;
import org.gcube.common.storagehub.model.items.Item; import org.gcube.common.storagehub.model.items.Item;
@ -48,9 +47,13 @@ import org.gcube.data.access.storagehub.handlers.ItemHandler;
import org.gcube.data.access.storagehub.handlers.VersionHandler; import org.gcube.data.access.storagehub.handlers.VersionHandler;
import org.gcube.data.access.storagehub.handlers.content.ContentHandler; import org.gcube.data.access.storagehub.handlers.content.ContentHandler;
import org.gcube.data.access.storagehub.handlers.content.ContentHandlerFactory; import org.gcube.data.access.storagehub.handlers.content.ContentHandlerFactory;
import org.gcube.smartgears.utils.InnerMethodName;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@Path("items") @Path("items")
public class ItemsCreator { public class ItemsCreator {
@ -81,7 +84,7 @@ public class ItemsCreator {
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/{id}/create/{type:(?!FILE)[^/?$]*}") @Path("/{id}/create/{type:(?!FILE)[^/?$]*}")
public Response createItem(@PathParam("id") String id, @PathParam("type") String type,@QueryParam("name") String name, @QueryParam("description") String description){ public Response createItem(@PathParam("id") String id, @PathParam("type") String type,@QueryParam("name") String name, @QueryParam("description") String description){
CalledMethodProvider.instance.set(String.format("createItem(%s)",type)); InnerMethodName.instance.set(String.format("createItem(%s)",type));
log.info("create generic item called"); log.info("create generic item called");
Session ses = null; Session ses = null;
Item destinationItem = null; Item destinationItem = null;
@ -149,16 +152,19 @@ public class ItemsCreator {
@POST @POST
@Consumes(MediaType.APPLICATION_OCTET_STREAM) @Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/{id}/create/FILE") @Path("/{id}/create/FILE")
public Response createFileItem(InputStream stream , @PathParam("id") String id, public Response createFileItem(@PathParam("id") String id, @FormDataParam("name") String name,
@QueryParam("name") String name, @QueryParam("description") String description){ @FormDataParam("description") String description,
CalledMethodProvider.instance.set("createItem(FILE)"); @FormDataParam("file") InputStream stream,
@FormDataParam("file") FormDataContentDisposition fileDetail){
InnerMethodName.instance.set("createItem(FILE)");
Session ses = null; Session ses = null;
Item destinationItem = null; Item destinationItem = null;
try{ try{
if (name==null || name.trim().isEmpty() || description ==null) throw new Exception("name or description are null");
final String login = AuthorizationProvider.instance.get().getClient().getId(); final String login = AuthorizationProvider.instance.get().getClient().getId();
//TODO check if it is possible to change all the ACL on a workspace //TODO check if it is possible to change all the ACL on a workspace
@ -249,7 +255,7 @@ public class ItemsCreator {
handler.getContent().setMimeType(mimeType); handler.getContent().setMimeType(mimeType);
} catch (Throwable e) { } catch (Throwable e) {
log.error("error retreiving content",e); log.error("error retrieving mimeType",e);
throw new RuntimeException(e); throw new RuntimeException(e);
} }
return handler; return handler;
@ -261,6 +267,7 @@ public class ItemsCreator {
@Override @Override
public MetaInfo call() throws Exception { public MetaInfo call() throws Exception {
try {
String remotePath= path+"/"+name; String remotePath= path+"/"+name;
String storageId = Utils.getStorageClient(AuthorizationProvider.instance.get().getClient().getId()).getClient().put(true).LFile(mos.get()).RFile(remotePath); String storageId = Utils.getStorageClient(AuthorizationProvider.instance.get().getClient().getId()).getClient().put(true).LFile(mos.get()).RFile(remotePath);
long size = Utils.getStorageClient(AuthorizationProvider.instance.get().getClient().getId()).getClient().getSize().RFileById(storageId); long size = Utils.getStorageClient(AuthorizationProvider.instance.get().getClient().getId()).getClient().getSize().RFileById(storageId);
@ -269,6 +276,11 @@ public class ItemsCreator {
info.setStorageId(storageId); info.setStorageId(storageId);
info.setRemotePath(remotePath); info.setRemotePath(remotePath);
return info; return info;
}catch (Throwable e) {
log.error("error writing content");
throw e;
}
} }
}; };

View File

@ -37,7 +37,6 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput; import javax.ws.rs.core.StreamingOutput;
import org.gcube.common.authorization.library.provider.AuthorizationProvider; import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.storagehub.model.NodeConstants; import org.gcube.common.storagehub.model.NodeConstants;
import org.gcube.common.storagehub.model.Paths; import org.gcube.common.storagehub.model.Paths;
import org.gcube.common.storagehub.model.items.AbstractFileItem; import org.gcube.common.storagehub.model.items.AbstractFileItem;
@ -59,6 +58,7 @@ import org.gcube.data.access.storagehub.accounting.AccountingHandler;
import org.gcube.data.access.storagehub.handlers.CredentialHandler; import org.gcube.data.access.storagehub.handlers.CredentialHandler;
import org.gcube.data.access.storagehub.handlers.ItemHandler; import org.gcube.data.access.storagehub.handlers.ItemHandler;
import org.gcube.data.access.storagehub.handlers.VersionHandler; import org.gcube.data.access.storagehub.handlers.VersionHandler;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -90,7 +90,7 @@ public class ItemsManager {
@Path("{id}") @Path("{id}")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemWrapper<Item> getById(@QueryParam("exclude") List<String> excludes){ public ItemWrapper<Item> getById(@QueryParam("exclude") List<String> excludes){
CalledMethodProvider.instance.set("getById"); InnerMethodName.instance.set("getById");
Session ses = null; Session ses = null;
Item toReturn = null; Item toReturn = null;
try{ try{
@ -112,7 +112,7 @@ public class ItemsManager {
@Path("{id}/items/{name}") @Path("{id}/items/{name}")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList findChildrenByNamePattern(@QueryParam("exclude") List<String> excludes, @PathParam("name") String name){ public ItemList findChildrenByNamePattern(@QueryParam("exclude") List<String> excludes, @PathParam("name") String name){
CalledMethodProvider.instance.set("findChildrenByNamePattern"); InnerMethodName.instance.set("findChildrenByNamePattern");
Session ses = null; Session ses = null;
List<Item> toReturn = new ArrayList<>(); List<Item> toReturn = new ArrayList<>();
try{ try{
@ -137,7 +137,7 @@ public class ItemsManager {
@Path("{id}/children/count") @Path("{id}/children/count")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public Long countById(@QueryParam("showHidden") Boolean showHidden, @QueryParam("exclude") List<String> excludes){ public Long countById(@QueryParam("showHidden") Boolean showHidden, @QueryParam("exclude") List<String> excludes){
CalledMethodProvider.instance.set("countById"); InnerMethodName.instance.set("countById");
Session ses = null; Session ses = null;
Long toReturn = null; Long toReturn = null;
try{ try{
@ -158,7 +158,7 @@ public class ItemsManager {
@Path("{id}/children") @Path("{id}/children")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList listById(@QueryParam("showHidden") Boolean showHidden, @QueryParam("exclude") List<String> excludes){ public ItemList listById(@QueryParam("showHidden") Boolean showHidden, @QueryParam("exclude") List<String> excludes){
CalledMethodProvider.instance.set("listById"); InnerMethodName.instance.set("listById");
Session ses = null; Session ses = null;
List<? extends Item> toReturn = null; List<? extends Item> toReturn = null;
try{ try{
@ -180,7 +180,7 @@ public class ItemsManager {
@Path("{id}/children/paged") @Path("{id}/children/paged")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList listByIdPaged(@QueryParam("showHidden") Boolean showHidden, @QueryParam("start") Integer start, @QueryParam("limit") Integer limit, @QueryParam("exclude") List<String> excludes){ public ItemList listByIdPaged(@QueryParam("showHidden") Boolean showHidden, @QueryParam("start") Integer start, @QueryParam("limit") Integer limit, @QueryParam("exclude") List<String> excludes){
CalledMethodProvider.instance.set("listByIdPaged"); InnerMethodName.instance.set("listByIdPaged");
Session ses = null; Session ses = null;
List<? extends Item> toReturn = null; List<? extends Item> toReturn = null;
try{ try{
@ -201,7 +201,7 @@ public class ItemsManager {
@GET @GET
@Path("{id}/publiclink") @Path("{id}/publiclink")
public URL getPubliclink() { public URL getPubliclink() {
CalledMethodProvider.instance.set("getPubliclink"); InnerMethodName.instance.set("getPubliclink");
//TODO: check who can call this method //TODO: check who can call this method
Session ses = null; Session ses = null;
try{ try{
@ -231,7 +231,7 @@ public class ItemsManager {
@Path("{id}/rootSharedFolder") @Path("{id}/rootSharedFolder")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemWrapper<Item> getRootSharedFolder(@QueryParam("exclude") List<String> excludes){ public ItemWrapper<Item> getRootSharedFolder(@QueryParam("exclude") List<String> excludes){
CalledMethodProvider.instance.set("getRootSharedFolder"); InnerMethodName.instance.set("getRootSharedFolder");
Session ses = null; Session ses = null;
try{ try{
ses = repository.getRepository().login(CredentialHandler.getAdminCredentials(context)); ses = repository.getRepository().login(CredentialHandler.getAdminCredentials(context));
@ -259,7 +259,7 @@ public class ItemsManager {
@Path("{id}/anchestors") @Path("{id}/anchestors")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList getAnchestors(@QueryParam("exclude") List<String> excludes){ public ItemList getAnchestors(@QueryParam("exclude") List<String> excludes){
CalledMethodProvider.instance.set("getAnchestors"); InnerMethodName.instance.set("getAnchestors");
org.gcube.common.storagehub.model.Path absolutePath = Utils.getHomePath(); org.gcube.common.storagehub.model.Path absolutePath = Utils.getHomePath();
Session ses = null; Session ses = null;
List<Item> toReturn = new LinkedList<>(); List<Item> toReturn = new LinkedList<>();
@ -303,7 +303,7 @@ public class ItemsManager {
@GET @GET
@Path("{id}/download") @Path("{id}/download")
public Response download(){ public Response download(){
CalledMethodProvider.instance.set("downloadById"); InnerMethodName.instance.set("downloadById");
Session ses = null; Session ses = null;
try{ try{
final String login = AuthorizationProvider.instance.get().getClient().getId(); final String login = AuthorizationProvider.instance.get().getClient().getId();
@ -370,7 +370,7 @@ public class ItemsManager {
@PUT @PUT
@Path("{id}/move") @Path("{id}/move")
public Response move(@QueryParam("destinationId") String destinationId, @PathParam("id") String identifier){ public Response move(@QueryParam("destinationId") String destinationId, @PathParam("id") String identifier){
CalledMethodProvider.instance.set("move"); InnerMethodName.instance.set("move");
//TODO: check if identifier is The Workspace root, or the thras folder or the VREFolder root or if the item is thrashed //TODO: check if identifier is The Workspace root, or the thras folder or the VREFolder root or if the item is thrashed
Session ses = null; Session ses = null;
try{ try{
@ -425,7 +425,7 @@ public class ItemsManager {
@DELETE @DELETE
@Path("{id}") @Path("{id}")
public Response deleteItem(@PathParam("id") String identifier){ public Response deleteItem(@PathParam("id") String identifier){
CalledMethodProvider.instance.set("deleteItem"); InnerMethodName.instance.set("deleteItem");
//TODO: check if identifier is The Workspace root, or the trash folder or the VREFolder root //TODO: check if identifier is The Workspace root, or the trash folder or the VREFolder root
//TODO: check also that is not already trashed //TODO: check also that is not already trashed
Session ses = null; Session ses = null;

View File

@ -10,7 +10,6 @@ import javax.inject.Inject;
import javax.jcr.Node; import javax.jcr.Node;
import javax.jcr.NodeIterator; import javax.jcr.NodeIterator;
import javax.jcr.Session; import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import javax.jcr.query.Query; import javax.jcr.query.Query;
import javax.jcr.query.QueryResult; import javax.jcr.query.QueryResult;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
@ -23,7 +22,6 @@ import javax.ws.rs.core.MediaType;
import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceException;
import org.gcube.common.authorization.library.provider.AuthorizationProvider; import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.common.scope.impl.ScopeBean; import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type; import org.gcube.common.scope.impl.ScopeBean.Type;
@ -43,6 +41,7 @@ import org.gcube.data.access.storagehub.handlers.ItemHandler;
import org.gcube.data.access.storagehub.handlers.VRE; import org.gcube.data.access.storagehub.handlers.VRE;
import org.gcube.data.access.storagehub.handlers.VREManager; import org.gcube.data.access.storagehub.handlers.VREManager;
import org.gcube.data.access.storagehub.query.sql2.evaluators.Evaluators; import org.gcube.data.access.storagehub.query.sql2.evaluators.Evaluators;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -79,7 +78,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemWrapper<Item> getWorkspace(@QueryParam("relPath") String relPath){ public ItemWrapper<Item> getWorkspace(@QueryParam("relPath") String relPath){
CalledMethodProvider.instance.set("getWorkspace"); InnerMethodName.instance.set("getWorkspace");
Session ses = null; Session ses = null;
org.gcube.common.storagehub.model.Path absolutePath; org.gcube.common.storagehub.model.Path absolutePath;
if (relPath==null) if (relPath==null)
@ -132,7 +131,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemWrapper<Item> getVreRootFolder(){ public ItemWrapper<Item> getVreRootFolder(){
CalledMethodProvider.instance.set("getVreRootFolder"); InnerMethodName.instance.set("getVreRootFolder");
Session ses = null; Session ses = null;
try { try {
String login = AuthorizationProvider.instance.get().getClient().getId(); String login = AuthorizationProvider.instance.get().getClient().getId();
@ -151,7 +150,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList getVreFolderRecentsDocument(){ public ItemList getVreFolderRecentsDocument(){
CalledMethodProvider.instance.set("getVreFolderRecents"); InnerMethodName.instance.set("getVreFolderRecents");
Session ses = null; Session ses = null;
try{ try{
@ -177,7 +176,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemWrapper<Item> getTrashRootFolder(){ public ItemWrapper<Item> getTrashRootFolder(){
CalledMethodProvider.instance.set("getTrashRootFolder"); InnerMethodName.instance.set("getTrashRootFolder");
Session ses = null; Session ses = null;
org.gcube.common.storagehub.model.Path trashPath = Paths.append(Utils.getHomePath(), Constants.TRASH_ROOT_FOLDER_NAME); org.gcube.common.storagehub.model.Path trashPath = Paths.append(Utils.getHomePath(), Constants.TRASH_ROOT_FOLDER_NAME);
@ -208,7 +207,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList getVreFolders(){ public ItemList getVreFolders(){
CalledMethodProvider.instance.set("getVreFolders"); InnerMethodName.instance.set("getVreFolders");
Session ses = null; Session ses = null;
org.gcube.common.storagehub.model.Path vrePath = Paths.append(Utils.getHomePath(), Constants.VRE_FOLDER_PARENT_NAME); org.gcube.common.storagehub.model.Path vrePath = Paths.append(Utils.getHomePath(), Constants.VRE_FOLDER_PARENT_NAME);
@ -232,7 +231,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList getVreFoldersPaged(@QueryParam("start") Integer start, @QueryParam("limit") Integer limit){ public ItemList getVreFoldersPaged(@QueryParam("start") Integer start, @QueryParam("limit") Integer limit){
CalledMethodProvider.instance.set("getVreFoldersPaged"); InnerMethodName.instance.set("getVreFoldersPaged");
Session ses = null; Session ses = null;
org.gcube.common.storagehub.model.Path vrePath = Paths.append(Utils.getHomePath(), Constants.VRE_FOLDER_PARENT_NAME); org.gcube.common.storagehub.model.Path vrePath = Paths.append(Utils.getHomePath(), Constants.VRE_FOLDER_PARENT_NAME);
@ -258,7 +257,7 @@ public class WorkspaceManager {
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ItemList searchItems(@QueryParam("n") String node, @QueryParam("e") String jsonExpr, @QueryParam("o") List<String> orderField, @QueryParam("l") Integer limit, @QueryParam("f") Integer offset){ public ItemList searchItems(@QueryParam("n") String node, @QueryParam("e") String jsonExpr, @QueryParam("o") List<String> orderField, @QueryParam("l") Integer limit, @QueryParam("f") Integer offset){
CalledMethodProvider.instance.set("searchItems"); InnerMethodName.instance.set("searchItems");
Session ses = null; Session ses = null;
List<? extends Item> toReturn = new ArrayList<>(); List<? extends Item> toReturn = new ArrayList<>();