Examples of Kpi


Examples of it.eng.spagobi.kpi.config.bo.Kpi

      temp.put("ParKpiInstance", kpiInstanceID.toString());
      // If not, the dataset will be calculated without the parameter Resource
      // and the DataSet won't expect a parameter of type resource
      //if(dataSet.hasBehaviour( QuerableBehaviour.class.getName()) ) {
      if(dataSet!=null){
        Kpi kpi = DAOFactory.getKpiDAO().loadKpiById(kpiI.getKpi());
        //if parameter exists and OU is abilitaded for Model Instance, than calculate as dataset parameter
        String parKpiOuLabel = (String)this.parametersObject.get("ParKpiOU");
        logger.info("Got ParKpiOU: " + parKpiOuLabel);
       
        String paramLabelHierarchy = (String)this.parametersObject.get("ParKpiHierarchy");
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Kpi

      KpiValue value = null;
     
      line = retrieveKpiLine(line, value, kpiI, miId, r, alreadyExistent);
     
      Integer kpiId = kpiI.getKpi();
      Kpi k = DAOFactory.getKpiDAO().loadKpiById(kpiId);
      logger.debug("Retrieved the kpi with id: " + kpiId.toString());
           
      if (k != null) {
        List docs = k.getSbiKpiDocuments();

        Iterator it = docs.iterator();
        List documents = new ArrayList();
        while(it.hasNext()){
          KpiDocuments doc = (KpiDocuments)it.next();
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Kpi

   
    // If not, the dataset will be calculated without the parameter Resource
    // and the DataSet won't expect a parameter of type resource
    //if(dataSet.hasBehaviour( QuerableBehaviour.class.getName()) ) {
    if(dataSet!=null){
      Kpi kpi = DAOFactory.getKpiDAO().loadKpiById(kpiInst.getKpi());
     
      if(behaviour.equalsIgnoreCase("timeIntervalDefault") || behaviour.equalsIgnoreCase("timeIntervalForceRecalculation")){
        if(dateIntervalFrom!=null && dateIntervalTo!=null){
          kVal.setBeginDate(dateIntervalFrom);
          kVal.setEndDate(dateIntervalTo);
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Kpi

      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();
      IDataSet chDataSet = kpiDao.getDsFromKpiId(child.getKpiId());
      HashMap chPars  = new HashMap();
      chPars.putAll(pars);
      //then the one in rel table
      String parameter = rel.getParameter();
      KpiValue kpiVal = recursiveGetKpiValueFromKpiRel(child, chDataSet, chPars, kVal, begD, endDate, modInstNodeId);
View Full Code Here

Examples of org.jboss.dashboard.kpi.KPI

            Set<Section> sections = getSelectedSections(workspace);
            for (Section section : sections) {
                Dashboard dash = dashboardHandler.getDashboard(section);
                Iterator it = section.getPanels().iterator();
                while (it.hasNext()) {
                    KPI kpi = dash.getKPI((Panel) it.next());
                    if (kpi != null && !results.contains(kpi)) results.add(kpi);
                }
            }
        }
        final Locale l = LocaleManager.currentLocale();
        Collections.sort(results, new Comparator() {
            public int compare(Object o1, Object o2) {
                KPI s1 = (KPI) o1;
                KPI s2 = (KPI) o2;
                return s1.getDescription(l).compareTo(s2.getDescription(l));
            }
        });
        return results;
    }
View Full Code Here

Examples of org.jboss.dashboard.kpi.KPI

    public List<KPI> getSelectedKPIs(DataProvider dataProvider) throws Exception {
        List<KPI> results = getSelectedKPIs();
        Iterator<KPI> it = results.iterator();
        while (it.hasNext()) {
            KPI kpi = it.next();
            if (kpi != null && !kpi.getDataProvider().equals(dataProvider)) {
                it.remove();
            }
        }
        return results;
    }
View Full Code Here

Examples of org.jboss.dashboard.kpi.KPI

    public Set<DataProvider> getDataProviders() {
        Set<DataProvider> results = new HashSet<DataProvider>();
        Iterator it = getSection().getPanels().iterator();
        while (it.hasNext()) {
            KPI kpi = getKPI((Panel) it.next());

            // The KPI is null if the panel is not assigned to a region.
            if (kpi != null) results.add(kpi.getDataProvider());
        }
        return results;
    }
View Full Code Here

Examples of org.jboss.dashboard.kpi.KPI

                        int numberOfKPIs = 0;
                        setAttribute("usedByOtherKpis", Boolean.FALSE);
                        Iterator it1 = kpis.iterator();
                        while (it1.hasNext()) {
                            KPI kpi = (KPI) it1.next();
                            if (kpi.getDataProvider().equals(dataProvider)) numberOfKPIs++;
                        }

                        String providerType = dataProvider.getDataProviderType().getDescription(getLocale());
                        ResourceBundle i18n = localeManager.getBundle("org.jboss.dashboard.displayer.messages", getLocale());
                        String deleteMessage = i18n.getString(DataProviderHandler.I18N_PREFFIX + "confirmDelete");
View Full Code Here

Examples of org.jboss.dashboard.kpi.KPI

    protected void beforeRenderPanel(Panel panel, HttpServletRequest req, HttpServletResponse res) {
        super.beforeRenderPanel(panel, req, res);

        // Ensure the KPI editor/viewer component is initialized (at session level).
        KPI kpi = null;
        try {
            kpi = getKPI(panel);
        } catch (Exception e) {
            log.error("Error: ",e);
        }
View Full Code Here

Examples of org.jboss.dashboard.kpi.KPI

    }


    protected void beforePanelInstanceRemove(PanelInstance instance) throws Exception {
        // Delete from persistence the KPI attached to the panel.
        KPI kpi = DashboardHandler.lookup().getKPI(instance);

        // Only delete not null KPIs based on deleteable providers.
        if (kpi != null && kpi.getDataProvider().isCanDelete()) {

            // Only delete the KPI if not referred by other panels.
            PanelsManager panelsManager = UIServices.lookup().getPanelsManager();
            Set<PanelInstance> panels = panelsManager.getPanelsByParameter(DashboardHandler.KPI_CODE, kpi.getCode());
            if (panels.size() == 1) {
                kpi.delete();
            }
        }
    }
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.