Package it.eng.spago.security

Examples of it.eng.spago.security.IEngUserProfile


      ModalitiesValue modVal = par.getModalityValue();
      // get the lov provider
      String looProvider = modVal.getLovProvider();
      // get from the request the type of lov
      ILovDetail lovDetail = LovDetailFactory.getLovFromXML(looProvider);
      IEngUserProfile profile = GeneralUtilities.createNewUserProfile(userIndentifierToBeUsed);
      String result = lovDetail.getLovResult(profile, null, null);
      SourceBean rowsSourceBean = SourceBean.fromXMLString(result);
      List rows = null;
      if(rowsSourceBean != null) {
        rows = rowsSourceBean.getAttributeAsList(DataRow.ROW_TAG);
View Full Code Here


    try {   
      HttpSession session = servletIOManager.getHttpSession();
      cleanSessionAttributes(session);
     
      IEngUserProfile profile = (IEngUserProfile) session.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      ContentServiceProxy contentProxy = new ContentServiceProxy((String)profile.getUserUniqueIdentifier(),session);
      String documentId = (String) servletIOManager.getRequest().getParameter(DOCUMENT_ID);
      String subobj = (String) servletIOManager.getRequest().getParameter(SUBOBJ_ID);
      String isSpagoBIDev = (String) servletIOManager.getRequest().getParameter(IS_DEVELOPER);
      String isNewDoc = (String) servletIOManager.getRequest().getParameter(IS_NEW_DOCUMENT);
     
      Locale locale = servletIOManager.getLocale();
      String country = locale.getCountry();
      String language = locale.getLanguage();

      if(language == null || country == null){
        language = (String) servletIOManager.getRequest().getParameter(LANG);
        country = (String) servletIOManager.getRequest().getParameter(COUNTRY);
      }
     
      String pass = AuthUserImpl.encrypt(rb.getString("jpalo.admin.password"));
     
      jpaloUrl = PALO_BASE_URL;
     
      jpaloUrl += "?locale=";     
      jpaloUrl += language+"_"+country;
      jpaloUrl += "&theme=gray&options=(";
      jpaloUrl += "user=\"";
      jpaloUrl += rb.getString("jpalo.admin.user");
      jpaloUrl += "\",pass=\"";
      jpaloUrl += pass;
      jpaloUrl += "\"";
      if((isNewDoc != null && isNewDoc.equals("true")) &&
          (isSpagoBIDev != null && isSpagoBIDev.equals("true"))){
        //new document--> template doesn't exist!
        //open editor with no view
          if(documentId != null && profile != null){
            jpaloUrl += ",spagobiusr=\""+(String)profile.getUserUniqueIdentifier()+"\"";       
            jpaloUrl += ",spagobidoc=\""+documentId+"\"";
          }
          if(isSpagoBIDev != null){
            jpaloUrl += ",isdeveloper=\""+isSpagoBIDev+"\"";
          }         
         
      }else{
        Content templateContent = contentProxy.readTemplate(documentId,new HashMap());
 
        byte[] byteContent = null;
        try {
          BASE64Decoder bASE64Decoder = new BASE64Decoder();
          byteContent = bASE64Decoder.decodeBuffer(templateContent.getContent());
          String xmlSourceBean = new String(byteContent);
          SourceBean sb =SourceBean.fromXMLString(xmlSourceBean);
          template = new JPaloEngineTemplate(sb);   
         
          if(template == null){
              if(documentId != null && profile != null){
                jpaloUrl += ",spagobiusr=\""+(String)profile.getUserUniqueIdentifier()+"\"";       
                jpaloUrl += ",spagobidoc=\""+documentId+"\"";
              }
              if(isSpagoBIDev != null){
                jpaloUrl += ",isdeveloper=\""+isSpagoBIDev+"\"";
             
          }else{
            //looks for cube name to create view
            //NB: methods to create view dinamically available only if already logged in Jpalo
            String cubeName = template.getCubeName();
   
            //adds information about spagobi context of execution
              if(documentId != null && profile != null){
                jpaloUrl += ",spagobiusr=\""+(String)profile.getUserUniqueIdentifier()+"\"";       
                jpaloUrl += ",spagobidoc=\""+documentId+"\"";
              }
              if(subobj != null){
                jpaloUrl += ",spagobisubobj=\""+subobj+"\"";
              }
View Full Code Here

  }

  public void saveSubObject(RequestContext reqContext){
    HttpSession session = reqContext.getSession();
    String documentId=(String)session.getAttribute("document");
    IEngUserProfile profile=(IEngUserProfile)session.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    String user = (String)((UserProfile) profile).getUserId();
    String userUniqueIdentifier = (String)((UserProfile) profile).getUserUniqueIdentifier();
    OlapModel olapModel = (OlapModel) session.getAttribute("query01");
    String query = null;
    MdxQuery mdxQuery = (MdxQuery) olapModel.getExtension("mdxQuery");
View Full Code Here

            null);
      }
     
      SessionContainer sessionContainer = this.getRequestContainer().getSessionContainer();
      SessionContainer permanentContainer = sessionContainer.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile) permanentContainer.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      if (profile == null) {
        throw new SecurityException("User profile not found in session");
      }
     
      String documentId = (String)request.getAttribute("documentId");
      if (documentId == null)
        throw new Exception("Document id missing!!");
      logger.debug("Got parameter documentId = " + documentId);
     
      ContentServiceImplSupplier c = new ContentServiceImplSupplier();
      Content template = c.readTemplate(profile.getUserUniqueIdentifier().toString(), documentId, null);
      String templateFileName = template.getFileName();
 
      logger.debug("Template Read");
 
      if(templateFileName==null){
View Full Code Here

  }
 
  public void saveSubObject(RequestContext reqContext){
    HttpSession session = reqContext.getSession();
    String documentId=(String)session.getAttribute("document");
    IEngUserProfile profile=(IEngUserProfile)session.getAttribute(IEngUserProfile.ENG_USER_PROFILE);

    //String user = (String) profile.getUserUniqueIdentifier();
    String user = (String)((UserProfile) profile).getUserId();
    String userUniqueIdentifier = (String)((UserProfile) profile).getUserUniqueIdentifier();
    OlapModel olapModel = (OlapModel) session.getAttribute("query01");
View Full Code Here

  @Override
  public void doService() {
    logger.debug("IN");
    IDataSetDAO dsDao;
    IEngUserProfile profile = getUserProfile();
    try {
      dsDao = DAOFactory.getDataSetDAO();
      dsDao.setUserProfile(profile);
    } catch (EMFUserError e1) {
      logger.error(e1.getMessage(), e1);
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

     
      id = (String) request.getAttribute("DL_ID");
      email = (String)request.getAttribute("EMAIL");
      submessagedet = (String)request.getAttribute("SUBMESSAGEDET");
     
      IEngUserProfile profile=UserUtilities.getUserProfile();

      if (profile!=null) userId=(String)((UserProfile)profile).getUserId();
      //load the dl
      dl = DAOFactory.getDistributionListDAO().loadDistributionListById(new Integer(id));
      //load the user
View Full Code Here

   */  
  private void unsubscribeFromDistributionList(SourceBean request, String mod,SourceBean responsethrows EMFUserError, SourceBeanException {   
    try {
      String id = (String) request.getAttribute("DL_ID");
      this.modalita = SpagoBIConstants.DETAIL_UNSUBSC;
      IEngUserProfile userProfile = UserUtilities.getUserProfile();
      String userId = (String)((UserProfile)userProfile).getUserId();
      //load the dl
      DistributionList dl = DAOFactory.getDistributionListDAO().loadDistributionListById(new Integer(id));

      DAOFactory.getDistributionListDAO().unsubscribeFromDistributionList(dl, userId);
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.