Package com.dianping.cat.core.dal

Examples of com.dianping.cat.core.dal.Project


    }

    for (ScheduledReport report : reports) {
      try {
        String domain = report.getDomain();
        Project project = m_projectService.findByDomain(domain);

        if (project == null) {
          project = m_projectService.findByCmdbDomain(domain);
        }

        if (project != null) {
          String cmdbDomain = project.getCmdbDomain();

          if (StringUtils.isNotEmpty(cmdbDomain) && !report.getDomain().equals(cmdbDomain)
                && !m_reports.containsKey(cmdbDomain)) {
            ScheduledReport entity = m_scheduledReportDao.createLocal();
View Full Code Here


  public Map<String, Department> getDepartment(Collection<String> domains) {
    Map<String, Department> result = new TreeMap<String, Department>();

    for (String domain : domains) {
      Project project = findProject(domain);
      String department = DEFAULT;
      String projectLine = DEFAULT;

      if (project != null) {
        department = project.getBu() == null ? DEFAULT : project.getBu();
        projectLine = project.getCmdbProductline() == null ? DEFAULT : project.getCmdbProductline();
      }
      Department temp = result.get(department);

      if (temp == null) {
        temp = new Department();
View Full Code Here

    return result;
  }

  private Project findProject(String domain) {
    Project project = m_projects.get(domain);

    if (project == null) {
      project = m_cmdbProjects.get(domain);
    }
    return project;
View Full Code Here

    UtilizationReport report = m_reportService.queryUtilizationReport(Constants.CAT, pair.getKey(), pair.getValue());
    Collection<com.dianping.cat.home.utilization.entity.Domain> domains = report.getDomains().values();

    for (com.dianping.cat.home.utilization.entity.Domain d : domains) {
      String domain = d.getId();
      Project project = m_projectService.findByDomain(domain);

      if (project != null) {
        d.setCmdbId(project.getCmdbDomain());
      }
    }
    return report;
  }
View Full Code Here

    @Override
    public void visitExceptionItem(ExceptionItem exceptionItem) {
      String exception = exceptionItem.getId();
      int count = exceptionItem.getCount();
      Project project = m_projectService.findByDomain(m_currentDomain.getId());

      if (project != null) {
        String productLine = project.getProjectLine();
        String department = project.getDepartment();
        ErrorStatis statis = findOrCreateErrorStatis(productLine);

        statis.setDepartment(department);
        statis.setProductLine(productLine);
        m_currentDomain.setDepartment(department);
View Full Code Here

  public String getDepartment() {
    String domain = getDomain();

    if (domain != null && m_manager != null) {
      Project project = m_manager.getProjectByName(domain);
      if (project != null) {
        return project.getDepartment();
      }
    }
    return "Default";
  }
View Full Code Here

  public String getProjectLine() {
    String domain = getDomain();

    if (domain != null && m_manager != null) {
      Project project = m_manager.getProjectByName(domain);
      if (project != null) {
        return project.getProjectLine();
      }
    }
    return "Default";
  }
View Full Code Here

    return buildChartData(productLine, oldCurrentValues, startDate, endDate, dataWithOutFutures);
  }

  protected String buildContactInfo(String domainName) {
    try {
      Project project = m_projectService.findByDomain(domainName);

      if (project != null) {
        String owners = project.getOwner();
        String phones = project.getPhone();
        StringBuilder builder = new StringBuilder();

        if (!StringUtils.isEmpty(owners)) {
          builder.append("[负责人: ").append(owners);
        }
View Full Code Here

    Iterator<Entry<String, Project>> iterator = m_projects.entrySet().iterator();
    String domainName = null;

    while (iterator.hasNext()) {
      Entry<String, Project> entry = iterator.next();
      Project pro = entry.getValue();

      if (pro.getId() == id) {
        domainName = pro.getDomain();
        break;
      }
    }

    try {
View Full Code Here

    return m_projects;
  }

  public Project findByCmdbDomain(String domainName) {
    try {
      Project project = m_projectDao.findByDomain(domainName, ProjectEntity.READSET_FULL);
      return project;
    } catch (DalException e) {
    } catch (Exception e) {
      Cat.logError(e);
    }
View Full Code Here

TOP

Related Classes of com.dianping.cat.core.dal.Project

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.