From: Roland Häder Date: Tue, 19 Apr 2016 15:55:11 +0000 (+0200) Subject: Continued with refacturing: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7cdf8abcfec1fd4f64af461a30b9e5002c0b76ed;p=jjobs-war.git Continued with refacturing: - added general admin helper for just holding objects - used that new helper for user instance to have auto-completition back - updated properties Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestController.java b/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestController.java new file mode 100644 index 00000000..a063cfdd --- /dev/null +++ b/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestController.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jjobs.beans.helper; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.User; + +/** + * An interface for general bean helper + *

+ * @author Roland Haeder + */ +public interface JobsAdminWebRequestController extends Serializable { + + /** + * Getter for user instance + *

+ * @return User instance + */ + User getUser (); + + /** + * Setter for user instance + *

+ * @param user User instance + */ + void setUser (final User user); + +} diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java b/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java new file mode 100644 index 00000000..01eff4e7 --- /dev/null +++ b/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jjobs.beans.helper; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Named; +import org.mxchange.jusercore.model.user.User; + +/** + * A general helper for beans + *

+ * @author Roland Haeder + */ +@Named ("adminHelper") +@RequestScoped +public class JobsAdminWebRequestHelper implements JobsAdminWebRequestController { + + /** + * Serial number + */ + private static final long serialVersionUID = 17_258_793_567_145_701L; + + /** + * User instance + */ + private User user; + + /** + * Default constructor + */ + public JobsAdminWebRequestHelper () { + } + + @Override + public User getUser () { + return this.user; + } + + @Override + public void setUser (final User user) { + this.user = user; + } + +} diff --git a/web/admin/user/admin_user_delete.xhtml b/web/admin/user/admin_user_delete.xhtml index 176979d0..0fdcb199 100644 --- a/web/admin/user/admin_user_delete.xhtml +++ b/web/admin/user/admin_user_delete.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,7 +20,7 @@ - + Here goes your content. diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index 8c8523be..4d3c97fe 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,7 +20,7 @@ - + Here goes your content. diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 2e45ef73..9d926375 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,32 +20,32 @@ - + - + - - + + - + - + - + @@ -53,7 +53,7 @@ - + @@ -61,19 +61,19 @@ - + - + - + @@ -81,13 +81,13 @@ - + - + @@ -95,7 +95,7 @@ - + @@ -103,81 +103,81 @@ - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index da2dd766..fe96f551 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,7 +20,7 @@ - + Here goes your content.