Package com.dianping.cat.core.dal

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


    }
    return null;
  }

  public Project findByDomain(String domainName) {
    Project project = m_projects.get(domainName);

    if (project != null) {
      return project;
    } else {
      try {
        Project pro = m_projectDao.findByDomain(domainName, ProjectEntity.READSET_FULL);

        m_projects.put(pro.getDomain(), pro);
        return project;
      } catch (DalException e) {
      } catch (Exception e) {
        Cat.logError(e);
      }
View Full Code Here


  public Project findProject(int id) {
    Iterator<Entry<String, Project>> iterator = m_projects.entrySet().iterator();

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

      if (pro.getId() == id) {
        return pro;
      }
    }

    try {
      Project project = m_projectDao.findByPK(id, ProjectEntity.READSET_FULL);

      m_projects.put(project.getDomain(), project);
      return project;
    } catch (DalNotFoundException e) {
    } catch (Exception e) {
      Cat.logError(e);
    }
View Full Code Here

      return false;
    }
  }

  public boolean insertDomain(String domain) {
    Project project = createLocal();

    project.setDomain(domain);
    project.setProjectLine("Default");
    project.setDepartment("Default");
    try {
      insert(project);
      m_domains.add(domain);

      return true;
View Full Code Here

    } else {
      weixinReceivers.addAll(buildDefaultWeixinReceivers(receiver));

      String domain = queryDomainByCommand(id);
      if (StringUtils.isNotEmpty(domain)) {
        Project project = m_projectService.findByDomain(domain);

        if (project != null) {
          weixinReceivers.addAll(split(project.getEmail()));
        }
      }
      return weixinReceivers;
    }
  }
View Full Code Here

    } else {
      smsReceivers.addAll(buildDefaultSMSReceivers(receiver));

      String domain = queryDomainByCommand(id);
      if (StringUtils.isNotEmpty(domain)) {
        Project project = m_projectService.findByDomain(domain);

        if (project != null) {
          smsReceivers.addAll(split(project.getPhone()));
        }
      }
      return smsReceivers;
    }
  }
View Full Code Here

    } else {
      mailReceivers.addAll(buildDefaultMailReceivers(receiver));

      String domain = queryDomainByUrl(id);
      if (StringUtils.isNotEmpty(domain)) {
        Project project = m_projectService.findByDomain(domain);
        if (project != null) {
          mailReceivers.addAll(split(project.getEmail()));
        }
      }
      return mailReceivers;
    }
  }
View Full Code Here

    } else {
      weixinReceivers.addAll(buildDefaultWeixinReceivers(receiver));

      String domain = queryDomainByUrl(id);
      if (StringUtils.isNotEmpty(domain)) {
        Project project = m_projectService.findByDomain(domain);

        if (project != null) {
          weixinReceivers.addAll(split(project.getEmail()));
        }
      }
      return weixinReceivers;
    }
  }
View Full Code Here

    } else {
      smsReceivers.addAll(buildDefaultSMSReceivers(receiver));

      String domain = queryDomainByUrl(id);
      if (StringUtils.isNotEmpty(domain)) {
        Project project = m_projectService.findByDomain(domain);

        if (project != null) {
          smsReceivers.addAll(split(project.getPhone()));
        }
      }
      return smsReceivers;
    }
  }
View Full Code Here

  @Inject
  private DomainGroupConfigManager m_domainGroupConfigManger;

  private void deleteProject(Payload payload) {
    Project proto = new Project();
    int id = payload.getProjectId();

    proto.setId(id);
    proto.setKeyId(id);
    m_projectService.deleteProject(proto);
  }
View Full Code Here

    }
    return result;
  }

  private Project queryProjectById(int projectId) {
    Project project = null;
    try {
      project = m_projectService.findProject(projectId);
    } 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.