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

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


    }
    return axisHierarchy;   
  }
 
  private final synchronized Axis toNative(String sessionId, XAxis xAxis) throws SessionExpiredException, PaloGwtCoreException {
    UserSession userSession = getUserSession(sessionId);
    View view = CubeViewController.getViewById(sessionId, xAxis.getViewId());
    if (view == null) {
      return null;
    }
    CubeView cv = view.getCubeView();
View Full Code Here


  public XViewModel cancelUpdateView(String sessionId, XViewModel xViewModel)
      throws SessionExpiredException {
    try {
      return cancelUpdateView(sessionId, getLoggedInUser(sessionId), xViewModel);
    } catch (PaloGwtCoreException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new SessionExpiredException(userSession.translate("noAccount"), e);
    }
  }
View Full Code Here

      XViewModel model = proceedUpdateView(sessionId, getLoggedInUser(sessionId), xViewModel);
      removeLocalFilter(model);
      model.setNeedsRestore(true);
      return model;
    } catch (PaloGwtCoreException e) {     
      UserSession userSession = getUserSession(sessionId);
      throw new SessionExpiredException(userSession.translate("noAccount"), e);
    }
  }
View Full Code Here

  public XViewModel proceedUpdateViewWithoutTable(String sessionId, XViewModel xViewModel)
      throws SessionExpiredException {
    try {
      return proceedUpdateViewWithoutTable(sessionId, getLoggedInUser(sessionId), xViewModel);
    } catch (PaloGwtCoreException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new SessionExpiredException(userSession.translate("noAccount"), e);
    }
  }
View Full Code Here

  public XPrintResult generatePDF(String sessionId, XViewModel xViewModel, XPrintConfiguration config) throws SessionExpiredException {
    try {
      return generatePdf(sessionId, getLoggedInUser(sessionId), xViewModel, config);
    } catch (PaloGwtCoreException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new SessionExpiredException(userSession.translate("noAccount"), e);
    }   
  }
View Full Code Here

    // try to authenticate:
    try {
      AuthUser usr = ServiceProvider.getAuthenticationService().authenticate(login, password);
      //AuthUser usr = ServiceProvider.getAuthenticationService().authenticate("admin", "admin");
      registerListeners();
      UserSession userSession = setLoggedInUser(usr);
      configureNumberFormat(userSession.getSessionId(), usr);     
      setLocale(userSession.getSessionId(), locale);
     
//      try {
//        UserSession userSession = getUserSession();
////        CubeViewController.removeAllViewsAndShutdownConnectionPool(userSession);
//      } catch (Throwable t) {
//        t.printStackTrace();
//      }
      XUser user = (XUser) XConverter.createX(usr);
      user.setSessionId(userSession.getSessionId());
      return user;
    } catch (org.palo.viewapi.exceptions.AuthenticationFailedException e) {
      e.printStackTrace();
      logger.error(e.getMessage(), e);
      throw new AuthenticationFailedException(e.getMessage(), e);
View Full Code Here

      AuthUser usr = ServiceProvider.getAuthenticationService()
          .authenticateHash(login, password);

      registerListeners();
      UserSession userSession = setLoggedInUser(usr);
      configureNumberFormat(userSession.getSessionId(), usr);
      setLocale(userSession.getSessionId(), locale);
     
//      try {
//        UserSession userSession = getUserSession();
//        // CubeViewController.removeAllViewsAndShutdownConnectionPool(userSession);
//      } catch (Throwable t) {
//        t.printStackTrace();
//      }

      XUser user = (XUser) XConverter.createX(usr);
      user.setSessionId(userSession.getSessionId());
      return user;
    } catch (org.palo.viewapi.exceptions.AuthenticationFailedException e) {
      e.printStackTrace();
      logger.error(e.getMessage(), e);
      throw new AuthenticationFailedException(e.getMessage(), e);
View Full Code Here

    register(sessionListener);
  }

  public void logout(String sessionId) {
    try {
      UserSession userSession = getUserSession(sessionId);
      try {
        CubeViewController.removeAllViewsAndShutdownConnectionPool(userSession);
      } catch (Throwable t) {
      }
      AuthUser user = getLoggedInUser(sessionId);     
View Full Code Here

        return save(sessionId, (XRole) obj);
      else if (type.equals(XUser.TYPE))
        return save(sessionId, (XUser) obj);
    } catch (OperationFailedException e) {
      e.printStackTrace();
      UserSession usrSession = getUserSession(sessionId);
     
      throw new DbOperationFailedException(
          usrSession.translate("couldNotSave", obj.getName(), e.getLocalizedMessage()), e);
    }
    return null;
  }
View Full Code Here

            } finally {
              CubeViewReader.CHECK_RIGHTS = true;
            }
          }                       
        } catch (SQLException e) {
          UserSession userSession = getUserSession(sessionId);         
          throw new OperationFailedException(userSession.translate("deletionFailed"));
        }
        delete(sessionId, getNative(sessionId, (XUser) xObj));
      }

    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      String message = userSession.translate("unknownReason");
      String type = xObj.getType();
      if (type.equals(XAccount.TYPE)) {
        message = userSession.translate("viewsUsingThisAccount");
      } else if (type.equals(XConnection.TYPE)) {
        message = userSession.translate("accountsUsingThisConnection");
      } else if (type.equals(XGroup.TYPE)) {
        message = userSession.translate("usersUsingThisGroup");
      } else if (type.equals(XRole.TYPE)) {
        message = userSession.translate("usersOrGroupsUsingThisRole");
      } else if (type.equals(XUser.TYPE)) {
        message = userSession.translate("viewsCreatedByThisUser");
      }
      throw new DbOperationFailedException(userSession.translate("couldNotDelete", xObj.getName(), message), e);
    }
  }
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.