|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonyericsson.jenkins.plugins.bfa.db.KnowledgeBase
com.sonyericsson.jenkins.plugins.bfa.db.LocalFileKnowledgeBase
public class LocalFileKnowledgeBase
Handling of the list the traditional way. Local in memory and serialized with the object.
Nested Class Summary | |
---|---|
static class |
LocalFileKnowledgeBase.LocalFileKnowledgeBaseDescriptor
Descriptor for LocalFileKnowledgeBase . |
Nested classes/interfaces inherited from class com.sonyericsson.jenkins.plugins.bfa.db.KnowledgeBase |
---|
KnowledgeBase.KnowledgeBaseDescriptor |
Constructor Summary | |
---|---|
LocalFileKnowledgeBase()
Default constructor. |
|
LocalFileKnowledgeBase(Collection<FailureCause> initialCauses)
Standard constructor. |
|
LocalFileKnowledgeBase(hudson.util.CopyOnWriteList<FailureCause> legacyCauses)
Standard constructor. |
Method Summary | |
---|---|
FailureCause |
addCause(FailureCause cause)
Saves a new cause to the db and generates a new id for the cause. |
void |
convertFrom(KnowledgeBase oldKnowledgeBase)
Converts the existing old knowledge base into this one. |
boolean |
equals(KnowledgeBase oldKnowledgeBase)
Called to see if the configuration has changed. |
boolean |
equals(Object other)
|
List<String> |
getCategories()
Gets the unique categories of all FailureCauses. |
FailureCause |
getCause(String id)
Get the cause with the given id. |
Collection<FailureCause> |
getCauseNames()
Get the list of the FailureCause 's names and ids. |
Collection<FailureCause> |
getCauses()
Get the list of FailureCause s. |
hudson.model.Descriptor<KnowledgeBase> |
getDescriptor()
|
Collection<FailureCause> |
getShallowCauses()
Get a shallow list of the FailureCause s. |
int |
hashCode()
|
boolean |
isStatisticsEnabled()
If Statistics logging is enabled on this knowledge base or not. |
boolean |
isSuccessfulLoggingEnabled()
If all builds should be added to statistics logging, not just unsuccessful builds. |
protected void |
put(FailureCause cause)
Puts the cause directly into the map. |
void |
removeBuildfailurecause(hudson.model.AbstractBuild build)
Removes the build failure cause of particular build. |
FailureCause |
removeCause(String id)
Removes the cause from the knowledge base. |
FailureCause |
saveCause(FailureCause cause)
Saves a cause to the db. |
void |
saveStatistics(Statistics stat)
Saves the Statistics. |
void |
start()
Called when the KnowledgeBase should be up and running. |
void |
stop()
Called when it is time to clean up after the KnowledgeBase. |
Methods inherited from class com.sonyericsson.jenkins.plugins.bfa.db.KnowledgeBase |
---|
convertFromAbstract, getFailureCauseNames, getFailureCausesPerBuild, getFailureCausesPerTime, getNbrOfFailureCategoriesPerName, getNbrOfFailureCauses, getNbrOfFailureCausesPerId, getNbrOfNullFailureCauses, getStatistics, getUnknownFailureCauseQuotaPerTime |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalFileKnowledgeBase(hudson.util.CopyOnWriteList<FailureCause> legacyCauses)
legacyCauses
- the causes.public LocalFileKnowledgeBase(Collection<FailureCause> initialCauses)
initialCauses
- the causes.@DataBoundConstructor public LocalFileKnowledgeBase()
Method Detail |
---|
public Collection<FailureCause> getCauses()
KnowledgeBase
FailureCause
s. It is intended to be used in the scanning phase hence it should be
returned as quickly as possible, so the list could be cached.
getCauses
in class KnowledgeBase
public Collection<FailureCause> getCauseNames()
KnowledgeBase
FailureCause
's names and ids. The list should be the latest possible from the DB as
they will be used for editing. The objects returned should contain at least the id and the name of the cause.
getCauseNames
in class KnowledgeBase
public Collection<FailureCause> getShallowCauses() throws Exception
KnowledgeBase
FailureCause
s. The list should be the latest possible from the DB as
they will be used in the list of causes to edit.
shallow meaning no indications but information enough to show a nice list; at least id and name but description
and categories are preferred as well.
getShallowCauses
in class KnowledgeBase
Exception
- if something in the KnowledgeBase handling goes wrong.KnowledgeBase.getCauseNames()
public FailureCause getCause(String id)
KnowledgeBase
getCause
in class KnowledgeBase
id
- the id of the cause.
public FailureCause addCause(FailureCause cause) throws IOException
KnowledgeBase
addCause
in class KnowledgeBase
cause
- the cause to add.
IOException
public FailureCause removeCause(String id) throws Exception
KnowledgeBase
removeCause
in class KnowledgeBase
id
- the id of the cause to remove.
Exception
- if so.public FailureCause saveCause(FailureCause cause) throws IOException
KnowledgeBase
KnowledgeBase
implementation with a preexisting id that is being converted via KnowledgeBase.convertFrom(KnowledgeBase)
.
saveCause
in class KnowledgeBase
cause
- the cause to add.
IOException
protected void put(FailureCause cause)
cause
- the cause to put.public void convertFrom(KnowledgeBase oldKnowledgeBase) throws Exception
KnowledgeBase
convertFrom
in class KnowledgeBase
oldKnowledgeBase
- the old one.
Exception
- if something in the KnowledgeBase handling goes wrong.public List<String> getCategories() throws Exception
KnowledgeBase
getCategories
in class KnowledgeBase
Exception
- if something in the KnowledgeBase handling goes wrong.public boolean equals(KnowledgeBase oldKnowledgeBase)
KnowledgeBase
equals
in class KnowledgeBase
oldKnowledgeBase
- the previous config.
public void start()
KnowledgeBase
start
in class KnowledgeBase
public void stop()
KnowledgeBase
stop
in class KnowledgeBase
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class KnowledgeBase
public boolean isStatisticsEnabled()
KnowledgeBase
isStatisticsEnabled
in class KnowledgeBase
public boolean isSuccessfulLoggingEnabled()
KnowledgeBase
KnowledgeBase.isStatisticsEnabled()
is true.
isSuccessfulLoggingEnabled
in class KnowledgeBase
public void saveStatistics(Statistics stat) throws Exception
KnowledgeBase
saveStatistics
in class KnowledgeBase
stat
- the Statistics.
Exception
- if something in the KnowledgeBase handling goes wrong.public hudson.model.Descriptor<KnowledgeBase> getDescriptor()
public void removeBuildfailurecause(hudson.model.AbstractBuild build) throws Exception
KnowledgeBase
removeBuildfailurecause
in class KnowledgeBase
build
- the AbstractBuild.
Exception
- if something in the KnowledgeBase handling goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |