|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.openstreetmap.josm.io.OsmTransferException
org.openstreetmap.josm.io.ChangesetClosedException
public class ChangesetClosedException
A ChangesetClosedException is thrown if the server replies with a HTTP
return code 409 (Conflict) with the error header ERROR_HEADER_PATTERN
.
Depending on the context the exception is thrown in we have to react differently.
Nested Class Summary | |
---|---|
static class |
ChangesetClosedException.Source
|
Field Summary | |
---|---|
private long |
changesetId
the changeset id |
private java.util.Date |
closedOn
the date on which the changeset was closed |
static java.lang.String |
ERROR_HEADER_PATTERN
the error header pattern for in case of HTTP response 409 indicating that a changeset was closed |
private ChangesetClosedException.Source |
source
the source |
Constructor Summary | |
---|---|
ChangesetClosedException(long changesetId,
java.util.Date closedOn,
ChangesetClosedException.Source source)
Creates the exception |
|
ChangesetClosedException(java.lang.String errorHeader)
Creates the exception with the given errorHeader |
|
ChangesetClosedException(java.lang.String errorHeader,
ChangesetClosedException.Source source)
Creates the exception with the given error header and the given source. |
Method Summary | |
---|---|
static boolean |
errorHeaderMatchesPattern(java.lang.String errorHeader)
Replies true if errorHeader matches with ERROR_HEADER_PATTERN |
long |
getChangesetId()
Replies the id of the changeset which was closed |
java.util.Date |
getClosedOn()
Replies the date the changeset was closed |
ChangesetClosedException.Source |
getSource()
Replies the source where the exception was thrown |
protected void |
parseErrorHeader(java.lang.String errorHeader)
|
void |
setSource(ChangesetClosedException.Source source)
|
Methods inherited from class org.openstreetmap.josm.io.OsmTransferException |
---|
getUrl, setUrl |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ERROR_HEADER_PATTERN
private long changesetId
private java.util.Date closedOn
private ChangesetClosedException.Source source
Constructor Detail |
---|
public ChangesetClosedException(java.lang.String errorHeader)
errorHeader
errorHeader
- the error headerpublic ChangesetClosedException(java.lang.String errorHeader, ChangesetClosedException.Source source)
errorHeader
- the error headersource
- the source for the exceptionpublic ChangesetClosedException(long changesetId, java.util.Date closedOn, ChangesetClosedException.Source source)
changesetId
- the id if the closed changesetclosedOn
- the date the changeset was closed onsource
- the source for the exceptionMethod Detail |
---|
public static boolean errorHeaderMatchesPattern(java.lang.String errorHeader)
errorHeader
matches with ERROR_HEADER_PATTERN
errorHeader
- the error header
errorHeader
matches with ERROR_HEADER_PATTERN
protected void parseErrorHeader(java.lang.String errorHeader)
public long getChangesetId()
public java.util.Date getClosedOn()
public ChangesetClosedException.Source getSource()
public void setSource(ChangesetClosedException.Source source)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |