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 enum
static interface
static interface
static interface
static interface
static enum
static enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDateSeen
(BugInstance b, long when) void
addListener
(Cloud.CloudListener listener) void
addStatusListener
(Cloud.CloudStatusListener cloudStatusListener) boolean
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.void
bugFiled
(BugInstance b, Object bugLink) Note that we've initiated or completed a request to file a bug;void
Called after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is calledboolean
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 itboolean
claim
(BugInstance b) Claim the bugGet the user who has claimed a bug; null if no one hasboolean
Returns true if communication has already been initiated (and perhaps completed).boolean
does 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)double
double
double
long
boolean
has the user said they will fix this buggetMode()
Get voting modeint
double
Get 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 buglong
Return the time the user last changed their evaluation of this bugboolean
has the issue been marked "will not be fixed" in a bug trackerboolean
Attempt to initialize the cloudvoid
Initiate communication with the cloud.boolean
returns whether the bug is stored remotely or not.boolean
Return true if the cloud has been successfully initializedboolean
boolean
boolean
void
printCloudSummary
(PrintWriter w, Iterable<BugInstance> bugs, String[] packagePrefixes) void
removeListener
(Cloud.CloudListener listener) void
removeStatusListener
(Cloud.CloudStatusListener cloudStatusListener) void
setBugLinkOnCloudAndStoreIssueDetails
(BugInstance b, String viewUrl, String linkType) void
Set voting modevoid
setSaveSignInInformation
(boolean save) Whether the cloud should save login information, session ID's, etc.void
shutdown()
Shutdown the cloud, note termination of session, close connectionsvoid
signIn()
void
signOut()
void
storeUserAnnotation
(BugInstance bugInstance) Update user designation and evaluation from information in bug instance and push to databaseboolean
Supports links to a bug databaseboolean
Supports allowing users to claim a bugboolean
Supports textual summaries about the status of a bugboolean
boolean
Does the cloud support source lines (e.g., to FishEye)void
updateBugStatusCache
(BugInstance b, String status) Updates the local cache of bug reporting status.void
Waits until all data about this bug collection has been received from the cloud.boolean
waitUntilIssueDataDownloaded
(long timeout, TimeUnit unit) void
Waits until all new issues have been uploadedboolean
waitUntilNewIssuesUploaded
(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:
IOException
SignInCancelledException
-
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.UNCLASSIFIED
if 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
-