Package com.tensegrity.palo.gwt.core.server.services

Examples of com.tensegrity.palo.gwt.core.server.services.UserSession


      xStaticFolder.setHasChildren(false);
      saveRoot(sessionId, root);
//      print(root, 0);
      return xStaticFolder;
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotCreateFolder", name, e.getLocalizedMessage()), e);
    } catch (PaloIOException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotCreateFolder", name, e.getLocalizedMessage()), e);
    }
  }
View Full Code Here


        folderService.delete(folder);
        //folderService.save(folder.getRoot());
        saveRoot(sessionId, root);
      }
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotDelete", xFolder.getName(), e.getLocalizedMessage()), e);
    } catch (PaloIOException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotDelete", xFolder.getName(), e.getLocalizedMessage()), e);
    }
  }
View Full Code Here

//        folderService.save(folder.getRoot());
        saveRoot(sessionId, root);
      }
    } catch (OperationFailedException e) {
      e.printStackTrace();
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotDelete", xFolderElement.getName(), e.getLocalizedMessage()), e);
    } catch (PaloIOException e) {
      e.printStackTrace();
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotDelete", xFolderElement.getName(), e.getLocalizedMessage()), e);
    }
  }
View Full Code Here

      if (newView == null)
        newView = converter.createDefaultView(xView, sessionId);
      return converter.createX(newView);
    } catch (Throwable t) {
      t.printStackTrace();
      UserSession userSession = null;
      try {
        userSession = getUserSession(sessionId);
      } catch (SessionExpiredException e) {
      }
      if (userSession != null) {
        throw new DbOperationFailedException(
          userSession.translate("couldNotImportView", xView.getName(), t.getLocalizedMessage()), t);
      } else {
        throw new DbOperationFailedException("Could not import view!");
      }
    }
  }
View Full Code Here

      }
     
      saveRoot(sessionId, root);
    } catch (PaloIOException ope) {
      ope.printStackTrace();
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotMoveFolderElements", ope.getLocalizedMessage()), ope);
    }
  }
View Full Code Here

      return save(sessionId, xViewModel);     
    } catch (OperationFailedException e) {
      if (e.getCause() != null && e.getCause().getMessage() != null && e.getCause().getMessage().toLowerCase().indexOf("not enough rights") != -1) {
        return null;
      }
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotSave", xViewModel.getName(),
          e.getLocalizedMessage()),
          e);
    } catch (Throwable t) {
      if (t.getMessage() != null && t.getMessage().toLowerCase().indexOf("not enough rights") != -1) {
        return null;
      }
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotSave", xViewModel.getName(),
          t.getLocalizedMessage()),
          t);
    }       
  }
View Full Code Here

      throws DbOperationFailedException, SessionExpiredException {
    try {
     
      return saveAs(sessionId, name, xViewModel);
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotSave", xViewModel.getName(),
          e.getLocalizedMessage()),
          e);
    } catch (Throwable t) {
      t.printStackTrace();
      if (t.getMessage() != null && t.getMessage().toLowerCase().indexOf("not enough rights") != -1) {
        return null;
      }
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotSave", xViewModel.getName(),
          t.getLocalizedMessage()),
          t);
    }
  }
View Full Code Here

    if (view == null)
      return;
    try {
      delete(sessionId, view);
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotDelete", view.getName(),
          e.getLocalizedMessage()),
          e);
    }
  }
View Full Code Here

      throws DbOperationFailedException, SessionExpiredException {
    try {
      rename(sessionId, xView, newName);
      xView.setName(newName);
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(userSession.translate("couldNotRename", xView.getName(),
          e.getLocalizedMessage()),
          e);
    }
  }
View Full Code Here

    }
    return false;   
  }
 
  public boolean checkPermission(String sessionId, String viewId, int right) throws SessionExpiredException {   
    UserSession userSession = getUserSession(sessionId);
    View view = CubeViewController.getViewById(sessionId, viewId);   
    return checkPermission(userSession.getUser(), view, right);
  }
View Full Code Here

TOP

Related Classes of com.tensegrity.palo.gwt.core.server.services.UserSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.