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.
  • 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

      void printCloudSummary(PrintWriter w, Iterable<BugInstance> bugs, 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 IOException
      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

      boolean waitUntilNewIssuesUploaded(long timeout, TimeUnit unit) throws InterruptedException
      Throws:
      InterruptedException
    • waitUntilIssueDataDownloaded

      void waitUntilIssueDataDownloaded()
      Waits until all data about this bug collection has been received from the cloud.
    • waitUntilIssueDataDownloaded

      boolean waitUntilIssueDataDownloaded(long timeout, TimeUnit unit) throws InterruptedException
      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 to waitUntilIssueDataDownloaded(). 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

      void signIn() throws IOException
      Throws:
      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

      Collection<String> getProjects(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

      String getSourceLinkToolTip(@CheckForNull BugInstance b)
      Tool tip text for "view source" button
    • getSourceLink

      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

      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

      URL getBugLink(BugInstance b)
      Get link for bug, either to file one or to view it
    • getBugLinkType

      String getBugLinkType(BugInstance instance)
    • fileBug

      URL fileBug(BugInstance b)
    • setBugLinkOnCloudAndStoreIssueDetails

      void setBugLinkOnCloudAndStoreIssueDetails(BugInstance b, String viewUrl, String linkType) throws IOException, SignInCancelledException
      Throws:
      IOException
      SignInCancelledException
    • updateBugStatusCache

      void updateBugStatusCache(BugInstance b, String status)
      Updates the local cache of bug reporting status. Does not modify server code.
    • bugFiled

      void bugFiled(BugInstance b, @CheckForNull Object bugLink)
      Note that we've initiated or completed a request to file a bug;
      Parameters:
      b - bug against which bug was filed
      bugLink - if we have any information about the result of filing the bug, it should go here
    • getCloudReport

      String getCloudReport(BugInstance b)
    • getCloudReportWithoutMe

      String getCloudReportWithoutMe(BugInstance b)
    • claimedBy

      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

      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

      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

      Set<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.UNCLASSIFIED if 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