Package it.eng.spagobi.kpi.ou.bo

Examples of it.eng.spagobi.kpi.ou.bo.OrganizationalUnitGrantNode


        setOUAbilitated(miId, parKpiOuLabel, paramLabelHierarchy);
       
        if(ouList != null && !ouList.isEmpty()){
          if(use_ou){
            for(int i = 0; i<ouList.size(); i++){
              OrganizationalUnitGrantNode grantNode = ouList.get(i);
              String ouLabel = grantNode.getOuNode().getOu().getLabel();
              String hierLabel = grantNode.getOuNode().getHierarchy().getLabel();
              if(parKpiOuLabel == null){
                this.parametersObject.put("ParKpiOU", ouLabel);
                this.parametersObject.put("ParKpiHierarchy", hierLabel);
              }
View Full Code Here


   

    if(ouList != null && !ouList.isEmpty()){
      if(use_ou){
        for(int i = 0; i<ouList.size(); i++){
          OrganizationalUnitGrantNode grantNode = (OrganizationalUnitGrantNode)ouList.get(i);
          String ouLabel =grantNode.getOuNode().getOu().getLabel();
          String hierLabel =grantNode.getOuNode().getHierarchy().getLabel();
          if(parKpiOuLabel == null){
            this.parametersObject.put("ParKpiOU", ouLabel);
            this.parametersObject.put("ParKpiHierarchy", hierLabel);
          }
          value = getValueDependingOnBehaviour(kpiI, miId, r, alreadyExistent , grantNode);
View Full Code Here

    //looks up for OU grants
    logger.debug("this is hierarchy:"+paramLabelHierarchy);
    List<OrganizationalUnitGrantNode> grants = DAOFactory.getOrganizationalUnitDAO().getGrantsValidByDate(miId, dateOfKPI);
    if(grants != null){
      for(int i = 0; i<grants.size(); i++){       
        OrganizationalUnitGrantNode grantNode = grants.get(i);
        OrganizationalUnitGrant grant = grantNode.getGrant();       
        OrganizationalUnitHierarchy hier = grant.getHierarchy();
        if(paramLabelOU == null){
          //scheduling mode
          if(executionModalityScheduler){
            //than all OU valid by date are filling
View Full Code Here

  }
  private KpiValue getValueDependingOnBehaviour(KpiInstance kpiI,Integer miId, Resource r, boolean alreadyExistent, OrganizationalUnitGrantNode grantNode) throws EMFUserError, EMFInternalError, SourceBeanException{
    logger.debug("IN");
    KpiValue value = new KpiValue();
    boolean no_period_to_period = false;
    OrganizationalUnitGrantNode grantNodeToUse = null;
    if(grantNode != null && use_ou){
      grantNodeToUse = grantNode;
    }
    if(alreadyExistent){//use diplay behaviour since value already exists
      logger.debug("Display behaviour");
View Full Code Here

                          ) throws EMFUserError, EMFInternalError, SourceBeanException{
    logger.debug("IN");
    List <KpiRel> relations = DAOFactory.getKpiDAO().loadKpiRelListByParentId(kpiParent.getKpiId());
    logger.info("extracts relations for kpi parent : "+kpiParent.getKpiName());
    KpiDAOImpl kpiDao = (KpiDAOImpl)DAOFactory.getKpiDAO();
    OrganizationalUnitGrantNode ouGrant = kVal.getGrantNodeOU();
    String ouLabel = "";
    if(ouGrant != null){
      ouLabel = ouGrant.getOuNode().getOu().getLabel();
    }
    logger.debug("kpi inst id= "+kVal.getKpiInstanceId()+" parent kpi is "+ kpiParent.getKpiName()+" and OU :"+ ouLabel);
    for(int i= 0; i< relations.size(); i++){
      KpiRel rel = relations.get(i);
      Kpi child = rel.getKpiChild();
View Full Code Here

      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiOrgUnitGrant hibGrant = (SbiOrgUnitGrant) aSession.load(SbiOrgUnitGrant.class, grantId);
      Iterator<OrganizationalUnitGrantNode> it = grantNodes.iterator();
      while (it.hasNext()) {
        OrganizationalUnitGrantNode aGrantNode = it.next();

        Integer hierarchyNodeId = aGrantNode.getOuNode().getNodeId();
        Integer kpiModelInstNodeId = aGrantNode.getModelInstanceNode().getModelInstanceNodeId();
       
        SbiOrgUnitGrantNodes grantNode = new SbiOrgUnitGrantNodes();
     
        SbiOrgUnitGrantNodesId grantNodeId = new SbiOrgUnitGrantNodesId(hierarchyNodeId, kpiModelInstNodeId, grantId);
        grantNode.setId(grantNodeId);
View Full Code Here

      modelInstanceNode = ModelInstanceDAOImpl.toModelInstanceNode(hibGrantNode.getSbiKpiModelInst());
    } catch (EMFUserError e) {
      throw new RuntimeException(e);
    }
    OrganizationalUnitGrant grant = toOrganizationalUnitGrant(hibGrantNode.getSbiOrgUnitGrant(), aSession);
    OrganizationalUnitGrantNode grantNode = new OrganizationalUnitGrantNode(ouNode, modelInstanceNode, grant);
    return grantNode;
  }
View Full Code Here

      // TODO serialize hierarchy?
     
      JSONArray modelInstanceNodesIds = new JSONArray();
      Iterator<OrganizationalUnitGrantNode> it = nodeGrants.iterator();
      while (it.hasNext()) {
        OrganizationalUnitGrantNode grant = it.next();
        modelInstanceNodesIds.put(grant.getModelInstanceNode().getModelInstanceNodeId());
      }
      result.put(MODEL_INSTANCE_NODES, modelInstanceNodesIds);
     
     
    } catch (Throwable t) {
View Full Code Here

        logger.debug("Resource: "
            + (r.getName() != null ? r.getName()
                : "Resource name null"));
        hibKpiValue.setSbiResources(sbiResources);
      }
      OrganizationalUnitGrantNode grantNode = value.getGrantNodeOU();
      if (grantNode != null) {
        OrganizationalUnit ou = grantNode.getOuNode().getOu();
        SbiOrgUnit hibOU = new SbiOrgUnit();
        hibOU.setLabel(ou.getLabel());
        hibOU.setName(ou.getName());
        hibOU.setDescription(ou.getDescription());
        hibOU.setId(ou.getId());
       
        logger.debug("Organizational unit: "
            + (ou.getName() != null ? ou.getName()
                : "OU name null"));
        hibKpiValue.setSbiOrgUnit(hibOU);
        //same for hierarchy
        OrganizationalUnitHierarchy hier = grantNode.getOuNode().getHierarchy();
        SbiOrgUnitHierarchies hibHier = new SbiOrgUnitHierarchies();
        hibHier.setDescription(hier.getDescription());
        hibHier.setId(hier.getId());
        hibHier.setLabel(hier.getLabel());
        hibHier.setName(hier.getName());
View Full Code Here

    logger.debug("Kpi value Thresholds setted");
    toReturn.setKpiValueId(value.getIdKpiInstanceValue());
    logger.debug("Kpi value ID setted");
    toReturn.setValueXml(value.getXmlData());
    logger.debug("Kpi value XML setted");
    OrganizationalUnitGrantNode grantNode = new OrganizationalUnitGrantNode();
    OrganizationalUnitNode node = new OrganizationalUnitNode();
    if(value.getSbiOrgUnit() != null){
      OrganizationalUnit ou = DAOFactory.getOrganizationalUnitDAO().getOrganizationalUnit(value.getSbiOrgUnit().getId());
      node.setOu(ou);
    }
    if(value.getSbiOrgUnitHierarchies() != null){
      OrganizationalUnitHierarchy hierarchy = DAOFactory.getOrganizationalUnitDAO().getHierarchy(value.getSbiOrgUnitHierarchies().getId());
      node.setHierarchy(hierarchy);
    }
    if(value.getSbiOrgUnit() != null && value.getSbiOrgUnitHierarchies() != null){
      grantNode.setOuNode(node);
      toReturn.setGrantNodeOU(grantNode);
    }

    logger.debug("Kpi value organizational unit grant node setted");
View Full Code Here

TOP

Related Classes of it.eng.spagobi.kpi.ou.bo.OrganizationalUnitGrantNode

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.