aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at/gv
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-09-19 16:19:00 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-09-19 16:19:00 +0200
commita27cf61551c129aee48ea533ad73f2ade37a757a (patch)
treec97a1ccc7b3afdec906c609de165b582db2b3149 /id/server/moa-id-commons/src/main/java/at/gv
parent2c7d70f182b554321b6baf3e225139a883d61035 (diff)
downloadmoa-id-spss-a27cf61551c129aee48ea533ad73f2ade37a757a.tar.gz
moa-id-spss-a27cf61551c129aee48ea533ad73f2ade37a757a.tar.bz2
moa-id-spss-a27cf61551c129aee48ea533ad73f2ade37a757a.zip
ConfigWebTool Version 0.9.5
--PVP2 Login --PVP2 Users to UserDatabase functionality --Mailaddress verification --Mail status messages to users and admin --add List with OpenRequests for admins --change OA Target configuration --add cleanUp Thread to remove old unused UserAccount requests --update UserDatabase to support PVP2 logins --add formID element validate received forms -- add first classes for STORK configuration make some Bugfixes
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at/gv')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java44
1 files changed, 41 insertions, 3 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
index 20fc4c845..d281eebbc 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
@@ -27,11 +27,13 @@ public class ConfigurationDBRead {
QUERIES.put("getAllNewOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '0' and onlineapplication.isAdminRequired = '1'");
QUERIES.put("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
- QUERIES.put("getNewUserWithUserTokken", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken and userdatabase.isUserRequest = '1'");
- QUERIES.put("getAllNewUsers", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is null and userdatabase.isUserRequest = '1'");
+ QUERIES.put("getNewUserWithUserTokken", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken");
+ QUERIES.put("getAllNewUsers", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '1'");
+ QUERIES.put("getAllOpenUsersRequests", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is not null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '0'");
QUERIES.put("getUserWithUserBPKWBPK", "select userdatabase from UserDatabase userdatabase where userdatabase.bpk = :bpk");
QUERIES.put("getUserWithUserUsername", "select userdatabase from UserDatabase userdatabase where userdatabase.username = :username");
QUERIES.put("getAllUsers", "select userdatabase from UserDatabase userdatabase");
+ QUERIES.put("getUsersWithOADBID", "select userdatabase from UserDatabase userdatabase inner join userdatabase.onlineApplication oa where oa.hjid = :id");
QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id"); }
@SuppressWarnings("rawtypes")
@@ -241,7 +243,25 @@ public class ConfigurationDBRead {
return (UserDatabase) result.get(0);
}
-
+ public static UserDatabase getUsersWithOADBID(long id) {
+ MiscUtil.assertNotNull(id, "OADBID");
+ Logger.trace("Getting Userinformation with OADBID " + id + " from database.");
+
+ List<UserDatabase> result;
+ EntityManager session = ConfigurationDBUtils.getCurrentSession();
+
+ javax.persistence.Query query = session.createQuery(QUERIES.get("getUsersWithOADBID"));
+ query.setParameter("id", id);
+ result = query.getResultList();
+
+ Logger.trace("Found entries: " + result.size());
+
+ if (result.size() == 0) {
+ Logger.trace("No entries found.");
+ return null;
+ }
+ return (UserDatabase) result.get(0);
+ }
public static UserDatabase getUserWithUserName(String username) {
MiscUtil.assertNotNull(username, "UserName");
@@ -320,4 +340,22 @@ public class ConfigurationDBRead {
}
return result;
}
+
+ public static List<UserDatabase> getAllOpenUsersRequests() {
+ Logger.trace("Get all new Users from Database");
+
+ List<UserDatabase> result;
+ EntityManager session = ConfigurationDBUtils.getCurrentSession();
+
+ javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOpenUsersRequests"));
+ result = query.getResultList();
+
+ Logger.trace("Found entries: " + result.size());
+
+ if (result.size() == 0) {
+ Logger.trace("No entries found.");
+ return null;
+ }
+ return result;
+ }
}