Package it.eng.spago.base

Examples of it.eng.spago.base.SessionContainer


      requestIdentity = requestIdentity.replaceAll("-", "");
    httpRequest = httpReq;
    reqCont = ChannelUtilities.getRequestContainer(httpRequest);
    urlBuilder = UrlBuilderFactory.getUrlBuilder();
    msgBuilder = MessageBuilderFactory.getMessageBuilder();
    SessionContainer sessionContainer = reqCont.getSessionContainer();
    jobInfo = (JobInfo)sessionContainer.getAttribute(SpagoBIConstants.JOB_INFO);
    biobjIds = jobInfo.getBiobjectIds();
   
      currTheme=ThemesManager.getCurrentTheme(reqCont);
      if(currTheme==null)currTheme=ThemesManager.getDefaultTheme();
   
    SessionContainer permanentSession = sessionContainer.getPermanentContainer();
        profile = (IEngUserProfile)permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
        StringBuffer htmlStream = new StringBuffer();
    htmlStream.append("<LINK rel='StyleSheet' href='"+urlBuilder.getResourceLinkByTheme(httpRequest, "/css/dtree.css",currTheme )+"' type='text/css' />");
    //makeConfigurationDtree(htmlStream);
    String nameTree = msgBuilder.getMessage("tree.objectstree.name" ,"messages", httpRequest);
    htmlStream.append("<SCRIPT language='JavaScript' src='"+urlBuilder.getResourceLinkByTheme(httpRequest, "/js/dtree.js",currTheme )+"'></SCRIPT>");   
View Full Code Here


 
  private ListIFace loadSpagoList(SourceBean request, SourceBean response, Integer parId, String roleName) throws Exception {
          logger.debug("IN");
    RequestContainer requestContainer = getRequestContainer();
    SessionContainer session = requestContainer.getSessionContainer();
    String parameterFieldName = (String)request.getAttribute("parameterFieldName");
    logger.debug("parameterFieldName="+parameterFieldName);
    // define the spago paginator and list object
    PaginatorIFace paginator = new GenericPaginator();
    ListIFace list = new GenericList();
    // define variable for value column name
    String valColName = "";
    // recover lov object 
    IParameterDAO pardao = DAOFactory.getParameterDAO();
    Parameter par = pardao.loadForExecutionByParameterIDandRoleName(parId, roleName);
    ModalitiesValue modVal = par.getModalityValue();
    // get the lov provider
    String looProvider = modVal.getLovProvider();
    // get from the request the type of lov
    String typeLov = LovDetailFactory.getLovTypeCode(looProvider);
    // get the user profile
    IEngUserProfile profile = null;
    SessionContainer permanentSession = session.getPermanentContainer();
    profile = (IEngUserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
//    HttpServletRequest httpReq = (HttpServletRequest)requestContainer.getInternalRequest();
//    HttpSession httpSess = httpReq.getSession();
//    profile = (IEngUserProfile)httpSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    // based on lov type fill the spago list / paginator object / valColName
    SourceBean rowsSourceBean = null;
View Full Code Here

      }
    }
    //End writing log in the DB

    RequestContainer aRequestContainer = RequestContainer.getRequestContainer();
    SessionContainer aSessionContainer = aRequestContainer.getSessionContainer();

    IEngUserProfile userProfile =UserUtilities.getUserProfile();
    String userId="";
    if (userProfile!=null) userId=(String)((UserProfile)userProfile).getUserId();
    //sets the userid as input parameter for the query fo statements.xml
    aSessionContainer.setAttribute(SsoServiceInterface.USER_ID ,userId);


    Collection c = null;

    c = ((UserProfile)userProfile).getRolesForUse();


    Iterator i = c.iterator();
    int j = 0;
    while (i.hasNext()){
      String roles = (String)i.next();
      aSessionContainer.setAttribute("role"+j,roles);
      j++ ;
    }
    while (j<6){
      String s= "/";
      aSessionContainer.setAttribute("role"+j,s);
      j++ ;
    }

    return DelegatedHibernateConnectionListService.getList(this, request, response);
  }
View Full Code Here

  private void modifyDistributionList(SourceBean serviceRequest, String mod, SourceBean serviceResponse)
    throws EMFUserError, SourceBeanException {
    logger.debug("IN");
    try {
      RequestContainer reqCont = getRequestContainer();
      SessionContainer sessCont = reqCont.getSessionContainer();
      SessionContainer permSess = sessCont.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);

      IDistributionListDAO dao=DAOFactory.getDistributionListDAO();
      dao.setUserProfile(profile);
      DistributionList dlNew = recoverDistributionListDetails(serviceRequest);
     
View Full Code Here

  @Override
  public void doService() {
    logger.debug("IN");
    HttpServletResponse httpResponse = getHttpResponse();
    RequestContainer requestContainer = this.getRequestContainer();
    SessionContainer permanentSession = requestContainer.getSessionContainer().getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    IRoleDAO roleDao;
    try {
      roleDao = DAOFactory.getRoleDAO();
      roleDao.setUserProfile(profile);
    } catch (EMFUserError e1) {
View Full Code Here

        null);
  }
  IEngUserProfile profile = null;
  try {
      RequestContainer reqCont = RequestContainer.getRequestContainer();
      SessionContainer sessCont = reqCont.getSessionContainer();
      SessionContainer permSess = sessCont.getPermanentContainer();
      profile = (IEngUserProfile) permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      if (profile == null) {
        logger.error("User profile not found");
        throw new SecurityException("User profile not found");
      }
View Full Code Here

        throw new EMFUserError(EMFErrorSeverity.ERROR, "1011", messageBundle);
      }
     
      // read the configuration and set relative object into session
      DocumentCompositionConfiguration docConf = new DocumentCompositionConfiguration(content);
      SessionContainer session = requestContainer.getSessionContainer();
      ContextManager contextManager = new ContextManager(new SpagoBISessionContainer(session),
          new LightNavigatorContextRetrieverStrategy(requestContainer.getServiceRequest()));
      contextManager.set("docConfig", docConf);
        
      // set information into response
View Full Code Here

              reqContainer, resContainer);
          resContainer.setErrorHandler(new EMFErrorHandler());
          RequestContainer.setRequestContainer(reqContainer);
          ResponseContainer.setResponseContainer(resContainer);
          Locale locale = new Locale("it","IT","");
          SessionContainer session = new SessionContainer(true);
          reqContainer.setSessionContainer(session);
          SessionContainer permSession = session.getPermanentContainer();
          IEngUserProfile profile =UserProfile.createSchedulerUserProfile();         
          permSession.setAttribute(IEngUserProfile.ENG_USER_PROFILE, profile);
          errorHandler = defaultRequestContext.getErrorHandler();
          reqContainer.setAttribute("model_node_instance", modelInstanceId);
          reqContainer.setAttribute("start_date", beginDate);
          reqContainer.setAttribute("end_date", endDate);
          reqContainer.setAttribute("cascade", cascade);
View Full Code Here

      publisher_Name = pub_Name;
    }
    IMessageBuilder msgBuilder = MessageBuilderFactory.getMessageBuilder();
    RequestContainer requestContainer = RequestContainer.getRequestContainer();
    HttpServletRequest request = getHttpRequest();
    SessionContainer session = requestContainer.getSessionContainer();
    IEngUserProfile profile = (IEngUserProfile) session.getPermanentContainer().getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    String tempRId = (String)serviceRequest.getAttribute("RESOURCE_ID");
    logger.debug("Got Resource ID:"+(tempRId!=null ? tempRId : "null"));
    Integer resID = null;
    if (tempRId!= null){
      resID = new Integer(tempRId);
View Full Code Here

    Boolean isMultischema = false;
    if(multischema!=null && !multischema.equals("") && multischema.equalsIgnoreCase("true")){
      isMultischema = true;
    }
    RequestContainer requestContainer = this.getRequestContainer()
    SessionContainer session = requestContainer.getSessionContainer();
    SessionContainer permanentSession = session.getPermanentContainer();
    IEngUserProfile profile = (IEngUserProfile)permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    logger.debug("user profile:"+ profile);
    String schemaattr = (String) serviceRequest.getAttribute("schemaattr");
    logger.debug("User Attribute:"+ schemaattr);
   
    String schema=(String)profile.getUserAttribute(schemaattr);
View Full Code Here

TOP

Related Classes of it.eng.spago.base.SessionContainer

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.