From: Roland Haeder Date: Tue, 6 Oct 2015 10:12:30 +0000 (+0200) Subject: updated jars + added new exceptions for user X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e2a36baa450dfb23d33538bef2f6765444edc04d;p=juser-core.git updated jars + added new exceptions for user Signed-off-by:Roland Häder --- diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 60d3cc8..5fd68dc 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index 2c6f30e..b506a16 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 19ec1c4..d87f56d 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/src/org/mxchange/jusercore/exceptions/UserNotFoundException.java b/src/org/mxchange/jusercore/exceptions/UserNotFoundException.java new file mode 100644 index 0000000..e10b64b --- /dev/null +++ b/src/org/mxchange/jusercore/exceptions/UserNotFoundException.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jusercore.exceptions; + +import java.text.MessageFormat; +import org.mxchange.jusercore.model.user.User; + +/** + * An exception thrown when the user's account was not found + *

+ * @author Roland Haeder + */ +public class UserNotFoundException extends Exception { + + /** + * Serial number + */ + private static final long serialVersionUID = 42_895_928_956_718_956L; + + /** + * Constructor with already registered user instance + *

+ * @param user User instance + */ + public UserNotFoundException (final User user) { + // Call super contructor + super(MessageFormat.format("User name {0} not found.", user.getUserName())); + } +} diff --git a/src/org/mxchange/jusercore/exceptions/UserStatusLockedException.java b/src/org/mxchange/jusercore/exceptions/UserStatusLockedException.java new file mode 100644 index 0000000..1e785e1 --- /dev/null +++ b/src/org/mxchange/jusercore/exceptions/UserStatusLockedException.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jusercore.exceptions; + +import java.text.MessageFormat; +import org.mxchange.jusercore.model.user.User; + +/** + * An exception thrown when the user account is locked + *

+ * @author Roland Haeder + */ +public class UserStatusLockedException extends Exception { + + /** + * Serial number + */ + private static final long serialVersionUID = 438_395_891_288_681L; + + /** + * Constructor with already registered user instance + *

+ * @param user User instance + */ + public UserStatusLockedException (final User user) { + // Call super contructor + super(MessageFormat.format("User account with user name {0} is locked.", user.getUserName())); + } +} diff --git a/src/org/mxchange/jusercore/exceptions/UserStatusUnconfirmedException.java b/src/org/mxchange/jusercore/exceptions/UserStatusUnconfirmedException.java new file mode 100644 index 0000000..68779d6 --- /dev/null +++ b/src/org/mxchange/jusercore/exceptions/UserStatusUnconfirmedException.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jusercore.exceptions; + +import java.text.MessageFormat; +import org.mxchange.jusercore.model.user.User; + +/** + * An exception thrown when the user account is unconfirmed + *

+ * @author Roland Haeder + */ +public class UserStatusUnconfirmedException extends Exception { + + /** + * Serial number + */ + private static final long serialVersionUID = 438_395_891_288_681L; + + /** + * Constructor with already registered user instance + *

+ * @param user User instance + */ + public UserStatusUnconfirmedException (final User user) { + // Call super contructor + super(MessageFormat.format("User account with user name {0} is unconfirmed.", user.getUserName())); + } +}