public abstract class AbstractCloud extends Object implements Cloud
Cloud.BugFilingStatus, Cloud.CloudListener, Cloud.CloudStatusListener, Cloud.CloudTask, Cloud.CloudTaskListener, Cloud.Mode, Cloud.SigninState, Cloud.UserDesignation
Modifier and Type | Field and Description |
---|---|
protected BugCollection |
bugCollection |
static long |
MIN_TIMESTAMP |
protected CloudPlugin |
plugin |
protected PropertyBundle |
properties |
protected static boolean |
THROW_EXCEPTION_IF_CANT_CONNECT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractCloud(CloudPlugin plugin,
BugCollection bugs,
Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
addDateSeen(BugInstance b,
long when) |
void |
addListener(Cloud.CloudListener listener) |
void |
addStatusListener(Cloud.CloudStatusListener listener) |
void |
bugsPopulated()
Called after the bugs in the bug collection are loaded; bugs should not
be synchronized before this method is called
|
boolean |
canSeeCommentsByOthers(BugInstance bug) |
boolean |
canStoreUserAnnotation(BugInstance bugInstance)
Is this bug one that gets persisted to the cloud?
|
boolean |
claim(BugInstance b)
Claim the bug
|
String |
claimedBy(BugInstance b)
Get the user who has claimed a bug; null if no one has
|
boolean |
communicationInitiated()
Returns true if communication has already been initiated (and perhaps completed).
|
MutableCloudTask |
createTask(String name) |
URL |
fileBug(BugInstance bug) |
protected void |
fireIssueDataDownloadedEvent() |
BugInstance |
getBugByHash(String hash) |
BugCollection |
getBugCollection() |
boolean |
getBugIsUnassigned(BugInstance b)
does the issue have an unassigned issue in the bug tracker
|
URL |
getBugLink(BugInstance b)
Get link for bug, either to file one or to view it
|
Cloud.BugFilingStatus |
getBugLinkStatus(BugInstance b)
get the bug filing status for a bug instance
|
String |
getBugLinkType(BugInstance instance) |
String |
getBugStatus(BugInstance b)
A textual description of the bug status (e.g., FIX_LATER, ASSIGNED,
OBSOLETE, WILL_NOT_FIX)
|
double |
getClassificationDisagreement(BugInstance b) |
double |
getClassificationScore(BugInstance b) |
double |
getClassificationVariance(BugInstance b) |
String |
getCloudName() |
protected String |
getCloudProperty(String propertyName) |
String |
getCloudReport(BugInstance b) |
String |
getCloudReportWithoutMe(BugInstance b) |
Cloud.UserDesignation |
getConsensusDesignation(BugInstance b) |
long |
getFirstSeen(BugInstance b) |
IGuiCallback |
getGuiCallback() |
boolean |
getIWillFix(BugInstance b)
has the user said they will fix this bug
|
protected abstract Iterable<BugDesignation> |
getLatestDesignationFromEachUser(BugInstance bd) |
long |
getLocalFirstSeen(BugInstance b) |
Cloud.Mode |
getMode()
Get voting mode
|
int |
getNumberReviewers(BugInstance b) |
CloudPlugin |
getPlugin() |
double |
getPortionObsoleteClassifications(BugInstance b) |
Set<String> |
getReviewers(BugInstance b) |
Cloud.SigninState |
getSigninState() |
URL |
getSourceLink(BugInstance b)
URL to view the source for a bug instance
|
String |
getSourceLinkToolTip(BugInstance b)
Tool tip text for "view source" button
|
String |
getStatusMsg()
Get a status message for the cloud; information about any errors, and
information about database synchronization
|
Date |
getUserDate(BugInstance b) |
Cloud.UserDesignation |
getUserDesignation(BugInstance b)
Get the user's designation for the bug
|
String |
getUserEvaluation(BugInstance b)
Get free text evaluation of the bug
|
protected NameLookup |
getUsernameLookup() |
long |
getUserTimestamp(BugInstance b)
Return the time the user last changed their evaluation of this bug
|
boolean |
getWillNotBeFixed(BugInstance b)
has the issue been marked "will not be fixed" in a bug tracker
|
boolean |
hasVoted(BugInstance bug) |
boolean |
initialize()
Attempt to initialize the cloud
|
boolean |
isInitialized()
Return true if the cloud has been successfully initialized
|
protected boolean |
issueDataHasBeenDownloaded() |
String |
notInCloudMsg(BugInstance b) |
boolean |
overallClassificationIsNotAProblem(BugInstance b) |
void |
printCloudSummary(PrintWriter w,
Iterable<BugInstance> bugs,
String[] packagePrefixes) |
static void |
printLeaderBoard2(PrintWriter w,
Multiset<String> evaluations,
int maxRows,
String alwaysPrint,
String format,
String title) |
void |
removeListener(Cloud.CloudListener listener) |
void |
removeStatusListener(Cloud.CloudStatusListener listener) |
void |
setBugLinkOnCloudAndStoreIssueDetails(BugInstance b,
String viewUrl,
String linkType) |
void |
setMode(Cloud.Mode mode)
Set voting mode
|
void |
setSigninState(Cloud.SigninState state) |
void |
setStatusMsg(String newMsg) |
void |
shutdown()
Shutdown the cloud, note termination of session, close connections
|
boolean |
supportsBugLinks()
Supports links to a bug database
|
boolean |
supportsClaims()
Supports allowing users to claim a bug
|
boolean |
supportsCloudReports()
Supports textual summaries about the status of a bug
|
boolean |
supportsCloudSummaries() |
boolean |
supportsSourceLinks()
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 |
updatedIssue(BugInstance bug) |
protected void |
updatedStatus() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
availableForInitialization, bugFiled, getPrimaryDesignation, getProjects, getUser, initiateCommunication, isInCloud, isOnlineCloud, isSavingSignInInformationEnabled, setSaveSignInInformation, signIn, signOut, storeUserAnnotation, waitUntilIssueDataDownloaded, waitUntilIssueDataDownloaded, waitUntilNewIssuesUploaded, waitUntilNewIssuesUploaded
public static long MIN_TIMESTAMP
protected static final boolean THROW_EXCEPTION_IF_CANT_CONNECT
protected final CloudPlugin plugin
protected final BugCollection bugCollection
protected final PropertyBundle properties
protected AbstractCloud(CloudPlugin plugin, BugCollection bugs, Properties properties)
public boolean isInitialized()
Cloud
isInitialized
in interface Cloud
@OverridingMethodsMustInvokeSuper public boolean initialize() throws IOException
Cloud
initialize
in interface Cloud
IOException
public Cloud.Mode getMode()
Cloud
public void setMode(Cloud.Mode mode)
Cloud
public CloudPlugin getPlugin()
public BugCollection getBugCollection()
getBugCollection
in interface Cloud
public boolean supportsBugLinks()
Cloud
supportsBugLinks
in interface Cloud
public void setBugLinkOnCloudAndStoreIssueDetails(BugInstance b, String viewUrl, String linkType) throws IOException, SignInCancelledException
setBugLinkOnCloudAndStoreIssueDetails
in interface Cloud
IOException
SignInCancelledException
public void updateBugStatusCache(BugInstance b, String status)
Cloud
updateBugStatusCache
in interface Cloud
public boolean supportsClaims()
Cloud
supportsClaims
in interface Cloud
public boolean supportsCloudReports()
Cloud
supportsCloudReports
in interface Cloud
public String claimedBy(BugInstance b)
Cloud
public boolean claim(BugInstance b)
Cloud
public URL getBugLink(BugInstance b)
Cloud
getBugLink
in interface Cloud
public String getBugLinkType(BugInstance instance)
getBugLinkType
in interface Cloud
public URL fileBug(BugInstance bug)
public Cloud.BugFilingStatus getBugLinkStatus(BugInstance b)
Cloud
getBugLinkStatus
in interface Cloud
public boolean canSeeCommentsByOthers(BugInstance bug)
public boolean hasVoted(BugInstance bug)
public String notInCloudMsg(BugInstance b)
public String getCloudReport(BugInstance b)
getCloudReport
in interface Cloud
public String getCloudReportWithoutMe(BugInstance b)
getCloudReportWithoutMe
in interface Cloud
public void bugsPopulated()
Cloud
bugsPopulated
in interface Cloud
protected boolean issueDataHasBeenDownloaded()
public String getBugStatus(BugInstance b)
Cloud
getBugStatus
in interface Cloud
protected abstract Iterable<BugDesignation> getLatestDesignationFromEachUser(BugInstance bd)
public Date getUserDate(BugInstance b)
getUserDate
in interface Cloud
public void addListener(Cloud.CloudListener listener)
addListener
in interface Cloud
public void removeListener(Cloud.CloudListener listener)
removeListener
in interface Cloud
public void addStatusListener(Cloud.CloudStatusListener listener)
addStatusListener
in interface Cloud
public void removeStatusListener(Cloud.CloudStatusListener listener)
removeStatusListener
in interface Cloud
public String getStatusMsg()
Cloud
getStatusMsg
in interface Cloud
public void shutdown()
Cloud
public boolean getIWillFix(BugInstance b)
Cloud
getIWillFix
in interface Cloud
public Cloud.UserDesignation getConsensusDesignation(BugInstance b)
getConsensusDesignation
in interface Cloud
Cloud.UserDesignation.UNCLASSIFIED
if no consensus has been reachedpublic boolean overallClassificationIsNotAProblem(BugInstance b)
overallClassificationIsNotAProblem
in interface Cloud
public double getClassificationScore(BugInstance b)
getClassificationScore
in interface Cloud
public double getClassificationVariance(BugInstance b)
getClassificationVariance
in interface Cloud
public double getPortionObsoleteClassifications(BugInstance b)
getPortionObsoleteClassifications
in interface Cloud
public int getNumberReviewers(BugInstance b)
getNumberReviewers
in interface Cloud
public void printCloudSummary(PrintWriter w, Iterable<BugInstance> bugs, String[] packagePrefixes)
printCloudSummary
in interface Cloud
public static void printLeaderBoard2(PrintWriter w, Multiset<String> evaluations, int maxRows, String alwaysPrint, String format, String title)
public boolean supportsCloudSummaries()
supportsCloudSummaries
in interface Cloud
public boolean canStoreUserAnnotation(BugInstance bugInstance)
Cloud
canStoreUserAnnotation
in interface Cloud
public double getClassificationDisagreement(BugInstance b)
getClassificationDisagreement
in interface Cloud
public Cloud.UserDesignation getUserDesignation(BugInstance b)
Cloud
getUserDesignation
in interface Cloud
public String getUserEvaluation(BugInstance b)
Cloud
getUserEvaluation
in interface Cloud
public long getUserTimestamp(BugInstance b)
Cloud
getUserTimestamp
in interface Cloud
public long getFirstSeen(BugInstance b)
getFirstSeen
in interface Cloud
public void addDateSeen(BugInstance b, long when)
addDateSeen
in interface Cloud
protected void updatedStatus()
public void updatedIssue(BugInstance bug)
protected void fireIssueDataDownloadedEvent()
public Cloud.SigninState getSigninState()
getSigninState
in interface Cloud
public void setSigninState(Cloud.SigninState state)
public BugInstance getBugByHash(String hash)
protected NameLookup getUsernameLookup() throws IOException
IOException
public MutableCloudTask createTask(String name)
public void setStatusMsg(String newMsg)
public boolean supportsSourceLinks()
Cloud
supportsSourceLinks
in interface Cloud
@CheckForNull public URL getSourceLink(BugInstance b)
Cloud
getSourceLink
in interface Cloud
public String getSourceLinkToolTip(BugInstance b)
Cloud
getSourceLinkToolTip
in interface Cloud
public boolean getBugIsUnassigned(BugInstance b)
Cloud
getBugIsUnassigned
in interface Cloud
public boolean getWillNotBeFixed(BugInstance b)
Cloud
getWillNotBeFixed
in interface Cloud
public Set<String> getReviewers(BugInstance b)
getReviewers
in interface Cloud
public IGuiCallback getGuiCallback()
getGuiCallback
in interface Cloud
public String getCloudName()
getCloudName
in interface Cloud
public boolean communicationInitiated()
Cloud
communicationInitiated
in interface Cloud
public long getLocalFirstSeen(BugInstance b)
Copyright © 2003–2015. All rights reserved.