Package edu.umd.cs.findbugs.cloud
Interface Cloud
- All Known Subinterfaces:
OnlineCloud
- All Known Implementing Classes:
AbstractCloud,BugCollectionStorageCloud,DoNothingCloud
public interface Cloud
An interface for describing how a bug collection interacts with the FindBugs
Cloud.
Each Cloud instance is associated with a BugCollection.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfacestatic interfacestatic interfacestatic interfacestatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDateSeen(BugInstance b, long when) voidaddListener(Cloud.CloudListener listener) voidaddStatusListener(Cloud.CloudStatusListener cloudStatusListener) booleanDo 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, Object bugLink) Note that we've initiated or completed a request to file a bug;voidCalled 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 bugGet the user who has claimed a bug; null if no one hasbooleanReturns true if communication has already been initiated (and perhaps completed).booleandoes the issue have an unassigned issue in the bug trackerGet link for bug, either to file one or to view itget the bug filing status for a bug instancegetBugLinkType(BugInstance instance) A textual description of the bug status (e.g., FIX_LATER, ASSIGNED, OBSOLETE, WILL_NOT_FIX)doubledoubledoublelongbooleanhas the user said they will fix this buggetMode()Get voting modeintdoubleGet the most recent BugDesignation from the current usergetProjects(String className) Get a list of names of FB projects that the given class "may be a part of." Used for filing bugs.URL to view the source for a bug instanceTool tip text for "view source" buttonGet a status message for the cloud; information about any errors, and information about database synchronizationgetUser()Get the user's designation for the bugGet free text evaluation of the buglongReturn the time the user last changed their evaluation of this bugbooleanhas the issue been marked "will not be fixed" in a bug trackerbooleanAttempt to initialize the cloudvoidInitiate communication with the cloud.booleanreturns whether the bug is stored remotely or not.booleanReturn true if the cloud has been successfully initializedbooleanbooleanbooleanvoidprintCloudSummary(PrintWriter w, Iterable<BugInstance> bugs, String[] packagePrefixes) voidremoveListener(Cloud.CloudListener listener) voidremoveStatusListener(Cloud.CloudStatusListener cloudStatusListener) voidsetBugLinkOnCloudAndStoreIssueDetails(BugInstance b, String viewUrl, String linkType) voidSet 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 databasebooleanSupports links to a bug databasebooleanSupports allowing users to claim a bugbooleanSupports textual summaries about the status of a bugbooleanbooleanDoes the cloud support source lines (e.g., to FishEye)voidupdateBugStatusCache(BugInstance b, String status) Updates the local cache of bug reporting status.voidWaits until all data about this bug collection has been received from the cloud.booleanwaitUntilIssueDataDownloaded(long timeout, TimeUnit unit) voidWaits until all new issues have been uploadedbooleanwaitUntilNewIssuesUploaded(long timeout, TimeUnit unit)
-
Method Details
-
getPlugin
CloudPlugin getPlugin() -
getCloudName
String getCloudName() -
getBugCollection
BugCollection getBugCollection() -
getGuiCallback
IGuiCallback getGuiCallback() -
getStatusMsg
String getStatusMsg()Get a status message for the cloud; information about any errors, and information about database synchronization -
printCloudSummary
-
addListener
-
removeListener
-
addStatusListener
-
removeStatusListener
-
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
Attempt to initialize the cloud- Returns:
- true if successful
- Throws:
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
- Throws:
InterruptedException
-
waitUntilIssueDataDownloaded
void waitUntilIssueDataDownloaded()Waits until all data about this bug collection has been received from the cloud. -
waitUntilIssueDataDownloaded
- Throws:
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
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
- Throws:
IOException
-
signOut
void signOut() -
getMode
Cloud.Mode getMode()Get voting mode -
setMode
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
Get a list of names of FB projects that the given class "may be a part of." Used for filing bugs. -
isInCloud
returns whether the bug is stored remotely or not. for bug collection storage, always returns true -
isOnlineCloud
boolean isOnlineCloud() -
getIWillFix
has the user said they will fix this bug -
getSourceLinkToolTip
Tool tip text for "view source" button -
getSourceLink
URL to view the source for a bug instance -
getBugLinkStatus
get the bug filing status for a bug instance -
getBugStatus
A textual description of the bug status (e.g., FIX_LATER, ASSIGNED, OBSOLETE, WILL_NOT_FIX) -
getWillNotBeFixed
has the issue been marked "will not be fixed" in a bug tracker -
getBugIsUnassigned
does the issue have an unassigned issue in the bug tracker -
getBugLink
Get link for bug, either to file one or to view it -
getBugLinkType
-
fileBug
-
setBugLinkOnCloudAndStoreIssueDetails
void setBugLinkOnCloudAndStoreIssueDetails(BugInstance b, String viewUrl, String linkType) throws IOException, SignInCancelledException - Throws:
IOExceptionSignInCancelledException
-
updateBugStatusCache
Updates the local cache of bug reporting status. Does not modify server code. -
bugFiled
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
-
getCloudReportWithoutMe
-
claimedBy
Get the user who has claimed a bug; null if no one has -
claim
Claim the bug- Returns:
- true if no one else has already done so
-
getUserTimestamp
Return the time the user last changed their evaluation of this bug -
getUserDate
-
getPrimaryDesignation
Get the most recent BugDesignation from the current user -
getUserDesignation
Get the user's designation for the bug -
getUserEvaluation
Get free text evaluation of the bug -
getClassificationScore
-
getClassificationVariance
-
getClassificationDisagreement
-
getPortionObsoleteClassifications
-
getNumberReviewers
-
getReviewers
-
getFirstSeen
-
addDateSeen
-
getConsensusDesignation
- Returns:
Cloud.UserDesignation.UNCLASSIFIEDif no consensus has been reached
-
overallClassificationIsNotAProblem
-
canStoreUserAnnotation
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
Update user designation and evaluation from information in bug instance and push to database
-