mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Doc: Improve javadoc
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@673 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
b9b7a5c8d7
commit
e906b47ae4
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -2563,5 +2563,7 @@ public class ExchangeSession {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HttpClient getHttpClient() {
|
||||
return httpClient;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user