|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hudson.plugins.violations.parse.ViolationsDOMParser
public abstract class ViolationsDOMParser
Constructor Summary | |
---|---|
ViolationsDOMParser()
|
Method Summary | |
---|---|
java.lang.String |
checkNotBlank(org.w3c.dom.Element el,
java.lang.String attribute)
Get an attribute. |
protected abstract void |
execute()
|
protected java.lang.String |
fixAbsolutePath(java.lang.String abs)
Fix an absolute path. |
org.w3c.dom.Document |
getDocument()
Get the parsed document. |
protected FullFileModel |
getFileModel(java.lang.String absoluteName)
Get the full file model object for an absolute name. |
protected FullFileModel |
getFileModel(java.lang.String name,
java.io.File sourceFile)
Get the full file model for a particular relative name and source file. |
int |
getInt(org.w3c.dom.Element el,
java.lang.String attribute)
Get an int from an attribute. |
protected FullBuildModel |
getModel()
Get the build model. |
protected java.io.File |
getProjectPath()
Get the project path. |
protected java.lang.String[] |
getSourcePaths()
Get the source paths. |
void |
parse(FullBuildModel model,
java.io.File projectPath,
java.lang.String fileName,
java.lang.String[] sourcePaths)
Parse a violations file. |
protected java.lang.String |
resolveName(java.lang.String absoluteName)
Resolve an absolute name agaist the project path. |
void |
setModel(FullBuildModel model)
Set the build model. |
void |
setProjectPath(java.io.File projectPath)
Set the project path. |
void |
setSourcePaths(java.lang.String[] sourcePaths)
Set the source paths attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViolationsDOMParser()
Method Detail |
---|
public org.w3c.dom.Document getDocument()
public void parse(FullBuildModel model, java.io.File projectPath, java.lang.String fileName, java.lang.String[] sourcePaths) throws java.io.IOException
ViolationsParser
parse
in interface ViolationsParser
model
- the model to store the violations in.projectPath
- the project path used for resolving paths.fileName
- the name of the violations file to parse
(relative to the projectPath).sourcePaths
- a list of source paths to resolve classes against
java.io.IOException
- if there is an error.protected abstract void execute() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void setModel(FullBuildModel model)
model
- the model.protected FullBuildModel getModel()
public void setProjectPath(java.io.File projectPath)
projectPath
- the project path.protected java.io.File getProjectPath()
public void setSourcePaths(java.lang.String[] sourcePaths)
sourcePaths
- the value to useprotected java.lang.String[] getSourcePaths()
protected FullFileModel getFileModel(java.lang.String name, java.io.File sourceFile)
name
- the relative file name.sourceFile
- the source file for the file.
protected FullFileModel getFileModel(java.lang.String absoluteName)
absoluteName
- the absolute name of the file.
protected java.lang.String fixAbsolutePath(java.lang.String abs) throws java.io.IOException
abs
- the absolute name.
java.io.IOException
- if there is a problem.protected java.lang.String resolveName(java.lang.String absoluteName)
absoluteName
- the absolute name.
public int getInt(org.w3c.dom.Element el, java.lang.String attribute)
public java.lang.String checkNotBlank(org.w3c.dom.Element el, java.lang.String attribute) throws java.lang.Exception
java.lang.Exception
- if the attribute is not there or is blank.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |