Package apps.util.issuereporter
Class IssueReport
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- apps.util.issuereporter.IssueReport
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
- Direct Known Subclasses:
BugReport
,EnhancementRequest
@API(status=INTERNAL, consumers="apps.util.issuereporter.*") public abstract class IssueReport extends Bean
Common code for the various types of problem reports.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
body
protected java.lang.String
title
protected boolean
tooLong
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description IssueReport(java.lang.String title, java.lang.String body)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.List<java.io.File>
getAttachments()
java.lang.String
getBody()
java.lang.String
getIssueFooter()
java.lang.String
getSimpleContext()
Get the simple context (JMRI version, Java version, and OS)protected abstract void
prepare()
Prepare a report.java.net.URI
submit(GitHubRepository repository)
Submit a report.-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Constructor Detail
-
IssueReport
IssueReport(java.lang.String title, java.lang.String body)
-
-
Method Detail
-
submit
@Nonnull public java.net.URI submit(GitHubRepository repository) throws java.net.URISyntaxException, java.io.IOException, IssueReport414Exception
Submit a report.- Parameters:
repository
- the GitHub repository to submit to- Returns:
- the URI to submit the report to
- Throws:
java.net.URISyntaxException
- if unable to create URI for issuejava.io.IOException
- if unable to connect to GitHubIssueReport414Exception
- if report is too long
-
prepare
protected abstract void prepare()
Prepare a report.
-
getAttachments
@Nonnull public java.util.List<java.io.File> getAttachments()
-
getSimpleContext
@Nonnull public java.lang.String getSimpleContext()
Get the simple context (JMRI version, Java version, and OS)- Returns:
- the context
-
getIssueFooter
@Nonnull public java.lang.String getIssueFooter()
-
-