Class 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 Detail

      • BugCollectionStorageCloud

        public BugCollectionStorageCloud​(CloudPlugin plugin,
                                         BugCollection bc,
                                         java.util.Properties properties)
        Constructor is not protected to allow CloudFactory.createCloudWithoutInitializing() create a new instance of this cloud
    • Method Detail

      • 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,
                                                  java.util.concurrent.TimeUnit unit)
                                           throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • waitUntilIssueDataDownloaded

        public boolean waitUntilIssueDataDownloaded​(long timeout,
                                                    java.util.concurrent.TimeUnit unit)
                                             throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getUser

        public java.lang.String getUser()
      • 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,
                             java.lang.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
      • getProjects

        public java.util.Collection<java.lang.String> getProjects​(java.lang.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