|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.batch.DefaultDecoratorContext
public class DefaultDecoratorContext
Constructor Summary | |
---|---|
DefaultDecoratorContext(Resource resource,
SonarIndex index,
List<DecoratorContext> childrenContexts)
|
Method Summary | ||
---|---|---|
Event |
createEvent(String name,
String description,
String category,
Date date)
Creates an event for a given date |
|
void |
deleteEvent(Event event)
Deletes an event |
|
List<DecoratorContext> |
getChildren()
Child contexts are read only |
|
Collection<Measure> |
getChildrenMeasures(MeasuresFilter filter)
Never return null. |
|
Collection<Measure> |
getChildrenMeasures(Metric metric)
|
|
Set<Dependency> |
getDependencies()
|
|
List<Event> |
getEvents()
|
|
Collection<Dependency> |
getIncomingDependencies()
|
|
Measure |
getMeasure(Metric metric)
Find a measure for the resource |
|
|
getMeasures(MeasuresFilter<M> filter)
Never return null. |
|
Collection<Dependency> |
getOutgoingDependencies()
|
|
Project |
getProject()
|
|
Resource |
getResource()
|
|
List<Violation> |
getViolations()
Returns all the active (= non switched-off) violations found on the current resource. |
|
List<Violation> |
getViolations(ViolationQuery violationQuery)
Returns the violations that match the ViolationQuery parameters. |
|
Dependency |
saveDependency(Dependency dependency)
|
|
DecoratorContext |
saveMeasure(Measure measure)
Add a measure on the current resource. |
|
DecoratorContext |
saveMeasure(Metric metric,
Double value)
Add a measure on the current resource. |
|
DefaultDecoratorContext |
saveViolation(Violation violation)
Save a coding rule violation. |
|
DefaultDecoratorContext |
saveViolation(Violation violation,
boolean force)
Save a coding rule violation. |
|
DefaultDecoratorContext |
setReadOnly(boolean b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDecoratorContext(Resource resource, SonarIndex index, List<DecoratorContext> childrenContexts)
Method Detail |
---|
public DefaultDecoratorContext setReadOnly(boolean b)
public Project getProject()
getProject
in interface DecoratorContext
public List<DecoratorContext> getChildren()
DecoratorContext
getChildren
in interface DecoratorContext
public <M> M getMeasures(MeasuresFilter<M> filter)
DecoratorContext
getMeasures
in interface DecoratorContext
public Measure getMeasure(Metric metric)
DecoratorContext
getMeasure
in interface DecoratorContext
public Collection<Measure> getChildrenMeasures(MeasuresFilter filter)
DecoratorContext
getChildrenMeasures
in interface DecoratorContext
public Collection<Measure> getChildrenMeasures(Metric metric)
getChildrenMeasures
in interface DecoratorContext
public Resource getResource()
getResource
in interface DecoratorContext
public DecoratorContext saveMeasure(Measure measure)
DecoratorContext
saveMeasure
in interface DecoratorContext
public DecoratorContext saveMeasure(Metric metric, Double value)
DecoratorContext
saveMeasure
in interface DecoratorContext
public List<Violation> getViolations(ViolationQuery violationQuery)
ViolationQuery
parameters.
getViolations
in interface DecoratorContext
violationQuery
- the request parameters specified as a ViolationQuery
public List<Violation> getViolations()
getViolations
in interface DecoratorContext
public Dependency saveDependency(Dependency dependency)
saveDependency
in interface DecoratorContext
public Set<Dependency> getDependencies()
getDependencies
in interface DecoratorContext
public Collection<Dependency> getIncomingDependencies()
getIncomingDependencies
in interface DecoratorContext
public Collection<Dependency> getOutgoingDependencies()
getOutgoingDependencies
in interface DecoratorContext
public List<Event> getEvents()
getEvents
in interface DecoratorContext
public Event createEvent(String name, String description, String category, Date date)
DecoratorContext
createEvent
in interface DecoratorContext
name
- the event namedescription
- the event descriptioncategory
- the event categorydate
- the event date
public void deleteEvent(Event event)
DecoratorContext
deleteEvent
in interface DecoratorContext
event
- the event to deletepublic DefaultDecoratorContext saveViolation(Violation violation, boolean force)
DecoratorContext
saveViolation
in interface DecoratorContext
force
- allows to force creation of violation even if it was suppressed by ViolationFilter
public DefaultDecoratorContext saveViolation(Violation violation)
DecoratorContext
saveViolation
in interface DecoratorContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |