Examples of SbiFunctions


Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

        return;
      }
      IDomainDAO domDAO = DAOFactory.getDomainDAO();
      Domain functTypeDom = domDAO.loadDomainByCodeAndValue("FUNCT_TYPE", funct.getCodType());
      SbiDomains hibFunctType = (SbiDomains)session.load(SbiDomains.class, functTypeDom.getValueId());
      SbiFunctions hibFunct = new SbiFunctions(funct.getId());
      hibFunct.setCode(funct.getCode());
      hibFunct.setDescr(funct.getDescription());
      hibFunct.setFunctTypeCd(funct.getCodType());
      hibFunct.setFunctType(hibFunctType);
      hibFunct.setName(funct.getName());
      hibFunct.setPath(funct.getPath());
      hibFunct.setProg(funct.getProg());
      session.save(hibFunct);
      tx.commit();
      Role[] devRoles = funct.getDevRoles();
      Domain devDom = domDAO.loadDomainByCodeAndValue(SpagoBIConstants.PERMISSION_ON_FOLDER,
          SpagoBIConstants.PERMISSION_ON_FOLDER_TO_DEVELOP);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      if(!hibList.isEmpty()) {
        return;
      }
      // built key
      SbiFuncRoleId hibFuncRoleId = new SbiFuncRoleId();
      SbiFunctions hibFunct = (SbiFunctions)session.load(SbiFunctions.class, funct.getId());
      SbiExtRoles hibRole = (SbiExtRoles)session.load(SbiExtRoles.class, role.getId());
      SbiDomains hibPermission = (SbiDomains)session.load(SbiDomains.class, permissionId);
      hibFuncRoleId.setFunction(hibFunct);
      hibFuncRoleId.setRole(hibRole);
      hibFuncRoleId.setState(hibPermission);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      if(!hibList.isEmpty()) {
        return;
      }
      // built key
      SbiObjFuncId hibObjFunctId = new SbiObjFuncId();
      SbiFunctions hibFunct = (SbiFunctions)session.load(SbiFunctions.class, funct.getId());
      SbiObjects hibObj = (SbiObjects)session.load(SbiObjects.class, biobj.getId());
      hibObjFunctId.setSbiObjects(hibObj);
      hibObjFunctId.setSbiFunctions(hibFunct);
      SbiObjFunc hibObjFunct = new SbiObjFunc(hibObjFunctId);
      hibObjFunct.setProg(new Integer(0));
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      return hibLov;
    } else if (hibObj instanceof SbiFunctions) {
      String code = (String) unique;
      hql = "from SbiFunctions f where f.code = '" + code + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiFunctions hibFunct = (SbiFunctions) hqlQuery.uniqueResult();
      return hibFunct;
    } else if (hibObj instanceof SbiEngines) {
      String label = (String) unique;
      hql = "from SbiEngines eng where eng.label = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      // functionalities storing
      Set hibObjFunc = new HashSet();
      List functionalities = biObject.getFunctionalities();
      for (Iterator it = functionalities.iterator(); it.hasNext(); ) {
        Integer functId = (Integer) it.next();
        SbiFunctions aSbiFunctions = (SbiFunctions) aSession.load(SbiFunctions.class, functId);
        SbiObjFuncId aSbiObjFuncId = new SbiObjFuncId();
        aSbiObjFuncId.setSbiFunctions(aSbiFunctions);
        aSbiObjFuncId.setSbiObjects(hibBIObject);
        SbiObjFunc aSbiObjFunc = new SbiObjFunc(aSbiObjFuncId);
        updateSbiCommonInfo4Update(aSbiObjFunc);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      // functionalities storing
      Set hibObjFunc = new HashSet();
      List functionalities = obj.getFunctionalities();
      for (Iterator it = functionalities.iterator(); it.hasNext(); ) {
        Integer functId = (Integer) it.next();
        SbiFunctions aSbiFunctions = (SbiFunctions) aSession.load(SbiFunctions.class, functId);
        SbiObjFuncId aSbiObjFuncId = new SbiObjFuncId();
        aSbiObjFuncId.setSbiFunctions(aSbiFunctions);
        aSbiObjFuncId.setSbiObjects(hibBIObject);
        SbiObjFunc aSbiObjFunc = new SbiObjFunc(aSbiObjFuncId);
        updateSbiCommonInfo4Insert(aSbiObjFunc);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      String permission = ObjectsAccessVerifier.getPermissionFromDocumentState(objectState);
      Set hibObjFuncs = hibBIObject.getSbiObjFuncs();
      Iterator itObjFunc = hibObjFuncs.iterator();
      while (itObjFunc.hasNext()) {
        SbiObjFunc aSbiObjFunc = (SbiObjFunc) itObjFunc.next();
        SbiFunctions aSbiFunctions = aSbiObjFunc.getId().getSbiFunctions();
        String funcTypeCd = aSbiFunctions.getFunctTypeCd();
        logger.debug("Folder type [" + funcTypeCd + "]");
        if(!funcTypeCd.equalsIgnoreCase("USER_FUNCT")){
          logger.debug("Folder id [" + aSbiFunctions.getFunctId() + "]");
          logger.debug("Document state [" + objectState + "]");
         
          String rolesHql = "select distinct roles.name from " +
          "SbiExtRoles as roles, SbiFuncRole as funcRole " +
          "where roles.extRoleId = funcRole.id.role.extRoleId and " +
          "     funcRole.id.function.functId = " + aSbiFunctions.getFunctId() + " and " +
          "     funcRole.id.state.valueCd = '" + permission + "' ";
          Query rolesHqlQuery = aSession.createQuery(rolesHql);
          // get the list of roles that can see the document (in REL or TEST state) in that functionality
          List rolesNames = new ArrayList();
          rolesNames = rolesHqlQuery.list();
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

   *
   * @return the new hibernate functionality object
   */
  public static SbiFunctions makeNewSbiFunction(SbiFunctions funct){
    logger.debug("IN");
    SbiFunctions newFunct = new SbiFunctions();
    newFunct.setCode(funct.getCode());
    newFunct.setDescr(funct.getDescr());
    newFunct.setFunctType(funct.getFunctType());
    newFunct.setFunctTypeCd(funct.getFunctTypeCd());
    newFunct.setName(funct.getName());
    newFunct.setParentFunct(funct.getParentFunct());
    newFunct.setPath(funct.getPath());
    logger.debug("OUT");
    return newFunct;
  }
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

   *
   * @return the new hibernate functionality object
   */
  public static SbiFunctions makeNewSbiFunction(SbiFunctions funct, Integer id){
    logger.debug("IN");
    SbiFunctions newFunct = makeNewSbiFunction(funct);
    newFunct.setFunctId(id);
    logger.debug("OUT");
    return newFunct;
  }
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.functionalitytree.metadata.SbiFunctions

      Integer newFunctid, Integer newRoleid) {
    logger.debug("IN");
    SbiFuncRoleId functroleid = functrole.getId();
    SbiFuncRoleId newFunctroleid = new SbiFuncRoleId();
    if (newFunctid != null) {
      SbiFunctions sbifunct = functroleid.getFunction();
      SbiFunctions newFunct = ImportUtilities.makeNewSbiFunction(sbifunct, newFunctid);
      newFunctroleid.setFunction(newFunct);
    }
    if (newRoleid != null) {
      SbiExtRoles sbirole = functroleid.getRole();
      SbiExtRoles newRole = ImportUtilities.makeNewSbiExtRole(sbirole, newRoleid);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.