Package it.eng.spago.security

Examples of it.eng.spago.security.IEngUserProfile


    // get the lov provider
    String looProvider = modVal.getLovProvider();
    // get from the request the type of lov
    String typeLov = LovDetailFactory.getLovTypeCode(looProvider);
    // get the usser profile
    IEngUserProfile profile = null;
    profile = (IEngUserProfile)session.getAttribute(SpagoBIConstants.USER_PROFILE_FOR_TEST);
    if(profile==null) {
      SessionContainer permSess = session.getPermanentContainer();
      profile = (IEngUserProfile) permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    } else {
View Full Code Here


      Menu menu= (Menu) it.next();
      /* ********* start luca changes *************** */
      RequestContainer reqCont = ChannelUtilities.getRequestContainer(httpRequest);
      SessionContainer sessionContainer = reqCont.getSessionContainer();
      SessionContainer permanentSession = sessionContainer.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      /* ********* end luca changes ***************** */
      if (initialPath != null) {
        if (initialPath.equalsIgnoreCase(menu.getName())) addItemForJSTree(htmlStream, menu, true);
        else addItemForJSTree(htmlStream, menu, false);
      } else {
View Full Code Here

    return userId;
  }

  public String getUserIdentifier() {
    IEngUserProfile profile = null;

    if (userUniqueIdentifier == null) {
      userUniqueIdentifier = (String) getUserProfile()
          .getUserUniqueIdentifier();
    }
View Full Code Here

     * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public void service(HttpServletRequest request, HttpServletResponse response) {
  HttpSession session = request.getSession();

  IEngUserProfile profile = (IEngUserProfile) session
    .getAttribute(IEngUserProfile.ENG_USER_PROFILE);
  if (profile == null) {
      logger.error("IEngUserProfile is not in session!!!");
  } else {
    //  String username = (String) profile.getUserUniqueIdentifier();
View Full Code Here

     
      return userId;
    }
   
    public String getUserIdentifier() {
      IEngUserProfile profile = null;
     
      if(userUniqueIdentifier == null) { 
        userUniqueIdentifier = (String)getUserProfile().getUserUniqueIdentifier();
      }
     
View Full Code Here

 
      String auditId;
      String userId=null;
      String documentId;
      String executionId;
      IEngUserProfile profile = null;
      String requestUrl;
     
      logger.debug("IN");
     
      try {
        FilterIOManager ioManager = new FilterIOManager(request, response);
       
        
        documentId = (String) request.getParameter(DOCUMENT_ID_PARAM_NAME);
        logger.info("Filter documentId  from request:" + documentId);       
       
      auditId = request.getParameter( AUDIT_ID_PARAM_NAME );
      logger.debug("Filter auditId from request::" + auditId);
     
      executionId = (String)request.getParameter(EXECUTION_ID);
      logger.debug("Filter executionId from request::" + executionId);
     
      userId = request.getParameter( SsoServiceInterface.USER_ID );
      logger.debug("Filter userId from request::" + userId);      
      
     
      if (request instanceof HttpServletRequest) {
         
       
       
        HttpServletRequest httpRequest = (HttpServletRequest) request;
        requestUrl = httpRequest.getRequestURL().toString();
        logger.info("requestUrl: " + requestUrl);
           
        ioManager.initConetxtManager();         
   
        ioManager.setInSession(DOCUMENT_ID_PARAM_NAME, documentId);
        ioManager.setInSession(IS_BACKEND_ATTR_NAME, "false");
        ioManager.contextManager.set(DOCUMENT_ID_PARAM_NAME, documentId);
        ioManager.contextManager.set(IS_BACKEND_ATTR_NAME, "false");
         
       
        boolean isBackend = false;   
          if (requestUrl.endsWith("BackEnd")) {   
          String passTicket = (String) request.getParameter(SpagoBIConstants.PASS_TICKET);
          if (passTicket != null && passTicket.equalsIgnoreCase(EnginConf.getInstance().getPass())) {
              // if a request is coming from SpagoBI context
              isBackend = true;
              profile=UserProfile.createSchedulerUserProfile();
              ioManager.setInSession(IS_BACKEND_ATTR_NAME, "true");
              ioManager.contextManager.set(IS_BACKEND_ATTR_NAME, "true");
             
              if (userId!=null && UserProfile.isSchedulerUser(userId)){
               
                ioManager.setInSession(IEngUserProfile.ENG_USER_PROFILE, UserProfile.createSchedulerUserProfile());
                ioManager.contextManager.set(IEngUserProfile.ENG_USER_PROFILE, UserProfile.createSchedulerUserProfile());
                logger.info("IS a Scheduler Request ...");
               
              }else if(userId!=null && UserProfile.isWorkflowUser(userId)){
               
                ioManager.setInSession(IEngUserProfile.ENG_USER_PROFILE, UserProfile.createWorkFlowUserProfile());
                ioManager.contextManager.set(IEngUserProfile.ENG_USER_PROFILE, UserProfile.createWorkFlowUserProfile());
                logger.info("IS a Workflow Request ...");
               
              }else{
                logger.info("IS a backEnd Request ...");
              }
          } else {
              logger.warn("PassTicked is NULL in BackEnd call");
              throw new ServletException();
          }
          }else {
            userId = getUserWithSSO(httpRequest);
          }

          String spagobiContext = request.getParameter(SpagoBIConstants.SBI_CONTEXT);
          String spagoUrl = request.getParameter(SpagoBIConstants.SBI_HOST);
          if (spagobiContext != null) {
          logger.debug("spagobiContext:" + spagobiContext);
          ioManager.setInSession(SpagoBIConstants.SBI_CONTEXT, spagobiContext);
          ioManager.contextManager.set(SpagoBIConstants.SBI_CONTEXT, spagobiContext);
          } else {
            logger.warn("spagobiContext is null.");
          }
         
          if (spagoUrl != null) {
          logger.debug("spagoUrl:" + spagoUrl);
          ioManager.setInSession(SpagoBIConstants.SBI_HOST, spagoUrl);
          ioManager.contextManager.set(SpagoBIConstants.SBI_HOST, spagoUrl);
          } else {
            logger.warn("spagoUrl is null.");
          }
       
     
         
          if(userId != null) {
              try {
                // this is not correct. profile in session can come also from a concurrent execution
                profile = (IEngUserProfile) ioManager.getFromSession(IEngUserProfile.ENG_USER_PROFILE);
                if (profile == null || !profile.getUserUniqueIdentifier().toString().equals(userId)) {
                SecurityServiceProxy proxy = new SecurityServiceProxy(userId, ioManager.getSession());
                profile = proxy.getUserProfile();
                if (profile!=null){
                ioManager.setInSession(IEngUserProfile.ENG_USER_PROFILE, profile);
                ioManager.setInSession("userId", profile.getUserUniqueIdentifier());
                ioManager.contextManager.set(IEngUserProfile.ENG_USER_PROFILE, profile);
                ioManager.contextManager.set("userId", profile.getUserUniqueIdentifier());
                }else {
                  logger.error("ERROR WHILE GETTING USER PROFILE!!!!!!!!!!!");
                }
                } else {
                  logger.debug("Found user profile in session");
View Full Code Here

            }
            HashMap h = new HashMap();
            if(parsJSON!=null){
              h = deserializeParValuesListJSONArray(parsJSON);
            }
            IEngUserProfile profile = getUserProfile();
            String dsMetadata = getDatasetTestMetadata(ds, h, profile)
            dsActiveDetail.setDsMetadata(dsMetadata);
          }             
        }else{
          logger.error("DataSet type is not existent");
View Full Code Here

        }
        HashMap h = new HashMap();
        if(parsJSON!=null){
          h = deserializeParValuesListJSONArray(parsJSON);
        }
        IEngUserProfile profile = getUserProfile();
        dataSetJSON = getDatasetTestResultList(ds, h, profile);         
      }             
    }else{
      logger.error("DataSet type is not existent");
      throw new SpagoBIServiceException(SERVICE_NAME,  "sbi.ds.dsTypeError");
View Full Code Here

   */
  public void service(SourceBean request, SourceBean response) throws Exception {
    RequestContainer reqCont = getRequestContainer();
    SessionContainer sessCont = reqCont.getSessionContainer();
    SessionContainer permSess = sessCont.getPermanentContainer();
    IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);

    String idMenu = (String) request.getAttribute(DetailMenuModule.MENU_ID);
    Integer id = new Integer(idMenu);
    IMenuDAO dao=DAOFactory.getMenuDAO();
    dao.setUserProfile(profile);
View Full Code Here

    //Start writing log in the DB
    Session aSession =null;
    try {
      aSession = HibernateUtil.currentSession();
      Connection jdbcConnection = aSession.connection();
      IEngUserProfile profile = UserUtilities.getUserProfile();
      AuditLogUtilities.updateAudit(jdbcConnection,  profile, "activity.HTMLMenu", null);
    } catch (HibernateException he) {
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (aSession!=null){
View Full Code Here

TOP

Related Classes of it.eng.spago.security.IEngUserProfile

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.