From e906b47ae4ef5f20075295d8fc9c177a6041e03e Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 14 Aug 2009 07:57:51 +0000 Subject: [PATCH] Doc: Improve javadoc git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@673 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- .../DavMailAuthenticationException.java | 3 ++- .../davmail/exception/DavMailException.java | 27 +++++++++++++++++++ .../davmail/exchange/ExchangeSession.java | 4 ++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exception/DavMailAuthenticationException.java b/src/java/davmail/exception/DavMailAuthenticationException.java index d2740141..259edc4b 100644 --- a/src/java/davmail/exception/DavMailAuthenticationException.java +++ b/src/java/davmail/exception/DavMailAuthenticationException.java @@ -23,7 +23,8 @@ package davmail.exception; */ public class DavMailAuthenticationException extends DavMailException { /** - * Create a DavMail exception with the given BundleMessage key + * Create a DavMail authentication exception with the given BundleMessage key. + * * @param key message key */ public DavMailAuthenticationException(String key) { diff --git a/src/java/davmail/exception/DavMailException.java b/src/java/davmail/exception/DavMailException.java index 61fb2d45..8445b1ff 100644 --- a/src/java/davmail/exception/DavMailException.java +++ b/src/java/davmail/exception/DavMailException.java @@ -29,23 +29,50 @@ import java.util.Locale; public class DavMailException extends IOException { private final BundleMessage message; + /** + * Create a DavMail exception with the given BundleMessage key and arguments. + * + * @param key message key + * @param arguments message values + */ public DavMailException(String key, Object... arguments) { this.message = new BundleMessage(key, arguments); } + /** + * Get formatted message + * + * @return formatted message + */ @Override public String getMessage() { return message.format(); } + /** + * Get formatted message using locale. + * + * @param locale locale + * @return localized formatted message + */ public String getMessage(Locale locale) { return message.format(locale); } + /** + * Get formatted message for logging. + * + * @return english formatted message + */ public String getLogMessage() { return message.formatLog(); } + /** + * Get internal exception BundleMessage. + * + * @return unformatted message + */ public BundleMessage getBundleMessage() { return message; } diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index bb2e98fd..7451e360 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -2563,5 +2563,7 @@ public class ExchangeSession { } } } - +public HttpClient getHttpClient() { + return httpClient; +} }