Class BugCollectionStorageCloud

java.lang.Object
edu.umd.cs.findbugs.cloud.AbstractCloud
edu.umd.cs.findbugs.cloud.BugCollectionStorageCloud
All Implemented Interfaces:
Cloud

public class BugCollectionStorageCloud extends AbstractCloud
A basic "cloud" that stores information to the bug collection analysis XML file.
Author:
pwilliam
  • Constructor Details

    • BugCollectionStorageCloud

      public BugCollectionStorageCloud(CloudPlugin plugin, BugCollection bc, Properties properties)
      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: Cloud
      Attempt to initialize the cloud
      Specified by:
      initialize in interface Cloud
      Overrides:
      initialize in class AbstractCloud
      Returns:
      true if successful
    • waitUntilIssueDataDownloaded

      public void waitUntilIssueDataDownloaded()
      Description copied from interface: Cloud
      Waits until all data about this bug collection has been received from the cloud.
    • initiateCommunication

      public void initiateCommunication()
      Description copied from interface: Cloud
      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 Cloud.waitUntilIssueDataDownloaded(). A call to this method forces eager initiation of communication.
    • waitUntilNewIssuesUploaded

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

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

      public Cloud.Mode getMode()
      Description copied from interface: Cloud
      Get voting mode
      Specified by:
      getMode in interface Cloud
      Overrides:
      getMode in class AbstractCloud
    • getUser

      public String getUser()
    • getUserDesignation

      public Cloud.UserDesignation getUserDesignation(BugInstance b)
      Description copied from interface: Cloud
      Get the user's designation for the bug
      Specified by:
      getUserDesignation in interface Cloud
      Overrides:
      getUserDesignation in class AbstractCloud
    • getUserEvaluation

      public String getUserEvaluation(BugInstance b)
      Description copied from interface: Cloud
      Get free text evaluation of the bug
      Specified by:
      getUserEvaluation in interface Cloud
      Overrides:
      getUserEvaluation in class AbstractCloud
    • getUserTimestamp

      public long getUserTimestamp(BugInstance b)
      Description copied from interface: Cloud
      Return the time the user last changed their evaluation of this bug
      Specified by:
      getUserTimestamp in interface Cloud
      Overrides:
      getUserTimestamp in class AbstractCloud
    • setMode

      public void setMode(Cloud.Mode m)
      Description copied from interface: Cloud
      Set voting mode
      Specified by:
      setMode in interface Cloud
      Overrides:
      setMode in class AbstractCloud
    • bugsPopulated

      public void bugsPopulated()
      Description copied from interface: Cloud
      Called after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is called
      Specified by:
      bugsPopulated in interface Cloud
      Overrides:
      bugsPopulated in class AbstractCloud
    • setSaveSignInInformation

      public void setSaveSignInInformation(boolean save)
      Description copied from interface: Cloud
      Whether 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: Cloud
      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
    • storeUserAnnotation

      public void storeUserAnnotation(BugInstance bugInstance)
      Description copied from interface: Cloud
      Update user designation and evaluation from information in bug instance and push to database
    • bugFiled

      public void bugFiled(BugInstance b, Object bugLink)
      Description copied from interface: Cloud
      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
    • getPrimaryDesignation

      public BugDesignation getPrimaryDesignation(BugInstance b)
      Description copied from interface: Cloud
      Get the most recent BugDesignation from the current user
    • getLatestDesignationFromEachUser

      protected Iterable<BugDesignation> getLatestDesignationFromEachUser(BugInstance bd)
      Specified by:
      getLatestDesignationFromEachUser in class AbstractCloud
    • getProjects

      public Collection<String> getProjects(String className)
      Description copied from interface: Cloud
      Get a list of names of FB projects that the given class "may be a part of." Used for filing bugs.
    • isInCloud

      public boolean isInCloud(BugInstance b)
      Description copied from interface: Cloud
      returns 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: Cloud
      Waits until all new issues have been uploaded
    • addDateSeen

      public void addDateSeen(BugInstance b, long when)
      Specified by:
      addDateSeen in interface Cloud
      Overrides:
      addDateSeen in class AbstractCloud