Package edu.umd.cs.findbugs.cloud
Class BugCollectionStorageCloud
java.lang.Object
edu.umd.cs.findbugs.cloud.AbstractCloud
edu.umd.cs.findbugs.cloud.BugCollectionStorageCloud
- All Implemented Interfaces:
Cloud
A basic "cloud" that stores information to the bug collection analysis XML file.
- Author:
- pwilliam
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.umd.cs.findbugs.cloud.Cloud
Cloud.BugFilingStatus, Cloud.CloudListener, Cloud.CloudStatusListener, Cloud.CloudTask, Cloud.CloudTaskListener, Cloud.Mode, Cloud.SigninState, Cloud.UserDesignation -
Field Summary
Fields inherited from class edu.umd.cs.findbugs.cloud.AbstractCloud
bugCollection, MIN_TIMESTAMP, plugin, properties, THROW_EXCEPTION_IF_CANT_CONNECT -
Constructor Summary
ConstructorsConstructorDescriptionBugCollectionStorageCloud(CloudPlugin plugin, BugCollection bc, Properties properties) Constructor is not protected to allow CloudFactory.createCloudWithoutInitializing() create a new instance of this cloud -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDateSeen(BugInstance b, long when) 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 calledprotected Iterable<BugDesignation> getMode()Get voting modeGet 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.getUser()Get the user's designation for the bugGet free text evaluation of the buglongReturn the time the user last changed their evaluation of this bugbooleanAttempt to initialize the cloudvoidInitiate communication with the cloud.booleanreturns whether the bug is stored remotely or not.booleanbooleanvoidSet voting modevoidsetSaveSignInInformation(boolean save) Whether the cloud should save login information, session ID's, etc.voidsignIn()voidsignOut()voidstoreUserAnnotation(BugInstance bugInstance) Update user designation and evaluation from information in bug instance and push to databasevoidWaits 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) Methods inherited from class edu.umd.cs.findbugs.cloud.AbstractCloud
addListener, addStatusListener, canSeeCommentsByOthers, canStoreUserAnnotation, claim, claimedBy, communicationInitiated, createTask, fileBug, fireIssueDataDownloadedEvent, getBugByHash, getBugCollection, getBugIsUnassigned, getBugLink, getBugLinkStatus, getBugLinkType, getBugStatus, getClassificationDisagreement, getClassificationScore, getClassificationVariance, getCloudName, getCloudProperty, getCloudReport, getCloudReportWithoutMe, getConsensusDesignation, getFirstSeen, getGuiCallback, getIWillFix, getLocalFirstSeen, getNumberReviewers, getPlugin, getPortionObsoleteClassifications, getReviewers, getSigninState, getSourceLink, getSourceLinkToolTip, getStatusMsg, getUserDate, getUsernameLookup, getWillNotBeFixed, hasVoted, isInitialized, issueDataHasBeenDownloaded, notInCloudMsg, overallClassificationIsNotAProblem, printCloudSummary, printLeaderBoard2, removeListener, removeStatusListener, setBugLinkOnCloudAndStoreIssueDetails, setSigninState, setStatusMsg, shutdown, supportsBugLinks, supportsClaims, supportsCloudReports, supportsCloudSummaries, supportsSourceLinks, updateBugStatusCache, updatedIssue, updatedStatus
-
Constructor Details
-
BugCollectionStorageCloud
Constructor is not protected to allow CloudFactory.createCloudWithoutInitializing() create a new instance of this cloud
-
-
Method Details
-
initialize
public boolean initialize()Description copied from interface:CloudAttempt to initialize the cloud- Specified by:
initializein interfaceCloud- Overrides:
initializein classAbstractCloud- Returns:
- true if successful
-
waitUntilIssueDataDownloaded
public void waitUntilIssueDataDownloaded()Description copied from interface:CloudWaits until all data about this bug collection has been received from the cloud. -
initiateCommunication
public void initiateCommunication()Description copied from interface:CloudInitiate 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 toCloud.waitUntilIssueDataDownloaded(). A call to this method forces eager initiation of communication. -
waitUntilNewIssuesUploaded
- Throws:
InterruptedException
-
waitUntilIssueDataDownloaded
public boolean waitUntilIssueDataDownloaded(long timeout, TimeUnit unit) throws InterruptedException - Throws:
InterruptedException
-
getMode
Description copied from interface:CloudGet voting mode- Specified by:
getModein interfaceCloud- Overrides:
getModein classAbstractCloud
-
getUser
-
getUserDesignation
Description copied from interface:CloudGet the user's designation for the bug- Specified by:
getUserDesignationin interfaceCloud- Overrides:
getUserDesignationin classAbstractCloud
-
getUserEvaluation
Description copied from interface:CloudGet free text evaluation of the bug- Specified by:
getUserEvaluationin interfaceCloud- Overrides:
getUserEvaluationin classAbstractCloud
-
getUserTimestamp
Description copied from interface:CloudReturn the time the user last changed their evaluation of this bug- Specified by:
getUserTimestampin interfaceCloud- Overrides:
getUserTimestampin classAbstractCloud
-
setMode
Description copied from interface:CloudSet voting mode- Specified by:
setModein interfaceCloud- Overrides:
setModein classAbstractCloud
-
bugsPopulated
public void bugsPopulated()Description copied from interface:CloudCalled after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is called- Specified by:
bugsPopulatedin interfaceCloud- Overrides:
bugsPopulatedin classAbstractCloud
-
setSaveSignInInformation
public void setSaveSignInInformation(boolean save) Description copied from interface:CloudWhether the cloud should save login information, session ID's, etc. If disabled, the user will need to re-authenticate each session. -
isSavingSignInInformationEnabled
public boolean isSavingSignInInformationEnabled() -
signIn
public void signIn() -
signOut
public void signOut() -
availableForInitialization
public boolean availableForInitialization()Description copied from interface:CloudDo 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
-
storeUserAnnotation
Description copied from interface:CloudUpdate user designation and evaluation from information in bug instance and push to database -
bugFiled
Description copied from interface:CloudNote 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
-
getPrimaryDesignation
Description copied from interface:CloudGet the most recent BugDesignation from the current user -
getLatestDesignationFromEachUser
- Specified by:
getLatestDesignationFromEachUserin classAbstractCloud
-
getProjects
Description copied from interface:CloudGet a list of names of FB projects that the given class "may be a part of." Used for filing bugs. -
isInCloud
Description copied from interface:Cloudreturns whether the bug is stored remotely or not. for bug collection storage, always returns true -
isOnlineCloud
public boolean isOnlineCloud() -
waitUntilNewIssuesUploaded
public void waitUntilNewIssuesUploaded()Description copied from interface:CloudWaits until all new issues have been uploaded -
addDateSeen
- Specified by:
addDateSeenin interfaceCloud- Overrides:
addDateSeenin classAbstractCloud
-