public abstract class AbstractCloud extends java.lang.Object implements Cloud
Cloud.BugFilingStatus, Cloud.CloudListener, Cloud.CloudStatusListener, Cloud.CloudTask, Cloud.CloudTaskListener, Cloud.Mode, Cloud.SigninState, Cloud.UserDesignation
Modifier and Type | Field and Description |
---|---|
protected BugCollection |
bugCollection |
static long |
MIN_TIMESTAMP |
protected CloudPlugin |
plugin |
protected PropertyBundle |
properties |
protected static boolean |
THROW_EXCEPTION_IF_CANT_CONNECT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractCloud(CloudPlugin plugin,
BugCollection bugs,
java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
addDateSeen(BugInstance b,
long when) |
void |
addListener(Cloud.CloudListener listener) |
void |
addStatusListener(Cloud.CloudStatusListener listener) |
void |
bugsPopulated()
Called after the bugs in the bug collection are loaded; bugs should not
be synchronized before this method is called
|
boolean |
canSeeCommentsByOthers(BugInstance bug) |
boolean |
canStoreUserAnnotation(BugInstance bugInstance)
Is this bug one that gets persisted to the cloud? We may decide that we
don't persist low confidence issues to the database to avoid overloading
it
|
boolean |
claim(BugInstance b)
Claim the bug
|
java.lang.String |
claimedBy(BugInstance b)
Get the user who has claimed a bug; null if no one has
|
boolean |
communicationInitiated()
Returns true if communication has already been initiated (and perhaps completed).
|
MutableCloudTask |
createTask(java.lang.String name) |
java.net.URL |
fileBug(BugInstance bug) |
protected void |
fireIssueDataDownloadedEvent() |
BugInstance |
getBugByHash(java.lang.String hash) |
BugCollection |
getBugCollection() |
boolean |
getBugIsUnassigned(BugInstance b)
does the issue have an unassigned issue in the bug tracker
|
java.net.URL |
getBugLink(BugInstance b)
Get link for bug, either to file one or to view it
|
Cloud.BugFilingStatus |
getBugLinkStatus(BugInstance b)
get the bug filing status for a bug instance
|
java.lang.String |
getBugLinkType(BugInstance instance) |
java.lang.String |
getBugStatus(BugInstance b)
A textual description of the bug status (e.g., FIX_LATER, ASSIGNED,
OBSOLETE, WILL_NOT_FIX)
|
double |
getClassificationDisagreement(BugInstance b) |
double |
getClassificationScore(BugInstance b) |
double |
getClassificationVariance(BugInstance b) |
java.lang.String |
getCloudName() |
protected java.lang.String |
getCloudProperty(java.lang.String propertyName) |
java.lang.String |
getCloudReport(BugInstance b) |
java.lang.String |
getCloudReportWithoutMe(BugInstance b) |
Cloud.UserDesignation |
getConsensusDesignation(BugInstance b) |
long |
getFirstSeen(BugInstance b) |
IGuiCallback |
getGuiCallback() |
boolean |
getIWillFix(BugInstance b)
has the user said they will fix this bug
|
protected abstract java.lang.Iterable<BugDesignation> |
getLatestDesignationFromEachUser(BugInstance bd) |
long |
getLocalFirstSeen(BugInstance b) |
Cloud.Mode |
getMode()
Get voting mode
|
int |
getNumberReviewers(BugInstance b) |
CloudPlugin |
getPlugin() |
double |
getPortionObsoleteClassifications(BugInstance b) |
java.util.Set<java.lang.String> |
getReviewers(BugInstance b) |
Cloud.SigninState |
getSigninState() |
java.net.URL |
getSourceLink(BugInstance b)
URL to view the source for a bug instance
|
java.lang.String |
getSourceLinkToolTip(BugInstance b)
Tool tip text for "view source" button
|
java.lang.String |
getStatusMsg()
Get a status message for the cloud; information about any errors, and
information about database synchronization
|
java.util.Date |
getUserDate(BugInstance b) |
Cloud.UserDesignation |
getUserDesignation(BugInstance b)
Get the user's designation for the bug
|
java.lang.String |
getUserEvaluation(BugInstance b)
Get free text evaluation of the bug
|
protected NameLookup |
getUsernameLookup() |
long |
getUserTimestamp(BugInstance b)
Return the time the user last changed their evaluation of this bug
|
boolean |
getWillNotBeFixed(BugInstance b)
has the issue been marked "will not be fixed" in a bug tracker
|
boolean |
hasVoted(BugInstance bug) |
boolean |
initialize()
Attempt to initialize the cloud
|
boolean |
isInitialized()
Return true if the cloud has been successfully initialized
|
protected boolean |
issueDataHasBeenDownloaded() |
java.lang.String |
notInCloudMsg(BugInstance b) |
boolean |
overallClassificationIsNotAProblem(BugInstance b) |
void |
printCloudSummary(java.io.PrintWriter w,
java.lang.Iterable<BugInstance> bugs,
java.lang.String[] packagePrefixes) |
static void |
printLeaderBoard2(java.io.PrintWriter w,
Multiset<java.lang.String> evaluations,
int maxRows,
java.lang.String alwaysPrint,
java.lang.String format,
java.lang.String title) |
void |
removeListener(Cloud.CloudListener listener) |
void |
removeStatusListener(Cloud.CloudStatusListener listener) |
void |
setBugLinkOnCloudAndStoreIssueDetails(BugInstance b,
java.lang.String viewUrl,
java.lang.String linkType) |
void |
setMode(Cloud.Mode mode)
Set voting mode
|
void |
setSigninState(Cloud.SigninState state) |
void |
setStatusMsg(java.lang.String newMsg) |
void |
shutdown()
Shutdown the cloud, note termination of session, close connections
|
boolean |
supportsBugLinks()
Supports links to a bug database
|
boolean |
supportsClaims()
Supports allowing users to claim a bug
|
boolean |
supportsCloudReports()
Supports textual summaries about the status of a bug
|
boolean |
supportsCloudSummaries() |
boolean |
supportsSourceLinks()
Does the cloud support source lines (e.g., to FishEye)
|
void |
updateBugStatusCache(BugInstance b,
java.lang.String status)
Updates the local cache of bug reporting status.
|
void |
updatedIssue(BugInstance bug) |
protected void |
updatedStatus() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
availableForInitialization, bugFiled, getPrimaryDesignation, getProjects, getUser, initiateCommunication, isInCloud, isOnlineCloud, isSavingSignInInformationEnabled, setSaveSignInInformation, signIn, signOut, storeUserAnnotation, waitUntilIssueDataDownloaded, waitUntilIssueDataDownloaded, waitUntilNewIssuesUploaded, waitUntilNewIssuesUploaded
public static long MIN_TIMESTAMP
protected static final boolean THROW_EXCEPTION_IF_CANT_CONNECT
protected final CloudPlugin plugin
protected final BugCollection bugCollection
protected final PropertyBundle properties
protected AbstractCloud(CloudPlugin plugin, BugCollection bugs, java.util.Properties properties)
public boolean isInitialized()
Cloud
isInitialized
in interface Cloud
@OverridingMethodsMustInvokeSuper public boolean initialize() throws java.io.IOException
Cloud
initialize
in interface Cloud
java.io.IOException
public Cloud.Mode getMode()
Cloud
public void setMode(Cloud.Mode mode)
Cloud
public CloudPlugin getPlugin()
public BugCollection getBugCollection()
getBugCollection
in interface Cloud
public boolean supportsBugLinks()
Cloud
supportsBugLinks
in interface Cloud
public void setBugLinkOnCloudAndStoreIssueDetails(BugInstance b, java.lang.String viewUrl, java.lang.String linkType) throws java.io.IOException, SignInCancelledException
setBugLinkOnCloudAndStoreIssueDetails
in interface Cloud
java.io.IOException
SignInCancelledException
public void updateBugStatusCache(BugInstance b, java.lang.String status)
Cloud
updateBugStatusCache
in interface Cloud
public boolean supportsClaims()
Cloud
supportsClaims
in interface Cloud
public boolean supportsCloudReports()
Cloud
supportsCloudReports
in interface Cloud
public java.lang.String claimedBy(BugInstance b)
Cloud
public boolean claim(BugInstance b)
Cloud
public java.net.URL getBugLink(BugInstance b)
Cloud
getBugLink
in interface Cloud
public java.lang.String getBugLinkType(BugInstance instance)
getBugLinkType
in interface Cloud
public java.net.URL fileBug(BugInstance bug)
public Cloud.BugFilingStatus getBugLinkStatus(BugInstance b)
Cloud
getBugLinkStatus
in interface Cloud
public boolean canSeeCommentsByOthers(BugInstance bug)
public boolean hasVoted(BugInstance bug)
public java.lang.String notInCloudMsg(BugInstance b)
public java.lang.String getCloudReport(BugInstance b)
getCloudReport
in interface Cloud
public java.lang.String getCloudReportWithoutMe(BugInstance b)
getCloudReportWithoutMe
in interface Cloud
public void bugsPopulated()
Cloud
bugsPopulated
in interface Cloud
protected boolean issueDataHasBeenDownloaded()
public java.lang.String getBugStatus(BugInstance b)
Cloud
getBugStatus
in interface Cloud
protected abstract java.lang.Iterable<BugDesignation> getLatestDesignationFromEachUser(BugInstance bd)
public java.util.Date getUserDate(BugInstance b)
getUserDate
in interface Cloud
public void addListener(Cloud.CloudListener listener)
addListener
in interface Cloud
public void removeListener(Cloud.CloudListener listener)
removeListener
in interface Cloud
public void addStatusListener(Cloud.CloudStatusListener listener)
addStatusListener
in interface Cloud
public void removeStatusListener(Cloud.CloudStatusListener listener)
removeStatusListener
in interface Cloud
public java.lang.String getStatusMsg()
Cloud
getStatusMsg
in interface Cloud
public void shutdown()
Cloud
public boolean getIWillFix(BugInstance b)
Cloud
getIWillFix
in interface Cloud
public Cloud.UserDesignation getConsensusDesignation(BugInstance b)
getConsensusDesignation
in interface Cloud
Cloud.UserDesignation.UNCLASSIFIED
if no consensus has been reachedpublic boolean overallClassificationIsNotAProblem(BugInstance b)
overallClassificationIsNotAProblem
in interface Cloud
public double getClassificationScore(BugInstance b)
getClassificationScore
in interface Cloud
public double getClassificationVariance(BugInstance b)
getClassificationVariance
in interface Cloud
public double getPortionObsoleteClassifications(BugInstance b)
getPortionObsoleteClassifications
in interface Cloud
public int getNumberReviewers(BugInstance b)
getNumberReviewers
in interface Cloud
public void printCloudSummary(java.io.PrintWriter w, java.lang.Iterable<BugInstance> bugs, java.lang.String[] packagePrefixes)
printCloudSummary
in interface Cloud
public static void printLeaderBoard2(java.io.PrintWriter w, Multiset<java.lang.String> evaluations, int maxRows, java.lang.String alwaysPrint, java.lang.String format, java.lang.String title)
public boolean supportsCloudSummaries()
supportsCloudSummaries
in interface Cloud
public boolean canStoreUserAnnotation(BugInstance bugInstance)
Cloud
canStoreUserAnnotation
in interface Cloud
public double getClassificationDisagreement(BugInstance b)
getClassificationDisagreement
in interface Cloud
public Cloud.UserDesignation getUserDesignation(BugInstance b)
Cloud
getUserDesignation
in interface Cloud
public java.lang.String getUserEvaluation(BugInstance b)
Cloud
getUserEvaluation
in interface Cloud
public long getUserTimestamp(BugInstance b)
Cloud
getUserTimestamp
in interface Cloud
public long getFirstSeen(BugInstance b)
getFirstSeen
in interface Cloud
public void addDateSeen(BugInstance b, long when)
addDateSeen
in interface Cloud
protected void updatedStatus()
public void updatedIssue(BugInstance bug)
protected void fireIssueDataDownloadedEvent()
public Cloud.SigninState getSigninState()
getSigninState
in interface Cloud
public void setSigninState(Cloud.SigninState state)
public BugInstance getBugByHash(java.lang.String hash)
protected NameLookup getUsernameLookup() throws java.io.IOException
java.io.IOException
public MutableCloudTask createTask(java.lang.String name)
public void setStatusMsg(java.lang.String newMsg)
protected java.lang.String getCloudProperty(java.lang.String propertyName)
public boolean supportsSourceLinks()
Cloud
supportsSourceLinks
in interface Cloud
@CheckForNull public java.net.URL getSourceLink(BugInstance b)
Cloud
getSourceLink
in interface Cloud
public java.lang.String getSourceLinkToolTip(BugInstance b)
Cloud
getSourceLinkToolTip
in interface Cloud
public boolean getBugIsUnassigned(BugInstance b)
Cloud
getBugIsUnassigned
in interface Cloud
public boolean getWillNotBeFixed(BugInstance b)
Cloud
getWillNotBeFixed
in interface Cloud
public java.util.Set<java.lang.String> getReviewers(BugInstance b)
getReviewers
in interface Cloud
public IGuiCallback getGuiCallback()
getGuiCallback
in interface Cloud
public java.lang.String getCloudName()
getCloudName
in interface Cloud
public boolean communicationInitiated()
Cloud
communicationInitiated
in interface Cloud
public long getLocalFirstSeen(BugInstance b)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.