Package edu.umd.cs.findbugs.cloud
Interface Cloud
-
- All Known Subinterfaces:
OnlineCloud
- All Known Implementing Classes:
AbstractCloud,BugCollectionStorageCloud,DoNothingCloud
public interface CloudAn interface for describing how a bug collection interacts with the FindBugs Cloud. Each Cloud instance is associated with a BugCollection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCloud.BugFilingStatusstatic interfaceCloud.CloudListenerstatic interfaceCloud.CloudStatusListenerstatic interfaceCloud.CloudTaskstatic interfaceCloud.CloudTaskListenerstatic classCloud.Modestatic classCloud.SigninStatestatic classCloud.UserDesignation
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDateSeen(BugInstance b, long when)voidaddListener(Cloud.CloudListener listener)voidaddStatusListener(Cloud.CloudStatusListener cloudStatusListener)booleanavailableForInitialization()Do we have the configuration information needed to try initializing the cloud; calling this method should have no side effects and not display any dialogs or make any network connections.voidbugFiled(BugInstance b, java.lang.Object bugLink)Note that we've initiated or completed a request to file a bug;voidbugsPopulated()Called after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is calledbooleancanStoreUserAnnotation(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 itbooleanclaim(BugInstance b)Claim the bugjava.lang.StringclaimedBy(BugInstance b)Get the user who has claimed a bug; null if no one hasbooleancommunicationInitiated()Returns true if communication has already been initiated (and perhaps completed).java.net.URLfileBug(BugInstance b)BugCollectiongetBugCollection()booleangetBugIsUnassigned(BugInstance b)does the issue have an unassigned issue in the bug trackerjava.net.URLgetBugLink(BugInstance b)Get link for bug, either to file one or to view itCloud.BugFilingStatusgetBugLinkStatus(BugInstance b)get the bug filing status for a bug instancejava.lang.StringgetBugLinkType(BugInstance instance)java.lang.StringgetBugStatus(BugInstance b)A textual description of the bug status (e.g., FIX_LATER, ASSIGNED, OBSOLETE, WILL_NOT_FIX)doublegetClassificationDisagreement(BugInstance b)doublegetClassificationScore(BugInstance b)doublegetClassificationVariance(BugInstance b)java.lang.StringgetCloudName()java.lang.StringgetCloudReport(BugInstance b)java.lang.StringgetCloudReportWithoutMe(BugInstance b)Cloud.UserDesignationgetConsensusDesignation(BugInstance b)longgetFirstSeen(BugInstance b)IGuiCallbackgetGuiCallback()booleangetIWillFix(BugInstance b)has the user said they will fix this bugCloud.ModegetMode()Get voting modeintgetNumberReviewers(BugInstance b)CloudPlugingetPlugin()doublegetPortionObsoleteClassifications(BugInstance b)BugDesignationgetPrimaryDesignation(BugInstance b)Get the most recent BugDesignation from the current userjava.util.Collection<java.lang.String>getProjects(java.lang.String className)Get a list of names of FB projects that the given class "may be a part of." Used for filing bugs.java.util.Set<java.lang.String>getReviewers(BugInstance b)Cloud.SigninStategetSigninState()java.net.URLgetSourceLink(BugInstance b)URL to view the source for a bug instancejava.lang.StringgetSourceLinkToolTip(BugInstance b)Tool tip text for "view source" buttonjava.lang.StringgetStatusMsg()Get a status message for the cloud; information about any errors, and information about database synchronizationjava.lang.StringgetUser()java.util.DategetUserDate(BugInstance b)Cloud.UserDesignationgetUserDesignation(BugInstance b)Get the user's designation for the bugjava.lang.StringgetUserEvaluation(BugInstance b)Get free text evaluation of the buglonggetUserTimestamp(BugInstance b)Return the time the user last changed their evaluation of this bugbooleangetWillNotBeFixed(BugInstance b)has the issue been marked "will not be fixed" in a bug trackerbooleaninitialize()Attempt to initialize the cloudvoidinitiateCommunication()Initiate communication with the cloud.booleanisInCloud(BugInstance b)returns whether the bug is stored remotely or not.booleanisInitialized()Return true if the cloud has been successfully initializedbooleanisOnlineCloud()booleanisSavingSignInInformationEnabled()booleanoverallClassificationIsNotAProblem(BugInstance b)voidprintCloudSummary(java.io.PrintWriter w, java.lang.Iterable<BugInstance> bugs, java.lang.String[] packagePrefixes)voidremoveListener(Cloud.CloudListener listener)voidremoveStatusListener(Cloud.CloudStatusListener cloudStatusListener)voidsetBugLinkOnCloudAndStoreIssueDetails(BugInstance b, java.lang.String viewUrl, java.lang.String linkType)voidsetMode(Cloud.Mode m)Set voting modevoidsetSaveSignInInformation(boolean save)Whether the cloud should save login information, session ID's, etc.voidshutdown()Shutdown the cloud, note termination of session, close connectionsvoidsignIn()voidsignOut()voidstoreUserAnnotation(BugInstance bugInstance)Update user designation and evaluation from information in bug instance and push to databasebooleansupportsBugLinks()Supports links to a bug databasebooleansupportsClaims()Supports allowing users to claim a bugbooleansupportsCloudReports()Supports textual summaries about the status of a bugbooleansupportsCloudSummaries()booleansupportsSourceLinks()Does the cloud support source lines (e.g., to FishEye)voidupdateBugStatusCache(BugInstance b, java.lang.String status)Updates the local cache of bug reporting status.voidwaitUntilIssueDataDownloaded()Waits until all data about this bug collection has been received from the cloud.booleanwaitUntilIssueDataDownloaded(long timeout, java.util.concurrent.TimeUnit unit)voidwaitUntilNewIssuesUploaded()Waits until all new issues have been uploadedbooleanwaitUntilNewIssuesUploaded(long timeout, java.util.concurrent.TimeUnit unit)
-
-
-
Method Detail
-
getPlugin
CloudPlugin getPlugin()
-
getCloudName
java.lang.String getCloudName()
-
getBugCollection
BugCollection getBugCollection()
-
getGuiCallback
IGuiCallback getGuiCallback()
-
getStatusMsg
java.lang.String getStatusMsg()
Get a status message for the cloud; information about any errors, and information about database synchronization
-
printCloudSummary
void printCloudSummary(java.io.PrintWriter w, java.lang.Iterable<BugInstance> bugs, java.lang.String[] packagePrefixes)
-
addListener
void addListener(Cloud.CloudListener listener)
-
removeListener
void removeListener(Cloud.CloudListener listener)
-
addStatusListener
void addStatusListener(Cloud.CloudStatusListener cloudStatusListener)
-
removeStatusListener
void removeStatusListener(Cloud.CloudStatusListener cloudStatusListener)
-
availableForInitialization
boolean availableForInitialization()
Do we have the configuration information needed to try initializing the cloud; calling this method should have no side effects and not display any dialogs or make any network connections.- Returns:
- true if we have the needed information
-
initialize
boolean initialize() throws java.io.IOExceptionAttempt to initialize the cloud- Returns:
- true if successful
- Throws:
java.io.IOException
-
isInitialized
boolean isInitialized()
Return true if the cloud has been successfully initialized
-
waitUntilNewIssuesUploaded
void waitUntilNewIssuesUploaded()
Waits until all new issues have been uploaded
-
waitUntilNewIssuesUploaded
boolean waitUntilNewIssuesUploaded(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
waitUntilIssueDataDownloaded
void waitUntilIssueDataDownloaded()
Waits until all data about this bug collection has been received from the cloud.
-
waitUntilIssueDataDownloaded
boolean waitUntilIssueDataDownloaded(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
communicationInitiated
boolean communicationInitiated()
Returns true if communication has already been initiated (and perhaps completed).
-
bugsPopulated
void bugsPopulated()
Called after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is called
-
initiateCommunication
void initiateCommunication()
Initiate communication with the cloud. Clouds can implement lazy communication, where they don't initiate communication with the cloud until a request for cloud data is seen, or a call is made towaitUntilIssueDataDownloaded(). A call to this method forces eager initiation of communication.
-
shutdown
void shutdown()
Shutdown the cloud, note termination of session, close connections
-
getUser
java.lang.String getUser()
-
getSigninState
Cloud.SigninState getSigninState()
-
setSaveSignInInformation
void setSaveSignInInformation(boolean save)
Whether the cloud should save login information, session ID's, etc. If disabled, the user will need to re-authenticate each session.
-
isSavingSignInInformationEnabled
boolean isSavingSignInInformationEnabled()
-
signIn
void signIn() throws java.io.IOException- Throws:
java.io.IOException
-
signOut
void signOut()
-
getMode
Cloud.Mode getMode()
Get voting mode
-
setMode
void setMode(Cloud.Mode m)
Set voting mode
-
supportsSourceLinks
boolean supportsSourceLinks()
Does the cloud support source lines (e.g., to FishEye)
-
supportsBugLinks
boolean supportsBugLinks()
Supports links to a bug database
-
supportsCloudReports
boolean supportsCloudReports()
Supports textual summaries about the status of a bug
-
supportsClaims
boolean supportsClaims()
Supports allowing users to claim a bug
-
supportsCloudSummaries
boolean supportsCloudSummaries()
-
getProjects
java.util.Collection<java.lang.String> getProjects(java.lang.String className)
Get a list of names of FB projects that the given class "may be a part of." Used for filing bugs.
-
isInCloud
boolean isInCloud(BugInstance b)
returns whether the bug is stored remotely or not. for bug collection storage, always returns true
-
isOnlineCloud
boolean isOnlineCloud()
-
getIWillFix
boolean getIWillFix(BugInstance b)
has the user said they will fix this bug
-
getSourceLinkToolTip
java.lang.String getSourceLinkToolTip(@CheckForNull BugInstance b)Tool tip text for "view source" button
-
getSourceLink
java.net.URL getSourceLink(BugInstance b)
URL to view the source for a bug instance
-
getBugLinkStatus
Cloud.BugFilingStatus getBugLinkStatus(BugInstance b)
get the bug filing status for a bug instance
-
getBugStatus
java.lang.String getBugStatus(BugInstance b)
A textual description of the bug status (e.g., FIX_LATER, ASSIGNED, OBSOLETE, WILL_NOT_FIX)
-
getWillNotBeFixed
boolean getWillNotBeFixed(BugInstance b)
has the issue been marked "will not be fixed" in a bug tracker
-
getBugIsUnassigned
boolean getBugIsUnassigned(BugInstance b)
does the issue have an unassigned issue in the bug tracker
-
getBugLink
java.net.URL getBugLink(BugInstance b)
Get link for bug, either to file one or to view it
-
getBugLinkType
java.lang.String getBugLinkType(BugInstance instance)
-
fileBug
java.net.URL fileBug(BugInstance b)
-
setBugLinkOnCloudAndStoreIssueDetails
void setBugLinkOnCloudAndStoreIssueDetails(BugInstance b, java.lang.String viewUrl, java.lang.String linkType) throws java.io.IOException, SignInCancelledException
- Throws:
java.io.IOExceptionSignInCancelledException
-
updateBugStatusCache
void updateBugStatusCache(BugInstance b, java.lang.String status)
Updates the local cache of bug reporting status. Does not modify server code.
-
bugFiled
void bugFiled(BugInstance b, @CheckForNull java.lang.Object bugLink)
Note that we've initiated or completed a request to file a bug;- Parameters:
b- bug against which bug was filedbugLink- if we have any information about the result of filing the bug, it should go here
-
getCloudReport
java.lang.String getCloudReport(BugInstance b)
-
getCloudReportWithoutMe
java.lang.String getCloudReportWithoutMe(BugInstance b)
-
claimedBy
@CheckForNull java.lang.String claimedBy(BugInstance b)
Get the user who has claimed a bug; null if no one has
-
claim
boolean claim(BugInstance b)
Claim the bug- Returns:
- true if no one else has already done so
-
getUserTimestamp
long getUserTimestamp(BugInstance b)
Return the time the user last changed their evaluation of this bug
-
getUserDate
java.util.Date getUserDate(BugInstance b)
-
getPrimaryDesignation
BugDesignation getPrimaryDesignation(BugInstance b)
Get the most recent BugDesignation from the current user
-
getUserDesignation
Cloud.UserDesignation getUserDesignation(BugInstance b)
Get the user's designation for the bug
-
getUserEvaluation
java.lang.String getUserEvaluation(BugInstance b)
Get free text evaluation of the bug
-
getClassificationScore
double getClassificationScore(BugInstance b)
-
getClassificationVariance
double getClassificationVariance(BugInstance b)
-
getClassificationDisagreement
double getClassificationDisagreement(BugInstance b)
-
getPortionObsoleteClassifications
double getPortionObsoleteClassifications(BugInstance b)
-
getNumberReviewers
int getNumberReviewers(BugInstance b)
-
getReviewers
java.util.Set<java.lang.String> getReviewers(BugInstance b)
-
getFirstSeen
long getFirstSeen(BugInstance b)
-
addDateSeen
void addDateSeen(BugInstance b, long when)
-
getConsensusDesignation
Cloud.UserDesignation getConsensusDesignation(BugInstance b)
- Returns:
Cloud.UserDesignation.UNCLASSIFIEDif no consensus has been reached
-
overallClassificationIsNotAProblem
boolean overallClassificationIsNotAProblem(BugInstance b)
-
canStoreUserAnnotation
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
-
storeUserAnnotation
void storeUserAnnotation(BugInstance bugInstance)
Update user designation and evaluation from information in bug instance and push to database
-
-