|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonar.api.batch.SonarIndex
org.sonar.batch.index.DefaultIndex
public class DefaultIndex
| Constructor Summary | |
|---|---|
DefaultIndex(PersistenceManager persistence,
DefaultResourceCreationLock lock,
ProjectTree projectTree,
MetricFinder metricFinder)
|
|
| Method Summary | ||
|---|---|---|
Dependency |
addDependency(Dependency dependency)
|
|
Event |
addEvent(Resource resource,
String name,
String description,
String category,
Date date)
|
|
void |
addLink(ProjectLink link)
|
|
Measure |
addMeasure(Resource resource,
Measure measure)
the measure is updated if it's already registered. |
|
Resource |
addResource(Resource resource)
Does nothing if the resource is already registered. |
|
void |
addViolation(Violation violation,
boolean force)
|
|
void |
clear()
Keep only project stuff |
|
void |
deleteEvent(Event event)
|
|
void |
deleteLink(String key)
|
|
List<Resource> |
getChildren(Resource resource)
|
|
List<Resource> |
getChildren(Resource resource,
boolean acceptExcluded)
|
|
Set<Dependency> |
getDependencies()
|
|
Dependency |
getEdge(Resource from,
Resource to)
|
|
List<Event> |
getEvents(Resource resource)
|
|
Collection<Dependency> |
getIncomingEdges(Resource to)
|
|
Measure |
getMeasure(Resource resource,
Metric metric)
|
|
|
getMeasures(Resource resource,
MeasuresFilter<M> filter)
|
|
Collection<Dependency> |
getOutgoingEdges(Resource from)
|
|
Resource |
getParent(Resource resource)
|
|
Project |
getProject()
|
|
|
getResource(R reference)
Search for an indexed resource. |
|
String |
getSource(Resource resource)
|
|
Set<Resource> |
getVertices()
|
|
List<Violation> |
getViolations(ViolationQuery violationQuery)
Returns the violations that match the ViolationQuery parameters. |
|
boolean |
hasEdge(Resource from,
Resource to)
|
|
boolean |
index(Resource resource)
Indexes a resource as a direct child of project. |
|
boolean |
index(Resource resource,
Resource parentReference)
Indexes a resource. |
|
boolean |
isExcluded(Resource reference)
Returns true if the referenced resource is excluded. |
|
boolean |
isIndexed(Resource reference,
boolean acceptExcluded)
|
|
void |
setCurrentProject(Project project,
ResourceFilters resourceFilters,
ViolationFilters violationFilters,
RulesProfile profile)
|
|
void |
setSource(Resource reference,
String source)
Save the source code of a file. |
|
void |
start()
|
|
| Methods inherited from class org.sonar.api.batch.SonarIndex |
|---|
addViolation, getIncomingDependencies, getOutgoingDependencies, getResources, getViolations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultIndex(PersistenceManager persistence,
DefaultResourceCreationLock lock,
ProjectTree projectTree,
MetricFinder metricFinder)
| Method Detail |
|---|
public void start()
public Project getProject()
getProject in class SonarIndex
public void setCurrentProject(Project project,
ResourceFilters resourceFilters,
ViolationFilters violationFilters,
RulesProfile profile)
public void clear()
public Measure getMeasure(Resource resource,
Metric metric)
getMeasure in class SonarIndex
public <M> M getMeasures(Resource resource,
MeasuresFilter<M> filter)
getMeasures in class SonarIndex
public Measure addMeasure(Resource resource,
Measure measure)
addMeasure in class SonarIndexpublic Dependency addDependency(Dependency dependency)
addDependency in class SonarIndexpublic Set<Dependency> getDependencies()
getDependencies in class SonarIndex
public Dependency getEdge(Resource from,
Resource to)
public boolean hasEdge(Resource from,
Resource to)
public Set<Resource> getVertices()
public Collection<Dependency> getOutgoingEdges(Resource from)
public Collection<Dependency> getIncomingEdges(Resource to)
public List<Violation> getViolations(ViolationQuery violationQuery)
ViolationQuery parameters.
getViolations in class SonarIndexviolationQuery - the request parameters specified as a ViolationQuery
public void addViolation(Violation violation,
boolean force)
addViolation in class SonarIndexpublic void addLink(ProjectLink link)
addLink in class SonarIndexpublic void deleteLink(String key)
deleteLink in class SonarIndexpublic List<Event> getEvents(Resource resource)
getEvents in class SonarIndexpublic void deleteEvent(Event event)
deleteEvent in class SonarIndex
public Event addEvent(Resource resource,
String name,
String description,
String category,
Date date)
addEvent in class SonarIndex
public void setSource(Resource reference,
String source)
SonarIndex
setSource in class SonarIndexpublic String getSource(Resource resource)
getSource in class SonarIndexnull if not availablepublic Resource addResource(Resource resource)
addResource in class SonarIndexpublic <R extends Resource> R getResource(R reference)
SonarIndex
getResource in class SonarIndexreference - the resource reference
public List<Resource> getChildren(Resource resource)
getChildren in class SonarIndex
public List<Resource> getChildren(Resource resource,
boolean acceptExcluded)
public Resource getParent(Resource resource)
getParent in class SonarIndexpublic boolean index(Resource resource)
SonarIndex
index in class SonarIndex
public boolean index(Resource resource,
Resource parentReference)
SonarIndex
index in class SonarIndexresource - the resource to index. Not nullableparentReference - a reference to the indexed parent. If null, the resource is indexed as a direct child of project.
public boolean isExcluded(Resource reference)
SonarIndex
isExcluded in class SonarIndex
public boolean isIndexed(Resource reference,
boolean acceptExcluded)
isIndexed in class SonarIndex
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||