Examples of longName()


Examples of org.sonar.api.component.Component.longName()

      String componentKey = entry.getKey();
      Integer ref = entry.getValue();
      Component file = componentsByKey.get(componentKey);
      json.name(Integer.toString(ref)).beginObject();
      json.prop("key", file.key());
      json.prop("longName", file.longName());
      json.endObject();
    }
    json.endObject();
  }
}
View Full Code Here

Examples of org.sonar.api.component.Component.longName()

    for (TestCase testCase : testPlan.testCasesByName(test)) {
      for (CoverageBlock coverageBlock : testCase.coverageBlocks()) {
        json.beginObject();
        Component file = coverageBlock.testable().component();
        json.prop("key", file.key());
        json.prop("longName", file.longName());
        json.prop("coveredLines", coverageBlock.lines().size());
        json.endObject();
      }
    }
    json.endArray();
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    boolean displaySubProject = subProject != null && !subProject.getId().equals(project.getId());

    json.prop("subProject", displaySubProject ? subProject.key() : null);
    json.prop("subProjectName", displaySubProject ? subProject.longName() : null);
    json.prop("project", project.key());
    json.prop("projectName", project.longName());

    json.prop("fav", isFavourite);
  }

  private void appendTabs(JsonWriter json, Map<String, MeasureDto> measuresByMetricKey) {
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    assertThat(result.subProjectId()).isEqualTo(2);
    assertThat(result.projectUuid()).isEqualTo("ABCD");
    assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
    assertThat(result.qualifier()).isEqualTo("FIL");
    assertThat(result.scope()).isEqualTo("FIL");
    assertThat(result.language()).isEqualTo("java");
  }
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    ComponentDto result = dao.getNullableByKey(session, "org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result).isNotNull();
    assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
    assertThat(result.qualifier()).isEqualTo("FIL");
    assertThat(result.scope()).isEqualTo("FIL");
    assertThat(result.language()).isEqualTo("java");
    assertThat(result.subProjectId()).isEqualTo(2);
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    assertThat(result).isNotNull();
    assertThat(result.key()).isEqualTo("org.struts:struts");
    assertThat(result.deprecatedKey()).isEqualTo("org.struts:struts");
    assertThat(result.path()).isNull();
    assertThat(result.name()).isEqualTo("Struts");
    assertThat(result.longName()).isEqualTo("Apache Struts");
    assertThat(result.qualifier()).isEqualTo("TRK");
    assertThat(result.scope()).isEqualTo("PRJ");
    assertThat(result.language()).isNull();
    assertThat(result.subProjectId()).isNull();
    assertThat(result.getAuthorizationUpdatedAt()).isEqualTo(DateUtils.parseDate("2014-06-18"));
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    ComponentDto component = dbClient.componentDao().getByUuid(session, issue.componentUuid());
    Long subProjectId = component.subProjectId();
    ComponentDto subProject = subProjectId != null ? dbClient.componentDao().getNullableById(subProjectId, session) : null;
    ComponentDto project = dbClient.componentDao().getByUuid(session, component.projectUuid());

    String projectName = project.longName() != null ? project.longName() : project.name();
    // Do not display sub project long name if sub project and project are the same
    boolean displaySubProjectLongName = subProject != null && !subProject.getId().equals(project.getId());
    String subProjectName = displaySubProjectLongName ? subProject.longName() != null ? subProject.longName() : subProject.name() : null;

    json
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    ComponentDto component = dbClient.componentDao().getByUuid(session, issue.componentUuid());
    Long subProjectId = component.subProjectId();
    ComponentDto subProject = subProjectId != null ? dbClient.componentDao().getNullableById(subProjectId, session) : null;
    ComponentDto project = dbClient.componentDao().getByUuid(session, component.projectUuid());

    String projectName = project.longName() != null ? project.longName() : project.name();
    // Do not display sub project long name if sub project and project are the same
    boolean displaySubProjectLongName = subProject != null && !subProject.getId().equals(project.getId());
    String subProjectName = displaySubProjectLongName ? subProject.longName() != null ? subProject.longName() : subProject.name() : null;

    json
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    ComponentDto result = results.get(0);
    assertThat(result).isNotNull();
    assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
    assertThat(result.qualifier()).isEqualTo("FIL");
    assertThat(result.scope()).isEqualTo("FIL");
    assertThat(result.language()).isEqualTo("java");
    assertThat(result.subProjectId()).isEqualTo(2);
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.longName()

    assertThat(result.subProjectId()).isEqualTo(2);
    assertThat(result.projectUuid()).isEqualTo("ABCD");
    assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
    assertThat(result.qualifier()).isEqualTo("FIL");
    assertThat(result.scope()).isEqualTo("FIL");
    assertThat(result.language()).isEqualTo("java");

    assertThat(dao.getByUuids(session, newArrayList("unknown"))).isEmpty();
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.