the messages in exceptions event was updated
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@69471 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8d51f05602
commit
878b111178
|
@ -183,7 +183,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR+" un share folder. "+ caught.getMessage() +". " +ConstantsExplorer.TRY_AGAIN, null);
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR+" creating shared folder. "+ caught.getMessage(), null);
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
explorerPanel.unmask();
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR +" copying item " + ConstantsExplorer.TRY_AGAIN, null);
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
public void onSuccess(Boolean result) {
|
||||
if(result)
|
||||
eventBus.fireEvent(new RefreshFolderEvent(explorerPanel.getAsycTreePanel().getFileModelByIdentifier(pasteItemEvent.getFolderDestinationId())));
|
||||
// explorerPanel.getAsycTreePanel().reloadTreeLevelAndExpandFolder(pasteItemEvent.getFolderDestinationId());
|
||||
|
||||
}
|
||||
|
||||
|
@ -873,7 +872,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
explorerPanel.getAsycTreePanel().unmask();
|
||||
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR +" deleting item. "+caught.getMessage()+". Reload root", null);
|
||||
new MessageBoxAlert("Error", caught.getMessage()+". Reload root", null);
|
||||
explorerPanel.getAsycTreePanel().removeAllAndRecoveryRoot();
|
||||
|
||||
}
|
||||
|
@ -1020,7 +1019,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " moving item. "+caught.getMessage()+". Reload root" , null);
|
||||
new MessageBoxAlert("Error", caught.getMessage()+". Reload root" , null);
|
||||
System.out.println(caught.getMessage());
|
||||
explorerPanel.getAsycTreePanel().reloadTreeLevelAndExpandFolder(event.getTargetParentFileModel().getIdentifier());
|
||||
explorerPanel.getAsycTreePanel().reloadTreeLevelAndExpandFolder(event.getFileSourceModel().getParentFileModel().getIdentifier());
|
||||
|
|
|
@ -17,8 +17,11 @@ import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
|||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItemType;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceSharedFolder;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceSmartFolder;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemNotFoundException;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.exceptions.WrongDestinationException;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.folder.FolderBulkCreator;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.folder.FolderItemType;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.folder.items.ExternalUrl;
|
||||
|
@ -26,6 +29,7 @@ import org.gcube.portlets.user.homelibrary.home.workspace.folder.items.ts.TimeSe
|
|||
import org.gcube.portlets.user.homelibrary.home.workspace.search.SearchItem;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage;
|
||||
import org.gcube.portlets.user.opengcubeapplication.ApplicationReaderFromGenericResource;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.interfaces.GXTCategoryItemInterface;
|
||||
import org.gcube.portlets.user.workspace.client.model.BulkCreatorModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileDetailsModel;
|
||||
|
@ -282,11 +286,15 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
workspace.moveItem(itemId, destinationId);
|
||||
return Boolean.TRUE;
|
||||
|
||||
}catch (InsufficientPrivilegesException e) {
|
||||
workspaceLogger.error("Error in server Item move", e);
|
||||
String error = "An error occurred on moving item. "+e.getMessage();
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in server Item move", e);
|
||||
// workspaceLogger.trace("Error in server Item move " + e);
|
||||
//GWT can't serialize all exceptions
|
||||
throw new Exception(e.getMessage());
|
||||
String error = ConstantsExplorer.SERVER_ERROR + " moving item. "+e.getMessage();
|
||||
throw new Exception(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -302,12 +310,16 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
|
||||
workspace.removeItem(itemId);
|
||||
return Boolean.TRUE;
|
||||
|
||||
} catch (InsufficientPrivilegesException e) {
|
||||
workspaceLogger.error("Error in server Item remove", e);
|
||||
String error = "An error occurred on deleting item. "+e.getMessage();
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in server Item remove", e);
|
||||
// workspaceLogger.trace("Error in server Item remove " + e);
|
||||
//GWT can't serialize all exceptions
|
||||
throw new Exception(e.getMessage());
|
||||
String error = ConstantsExplorer.SERVER_ERROR +" deleting item. "+e.getMessage();
|
||||
throw new Exception(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -329,8 +341,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in server Item rename", e);
|
||||
// workspaceLogger.trace("Error in server Item rename " + e);
|
||||
//GWT can't serialize all exceptions
|
||||
throw new Exception(e.getMessage());
|
||||
}
|
||||
|
||||
|
@ -1265,12 +1275,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
return true;
|
||||
|
||||
return false;
|
||||
}catch (InsufficientPrivilegesException e) {
|
||||
String error = "An error occurred on copying item " +e.getMessage() + ". "+ConstantsExplorer.TRY_AGAIN;
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in server copyItem by id", e);
|
||||
// workspaceLogger.trace("Error in server copyItem by id " + e);
|
||||
|
||||
throw new Exception(e.getMessage());
|
||||
String error = ConstantsExplorer.SERVER_ERROR +" copying item " + ConstantsExplorer.TRY_AGAIN;
|
||||
throw new Exception(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1363,10 +1375,26 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
|
||||
return created;
|
||||
|
||||
} catch (InsufficientPrivilegesException e) {
|
||||
workspaceLogger.error("Error in shareFolder ", e);
|
||||
String error = "An error occurred on creating shared folder. "+ e.getMessage();
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (ItemAlreadyExistException e) {
|
||||
workspaceLogger.error("Error in shareFolder ", e);
|
||||
String error = "An error occurred on creating shared folder. "+ e.getMessage();
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (WrongDestinationException e) {
|
||||
workspaceLogger.error("Error in shareFolder ", e);
|
||||
String error = "An error occurred on creating shared folder. "+ e.getMessage();
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in shareFolder ", e);
|
||||
e.printStackTrace();
|
||||
throw new Exception(e.getMessage());
|
||||
String error = ConstantsExplorer.SERVER_ERROR+" creating shared folder. "+ e.getMessage();
|
||||
throw new Exception(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1442,10 +1470,16 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
else
|
||||
workspaceLogger.trace("the item with id: "+folderSharedId+ "is not "+WorkspaceItemType.SHARED_FOLDER);
|
||||
|
||||
} catch (InsufficientPrivilegesException e) {
|
||||
workspaceLogger.error("Error in unSharedFolderByFolderSharedId ", e);
|
||||
String error = "An error occerred on unsharing folder. "+ e.getMessage();
|
||||
throw new Exception(error);
|
||||
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.error("Error in unSharedFolderByFolderSharedId ", e);
|
||||
String error = ConstantsExplorer.SERVER_ERROR+" un share folder. "+ e.getMessage() +". " +ConstantsExplorer.TRY_AGAIN;
|
||||
e.printStackTrace();
|
||||
throw new Exception(e.getMessage());
|
||||
throw new Exception(error);
|
||||
}
|
||||
|
||||
return unShared;
|
||||
|
|
Loading…
Reference in New Issue