From 51c9e3ce4e9bbe65957119212c9a6b2efd1e4b6e Mon Sep 17 00:00:00 2001 From: ulrich <not disclosed> Date: Tue, 27 Dec 2016 18:49:53 +0000 Subject: [PATCH] Initialiser in web Package verschoben, Lizenzkommentare vereinheitlicht --- src/java/de/uhilger/um/web/NiceFilter.java | 21 ++++- web/WEB-INF/web.xml | 2 src/java/de/uhilger/um/daten/UserRole.java | 2 src/java/de/uhilger/um/daten/RoleNameMapper.java | 2 src/java/de/uhilger/um/web/Initialiser.java | 54 ++++-------- src/java/de/uhilger/um/Digester.java | 31 ++++--- src/java/de/uhilger/um/daten/UserData.java | 2 src/java/de/uhilger/um/TomcatDigester.java | 31 ++++--- src/java/de/uhilger/um/api/UserMgr.java | 31 ++++--- src/java/de/uhilger/um/daten/User.java | 2 src/java/de/uhilger/um/daten/MethodenRecht.java | 2 src/java/de/uhilger/um/daten/Methode.java | 2 12 files changed, 91 insertions(+), 91 deletions(-) diff --git a/src/java/de/uhilger/um/Digester.java b/src/java/de/uhilger/um/Digester.java index 0ca00c2..a7cd346 100644 --- a/src/java/de/uhilger/um/Digester.java +++ b/src/java/de/uhilger/um/Digester.java @@ -1,20 +1,21 @@ /* - Nutzerverwaltung - A Generic User Manager - Copyright (c) 2016 Ulrich Hilger - - 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 <http://www.gnu.org/licenses/>. + * Nutzerverwaltung - User and role management in your browser + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de + * + * 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 http://www.gnu.org/licenses/ */ + package de.uhilger.um; /** diff --git a/src/java/de/uhilger/um/TomcatDigester.java b/src/java/de/uhilger/um/TomcatDigester.java index 3c152fd..433ef54 100644 --- a/src/java/de/uhilger/um/TomcatDigester.java +++ b/src/java/de/uhilger/um/TomcatDigester.java @@ -1,20 +1,21 @@ /* - Nutzerverwaltung - A Generic User Manager - Copyright (c) 2016 Ulrich Hilger - - 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 <http://www.gnu.org/licenses/>. + * Nutzerverwaltung - User and role management in your browser + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de + * + * 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 http://www.gnu.org/licenses/ */ + package de.uhilger.um; import org.apache.catalina.realm.RealmBase; diff --git a/src/java/de/uhilger/um/api/UserMgr.java b/src/java/de/uhilger/um/api/UserMgr.java index be04ea2..0edada1 100644 --- a/src/java/de/uhilger/um/api/UserMgr.java +++ b/src/java/de/uhilger/um/api/UserMgr.java @@ -1,20 +1,21 @@ /* - Nutzerverwaltung - A Generic User Manager - Copyright (c) 2016 Ulrich Hilger - - 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 <http://www.gnu.org/licenses/>. + * Nutzerverwaltung - User and role management in your browser + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de + * + * 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 http://www.gnu.org/licenses/ */ + package de.uhilger.um.api; import de.uhilger.baselink.GenericRecord; diff --git a/src/java/de/uhilger/um/daten/Methode.java b/src/java/de/uhilger/um/daten/Methode.java index c7ba73e..01e9b5b 100644 --- a/src/java/de/uhilger/um/daten/Methode.java +++ b/src/java/de/uhilger/um/daten/Methode.java @@ -1,6 +1,6 @@ /* * Nutzerverwaltung - User and role management in your browser - * Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de * * 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 diff --git a/src/java/de/uhilger/um/daten/MethodenRecht.java b/src/java/de/uhilger/um/daten/MethodenRecht.java index 2515d20..409b757 100644 --- a/src/java/de/uhilger/um/daten/MethodenRecht.java +++ b/src/java/de/uhilger/um/daten/MethodenRecht.java @@ -1,6 +1,6 @@ /* * Nutzerverwaltung - User and role management in your browser - * Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de * * 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 diff --git a/src/java/de/uhilger/um/daten/RoleNameMapper.java b/src/java/de/uhilger/um/daten/RoleNameMapper.java index fef2d50..575e47d 100644 --- a/src/java/de/uhilger/um/daten/RoleNameMapper.java +++ b/src/java/de/uhilger/um/daten/RoleNameMapper.java @@ -1,6 +1,6 @@ /* * Nutzerverwaltung - User and role management in your browser - * Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de * * 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 diff --git a/src/java/de/uhilger/um/daten/User.java b/src/java/de/uhilger/um/daten/User.java index db49d56..bc830aa 100644 --- a/src/java/de/uhilger/um/daten/User.java +++ b/src/java/de/uhilger/um/daten/User.java @@ -1,6 +1,6 @@ /* * Nutzerverwaltung - User and role management in your browser - * Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de * * 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 diff --git a/src/java/de/uhilger/um/daten/UserData.java b/src/java/de/uhilger/um/daten/UserData.java index 2bb2252..d8db4b1 100644 --- a/src/java/de/uhilger/um/daten/UserData.java +++ b/src/java/de/uhilger/um/daten/UserData.java @@ -1,6 +1,6 @@ /* * Nutzerverwaltung - User and role management in your browser - * Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de * * 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 diff --git a/src/java/de/uhilger/um/daten/UserRole.java b/src/java/de/uhilger/um/daten/UserRole.java index ce2c97a..e8055a4 100644 --- a/src/java/de/uhilger/um/daten/UserRole.java +++ b/src/java/de/uhilger/um/daten/UserRole.java @@ -1,6 +1,6 @@ /* * Nutzerverwaltung - User and role management in your browser - * Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de * * 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 diff --git a/src/java/de/uhilger/um/Initialiser.java b/src/java/de/uhilger/um/web/Initialiser.java similarity index 85% rename from src/java/de/uhilger/um/Initialiser.java rename to src/java/de/uhilger/um/web/Initialiser.java index 6ae30d7..41da73b 100644 --- a/src/java/de/uhilger/um/Initialiser.java +++ b/src/java/de/uhilger/um/web/Initialiser.java @@ -1,4 +1,22 @@ -package de.uhilger.um; +/* + * Nutzerverwaltung - User and role management in your browser + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de + * + * 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 http://www.gnu.org/licenses/ + */ + +package de.uhilger.um.web; import de.uhilger.baselink.PersistenceManager; import de.uhilger.baselink.Record; @@ -40,15 +58,6 @@ /** Name des SQL-Befehls zum Pruefen, ob die Datenbank vorhanden ist */ public static final String SQL_DB_VORHANDEN = "dbVorhanden"; - /** Anwendungsweite Referenz zur Datenbank */ - //private static PersistenceManager db; - - /** Anwendungsweite Referenz zu den SQL-Befehlen */ - //private static Properties sql; - - /** die Klasse, die von der Nutzerverwaltung zum Verschlüsseln verwendet wird */ - //private static Digester digester; - /** * Diese Webanwendung initialisieren, also z.B. Elemente instantiieren, die * über den Deployment Descritpor veränderlich gehalten sind. @@ -59,8 +68,6 @@ try { initSql(servletContext); initDb(servletContext); - //String digesterClassName = servletContext.getInitParameter(P_DIGESTER); - //digester = (Digester) Class.forName(digesterClassName).newInstance(); } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); } @@ -88,29 +95,6 @@ logger.log(Level.SEVERE, ex.getMessage(), ex); } } - - /* ----------------- statische Getter --------------------- */ - - /** - * Das Zugriffsobjekt fuer die Datenbank dieser Webanwendung - * ermitteln - * - * @return das Zugriffsobjekt zur Datenbank dieser Webanwendung - */ - /* - public static PersistenceManager getDatabase() { - if(db == null) { - db = new PersistenceManager(); - } - return db; - } - */ - - /* - public static Digester getDigester() { - return digester; - } - */ /* ----------------- Logik zur Datenbank-Erzeugung ------------ */ diff --git a/src/java/de/uhilger/um/web/NiceFilter.java b/src/java/de/uhilger/um/web/NiceFilter.java index ccb9263..c0d120b 100644 --- a/src/java/de/uhilger/um/web/NiceFilter.java +++ b/src/java/de/uhilger/um/web/NiceFilter.java @@ -1,8 +1,21 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Nutzerverwaltung - User and role management in your browser + * Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de + * + * 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 http://www.gnu.org/licenses/ */ + package de.uhilger.um.web; import java.io.IOException; @@ -31,7 +44,7 @@ hier wird ein URL wie z.B. http]://example.com/um/svc/testmethode umgesetzt auf - http]://example,com/um/api?c=de.uhilger.um.api.UserMgr&m=testmethode + http]://example.com/um/api?c=de.uhilger.um.api.UserMgr&m=testmethode der Teil 'svc' ist im Filter Mapping des Deployment Descriptor deklariert. Der Teil 'api' zeigt mit Hilfe eines Servlet diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index 954bd19..268a82d 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -18,7 +18,7 @@ <url-pattern>/svc/*</url-pattern> </filter-mapping> <listener> - <listener-class>de.uhilger.um.Initialiser</listener-class> + <listener-class>de.uhilger.um.web.Initialiser</listener-class> </listener> <servlet> <servlet-name>TransitServlet</servlet-name> -- Gitblit v1.9.3