Package it.eng.spagobi.analiticalmodel.functionalitytree.bo

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.bo.LowFunctionality


    folder.setBiObjects(releasedObjects);
    // iterator on the child folders
    List subFolders = functionDAO.loadChildFunctionalities(folder.getId(), false);
    it = subFolders.iterator();
    while (it.hasNext()) {
      LowFunctionality aSubFolder = (LowFunctionality) it.next();
      findsExecutionTree(aSubFolder);
    }
   
  }
View Full Code Here


        logger.debug("Object deleted by administrator")
      }
      else
      {
        ILowFunctionalityDAO functDAO = DAOFactory.getLowFunctionalityDAO();
        LowFunctionality lowFunc = functDAO.loadLowFunctionalityByID(fId, false);

        if(lowFunc==null){
          logger.error("Functionality does not exist");
          throw new Exception("Functionality does not exist");         
        }

        if(lowFunc.getPath().equals("/"+userId)){ // folder is current user one
          biobjdao.eraseBIObject(obj, fId);
          logger.debug("Object deleted");
        }
        else{
          logger.error("Functionality is not user's one");
View Full Code Here

      }
     
      logger.debug("Access to the database");
      LowFunctionalityDAOHibImpl lowFunctionalityDAOHibImpl = new LowFunctionalityDAOHibImpl();
      boolean exists = lowFunctionalityDAOHibImpl.checkUserRootExists(userId);
      LowFunctionality lf = null;
      if (exists) {
        logger.debug("Personal Folder found")
      }
      else {
        logger.debug("Personal Folder not found, now will be created")
        UserUtilities.createUserFunctionalityRoot(profile);
        logger.debug("Personal Folder created")
        if(!(lowFunctionalityDAOHibImpl.checkUserRootExists(userId)))
        throw new Exception("Personal Folder doesn't exists or could not be created");

      }
      lf = lowFunctionalityDAOHibImpl.loadLowFunctionalityByPath("/" + userId, false);
     
      Integer idFunction = lf.getId();
      if (idFunction == null) {
        logger.error("No function associated");
        throw new Exception("No function associated");
      }
View Full Code Here

            throw new SpagoBIServiceException(SERVICE_NAME, "Error to delete Document", e);
          }
        } else {
          String userId = ((UserProfile)userProfile).getUserId().toString();
          ILowFunctionalityDAO functDAO = DAOFactory.getLowFunctionalityDAO();
          LowFunctionality lowFunc = functDAO.loadLowFunctionalityByID(iFunc, false);

          if(lowFunc==null){
            logger.error("Functionality does not exist");
            throw new Exception("Functionality does not exist");         
          }

          if(lowFunc.getPath().equals("/"+userId)){ // folder is current user one
            dao.eraseBIObject(biObject, iFunc);
            logger.debug("Object deleted");
          }
          else{
            logger.error("Functionality is not user's one");
View Full Code Here

      logger.debug("Parameter [" + SpagoBIConstants.SCOPE + "] is equal to [" + scope + "]"); //'node' or 'tree'
     
      folderID = folderID!=null? folderID: rootFolderID;
     
      //getting default folder (root)
      LowFunctionality rootFunct = DAOFactory.getLowFunctionalityDAO().loadRootLowFunctionality(false);
      if (folderID == null || folderID.equalsIgnoreCase(ROOT_NODE_ID))
        folderID = String.valueOf(rootFunct.getId());
           
      SessionContainer sessCont = getSessionContainer();
      SessionContainer permCont = sessCont.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permCont.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
     
View Full Code Here

      boolean isVisible = false;
      List functionalitiesId = obj.getFunctionalities();
      Iterator it = functionalitiesId.iterator();
      while (it.hasNext()) {
        Integer id = (Integer) it.next();
        LowFunctionality folder = DAOFactory.getLowFunctionalityDAO().loadLowFunctionalityByID(id, false);
        String folderPath = folder.getPath();
        if (folderPath.equalsIgnoreCase(initialPath) || folderPath.startsWith(initialPath + "/")) {
          isVisible = true;
          break;
        }
      }
View Full Code Here

      logger.debug("Parameter [" + FOLDER_ID + "] is equal to [" + functID + "]");
      logger.debug("Parameter [" + ROOT_FOLDER_ID + "] is equal to [" + rootFolderID + "]");
     
      if (functID == null || functID.equalsIgnoreCase(ROOT_NODE_ID)){
        //getting default folder (root)
        LowFunctionality rootFunct = DAOFactory.getLowFunctionalityDAO().loadRootLowFunctionality(false);
        functionalities.add(rootFunct);
      } else {
        functionalities = DAOFactory.getLowFunctionalityDAO()
          .loadParentFunctionalities(Integer.valueOf(functID), (rootFolderID==null?null:Integer.valueOf(rootFolderID)) )
      }
View Full Code Here

          if (initialPath != null && !initialPath.trim().equals("")) {
            // in case of local administrator, deletes the document in the folders where he can admin
            List funcsId = obj.getFunctionalities();
            for (Iterator it = funcsId.iterator(); it.hasNext(); ) {
              Integer idFunct = (Integer) it.next();
              LowFunctionality folder = DAOFactory.getLowFunctionalityDAO().loadLowFunctionalityByID(idFunct, false);
              String folderPath = folder.getPath();
              if (folderPath.equalsIgnoreCase(initialPath) || folderPath.startsWith(initialPath + "/")) {
                objdao.eraseBIObject(obj, idFunct);
              }
            }
          } else {
View Full Code Here

      DocumentsBrowserConfig config = DocumentsBrowserConfig.getInstance();
      JSONObject jsonObj  = config.toJSON();
      String labelSubTreeNode = this.getAttributeAsString( LABEL_SUBTREE_NODE );
     
      if (labelSubTreeNode != null && !labelSubTreeNode.trim().equals("")) {
        LowFunctionality luwFunc = DAOFactory.getLowFunctionalityDAO().loadLowFunctionalityByPath(labelSubTreeNode, false);
        if(luwFunc != null) {
          jsonObj.put("rootFolderId", luwFunc.getId());
        }
       
      }
      response.setAttribute("metaConfiguration", jsonObj);     
    } catch (Throwable t) {
View Full Code Here

    context+="themes/"+currTheme+"/";
    htmlStream.append("        treeFunct = new dTree('treeFunct', '" + context + "');\n");
    htmlStream.append("            treeFunct.add(" + dTreeRootId + ",-1,'"+nameTree+"');\n");
    Iterator it = objectsList.iterator();
    while (it.hasNext()) {
      LowFunctionality folder = (LowFunctionality) 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);
      /*boolean isUserFunct = folder.getPath().startsWith("/"+((UserProfile)profile).getUserId());
         if(isUserFunct) {
           continue;
         }*/

      /* ********* end luca changes ***************** */
      if (initialPath != null) {
        if (initialPath.equalsIgnoreCase(folder.getPath())) addItemForJSTree(htmlStream, folder, true, profile);
        else addItemForJSTree(htmlStream, folder, false, profile);
      } else {
        if (folder.getParentId() == null) addItemForJSTree(htmlStream, folder, true, profile);
        else addItemForJSTree(htmlStream, folder, false, profile);
      }
    }
    //htmlStream.append("        document.write(treeFunct);\n");
    htmlStream.append("        document.getElementById('treeFoldersTd" + requestIdentity + "').innerHTML = treeFunct;\n");
View Full Code Here

TOP

Related Classes of it.eng.spagobi.analiticalmodel.functionalitytree.bo.LowFunctionality

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.