From 9464f7fc790cf54760b247681c4cd6417ff8a995 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2014 11:53:38 +0100 Subject: Authentifizierung über Masterserver funktioniert nun --- Dozentenmodul/.classpath | 1 + Dozentenmodul/bin/gui/Login_GUI$1.class | Bin 1082 -> 1082 bytes Dozentenmodul/bin/gui/Login_GUI$2.class | Bin 635 -> 635 bytes Dozentenmodul/bin/gui/Login_GUI$3.class | Bin 2392 -> 4049 bytes Dozentenmodul/bin/gui/Login_GUI.class | Bin 3731 -> 3947 bytes Dozentenmodul/bin/thrift/AuthenticationError.class | Bin 0 -> 1583 bytes ...ion$AuthenticationExceptionStandardScheme.class | Bin 0 -> 2988 bytes ...henticationExceptionStandardSchemeFactory.class | Bin 0 -> 1157 bytes ...eption$AuthenticationExceptionTupleScheme.class | Bin 0 -> 2442 bytes ...AuthenticationExceptionTupleSchemeFactory.class | Bin 0 -> 1133 bytes .../thrift/AuthenticationException$_Fields.class | Bin 0 -> 3046 bytes .../bin/thrift/AuthenticationException.class | Bin 0 -> 11125 bytes Dozentenmodul/bin/thrift/AuthorizationError.class | Bin 0 -> 1494 bytes ...tion$AuthorizationExceptionStandardScheme.class | Bin 0 -> 2973 bytes ...thorizationExceptionStandardSchemeFactory.class | Bin 0 -> 1141 bytes ...ception$AuthorizationExceptionTupleScheme.class | Bin 0 -> 2427 bytes ...$AuthorizationExceptionTupleSchemeFactory.class | Bin 0 -> 1117 bytes .../thrift/AuthorizationException$_Fields.class | Bin 0 -> 3036 bytes .../bin/thrift/AuthorizationException.class | Bin 0 -> 11081 bytes .../thrift/ImageServer$AsyncClient$Factory.class | Bin 0 -> 1477 bytes ...ImageServer$AsyncClient$authenticate_call.class | Bin 0 -> 3336 bytes ...eServer$AsyncClient$getUserFromToken_call.class | Bin 0 -> 3257 bytes .../thrift/ImageServer$AsyncClient$ping_call.class | Bin 0 -> 2925 bytes .../bin/thrift/ImageServer$AsyncClient.class | Bin 0 -> 3081 bytes .../bin/thrift/ImageServer$AsyncIface.class | Bin 0 -> 538 bytes ...ImageServer$AsyncProcessor$authenticate$1.class | Bin 0 -> 3150 bytes .../ImageServer$AsyncProcessor$authenticate.class | Bin 0 -> 3247 bytes ...eServer$AsyncProcessor$getUserFromToken$1.class | Bin 0 -> 3170 bytes ...ageServer$AsyncProcessor$getUserFromToken.class | Bin 0 -> 3241 bytes .../thrift/ImageServer$AsyncProcessor$ping$1.class | Bin 0 -> 2953 bytes .../thrift/ImageServer$AsyncProcessor$ping.class | Bin 0 -> 3032 bytes .../bin/thrift/ImageServer$AsyncProcessor.class | Bin 0 -> 2446 bytes .../bin/thrift/ImageServer$Client$Factory.class | Bin 0 -> 1451 bytes Dozentenmodul/bin/thrift/ImageServer$Client.class | Bin 0 -> 3970 bytes Dozentenmodul/bin/thrift/ImageServer$Iface.class | Bin 0 -> 502 bytes .../ImageServer$Processor$authenticate.class | Bin 0 -> 2329 bytes .../ImageServer$Processor$getUserFromToken.class | Bin 0 -> 2337 bytes .../bin/thrift/ImageServer$Processor$ping.class | Bin 0 -> 1919 bytes .../bin/thrift/ImageServer$Processor.class | Bin 0 -> 2324 bytes .../ImageServer$authenticate_args$_Fields.class | Bin 0 -> 3142 bytes ...cate_args$authenticate_argsStandardScheme.class | Bin 0 -> 2850 bytes ...gs$authenticate_argsStandardSchemeFactory.class | Bin 0 -> 1191 bytes ...nticate_args$authenticate_argsTupleScheme.class | Bin 0 -> 2314 bytes ..._args$authenticate_argsTupleSchemeFactory.class | Bin 0 -> 1167 bytes .../bin/thrift/ImageServer$authenticate_args.class | Bin 0 -> 10868 bytes .../ImageServer$authenticate_result$_Fields.class | Bin 0 -> 3158 bytes ..._result$authenticate_resultStandardScheme.class | Bin 0 -> 2987 bytes ...$authenticate_resultStandardSchemeFactory.class | Bin 0 -> 1223 bytes ...ate_result$authenticate_resultTupleScheme.class | Bin 0 -> 2449 bytes ...ult$authenticate_resultTupleSchemeFactory.class | Bin 0 -> 1199 bytes .../thrift/ImageServer$authenticate_result.class | Bin 0 -> 11542 bytes ...ImageServer$getUserFromToken_args$_Fields.class | Bin 0 -> 3091 bytes ..._args$getUserFromToken_argsStandardScheme.class | Bin 0 -> 2711 bytes ...etUserFromToken_argsStandardSchemeFactory.class | Bin 0 -> 1255 bytes ...ken_args$getUserFromToken_argsTupleScheme.class | Bin 0 -> 2196 bytes ...s$getUserFromToken_argsTupleSchemeFactory.class | Bin 0 -> 1231 bytes .../thrift/ImageServer$getUserFromToken_args.class | Bin 0 -> 9748 bytes ...ageServer$getUserFromToken_result$_Fields.class | Bin 0 -> 3198 bytes ...ult$getUserFromToken_resultStandardScheme.class | Bin 0 -> 3025 bytes ...UserFromToken_resultStandardSchemeFactory.class | Bin 0 -> 1287 bytes ...result$getUserFromToken_resultTupleScheme.class | Bin 0 -> 2487 bytes ...getUserFromToken_resultTupleSchemeFactory.class | Bin 0 -> 1263 bytes .../ImageServer$getUserFromToken_result.class | Bin 0 -> 11659 bytes .../bin/thrift/ImageServer$ping_args$_Fields.class | Bin 0 -> 2863 bytes ...eServer$ping_args$ping_argsStandardScheme.class | Bin 0 -> 2150 bytes ...$ping_args$ping_argsStandardSchemeFactory.class | Bin 0 -> 1063 bytes ...mageServer$ping_args$ping_argsTupleScheme.class | Bin 0 -> 1460 bytes ...ver$ping_args$ping_argsTupleSchemeFactory.class | Bin 0 -> 1039 bytes .../bin/thrift/ImageServer$ping_args.class | Bin 0 -> 7314 bytes .../thrift/ImageServer$ping_result$_Fields.class | Bin 0 -> 2995 bytes ...ver$ping_result$ping_resultStandardScheme.class | Bin 0 -> 2557 bytes ...g_result$ping_resultStandardSchemeFactory.class | Bin 0 -> 1095 bytes ...Server$ping_result$ping_resultTupleScheme.class | Bin 0 -> 2014 bytes ...ping_result$ping_resultTupleSchemeFactory.class | Bin 0 -> 1071 bytes .../bin/thrift/ImageServer$ping_result.class | Bin 0 -> 9526 bytes Dozentenmodul/bin/thrift/ImageServer.class | Bin 0 -> 1037 bytes ...ption$InvalidTokenExceptionStandardScheme.class | Bin 0 -> 2164 bytes ...nvalidTokenExceptionStandardSchemeFactory.class | Bin 0 -> 1125 bytes ...xception$InvalidTokenExceptionTupleScheme.class | Bin 0 -> 1474 bytes ...n$InvalidTokenExceptionTupleSchemeFactory.class | Bin 0 -> 1101 bytes .../bin/thrift/InvalidTokenException$_Fields.class | Bin 0 -> 2829 bytes .../bin/thrift/InvalidTokenException.class | Bin 0 -> 7448 bytes .../bin/thrift/MasterThriftConnection.class | Bin 0 -> 1576 bytes .../SessionData$SessionDataStandardScheme.class | Bin 0 -> 2652 bytes ...sionData$SessionDataStandardSchemeFactory.class | Bin 0 -> 965 bytes .../SessionData$SessionDataTupleScheme.class | Bin 0 -> 2118 bytes ...SessionData$SessionDataTupleSchemeFactory.class | Bin 0 -> 941 bytes Dozentenmodul/bin/thrift/SessionData$_Fields.class | Bin 0 -> 2934 bytes Dozentenmodul/bin/thrift/SessionData.class | Bin 0 -> 10381 bytes .../thrift/UserInfo$UserInfoStandardScheme.class | Bin 0 -> 2967 bytes .../UserInfo$UserInfoStandardSchemeFactory.class | Bin 0 -> 917 bytes .../bin/thrift/UserInfo$UserInfoTupleScheme.class | Bin 0 -> 2378 bytes .../UserInfo$UserInfoTupleSchemeFactory.class | Bin 0 -> 893 bytes Dozentenmodul/bin/thrift/UserInfo$_Fields.class | Bin 0 -> 3064 bytes Dozentenmodul/bin/thrift/UserInfo.class | Bin 0 -> 12630 bytes Dozentenmodul/src/GUI/SearchImage_GUI.java | 906 +++--- Dozentenmodul/src/Models/person.java | 124 +- Dozentenmodul/src/Models/vm.java | 138 +- Dozentenmodul/src/gui/Login_GUI.java | 27 + Dozentenmodul/src/thrift/AuthenticationError.java | 51 + .../src/thrift/AuthenticationException.java | 504 ++++ Dozentenmodul/src/thrift/AuthorizationError.java | 48 + .../src/thrift/AuthorizationException.java | 504 ++++ Dozentenmodul/src/thrift/ImageServer.java | 2871 ++++++++++++++++++++ .../src/thrift/InvalidTokenException.java | 280 ++ .../src/thrift/MasterThriftConnection.java | 38 + Dozentenmodul/src/thrift/SessionData.java | 488 ++++ Dozentenmodul/src/thrift/UserInfo.java | 688 +++++ 108 files changed, 6084 insertions(+), 584 deletions(-) create mode 100644 Dozentenmodul/bin/thrift/AuthenticationError.class create mode 100644 Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/AuthenticationException.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationError.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/AuthorizationException.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Client.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Iface.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$Processor.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_args.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer$ping_result.class create mode 100644 Dozentenmodul/bin/thrift/ImageServer.class create mode 100644 Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/InvalidTokenException.class create mode 100644 Dozentenmodul/bin/thrift/MasterThriftConnection.class create mode 100644 Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/SessionData$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/SessionData.class create mode 100644 Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class create mode 100644 Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class create mode 100644 Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class create mode 100644 Dozentenmodul/bin/thrift/UserInfo$_Fields.class create mode 100644 Dozentenmodul/bin/thrift/UserInfo.class create mode 100644 Dozentenmodul/src/thrift/AuthenticationError.java create mode 100644 Dozentenmodul/src/thrift/AuthenticationException.java create mode 100644 Dozentenmodul/src/thrift/AuthorizationError.java create mode 100644 Dozentenmodul/src/thrift/AuthorizationException.java create mode 100644 Dozentenmodul/src/thrift/ImageServer.java create mode 100644 Dozentenmodul/src/thrift/InvalidTokenException.java create mode 100644 Dozentenmodul/src/thrift/MasterThriftConnection.java create mode 100644 Dozentenmodul/src/thrift/SessionData.java create mode 100644 Dozentenmodul/src/thrift/UserInfo.java (limited to 'Dozentenmodul') diff --git a/Dozentenmodul/.classpath b/Dozentenmodul/.classpath index 459c978e..d012956c 100644 --- a/Dozentenmodul/.classpath +++ b/Dozentenmodul/.classpath @@ -17,5 +17,6 @@ + diff --git a/Dozentenmodul/bin/gui/Login_GUI$1.class b/Dozentenmodul/bin/gui/Login_GUI$1.class index 3ba048a4..415f2233 100644 Binary files a/Dozentenmodul/bin/gui/Login_GUI$1.class and b/Dozentenmodul/bin/gui/Login_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$2.class b/Dozentenmodul/bin/gui/Login_GUI$2.class index 4c73519c..6a03ae8e 100644 Binary files a/Dozentenmodul/bin/gui/Login_GUI$2.class and b/Dozentenmodul/bin/gui/Login_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/Login_GUI$3.class b/Dozentenmodul/bin/gui/Login_GUI$3.class index 9d555d1d..d617ce42 100644 Binary files a/Dozentenmodul/bin/gui/Login_GUI$3.class and b/Dozentenmodul/bin/gui/Login_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/Login_GUI.class b/Dozentenmodul/bin/gui/Login_GUI.class index 621e1e3f..bc297a50 100644 Binary files a/Dozentenmodul/bin/gui/Login_GUI.class and b/Dozentenmodul/bin/gui/Login_GUI.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationError.class b/Dozentenmodul/bin/thrift/AuthenticationError.class new file mode 100644 index 00000000..8f12237d Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationError.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class new file mode 100644 index 00000000..6108caf6 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class new file mode 100644 index 00000000..ed3b0b62 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class new file mode 100644 index 00000000..2ae1e4f8 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class new file mode 100644 index 00000000..662f2f37 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationException$AuthenticationExceptionTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class b/Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class new file mode 100644 index 00000000..21b0acfc Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationException$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/AuthenticationException.class b/Dozentenmodul/bin/thrift/AuthenticationException.class new file mode 100644 index 00000000..de2ec118 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthenticationException.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationError.class b/Dozentenmodul/bin/thrift/AuthorizationError.class new file mode 100644 index 00000000..b05d13c5 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationError.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class new file mode 100644 index 00000000..978243e1 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class new file mode 100644 index 00000000..9186486d Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class new file mode 100644 index 00000000..7b0fcbe6 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class new file mode 100644 index 00000000..40ca68dc Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationException$AuthorizationExceptionTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class b/Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class new file mode 100644 index 00000000..ff62ea72 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationException$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/AuthorizationException.class b/Dozentenmodul/bin/thrift/AuthorizationException.class new file mode 100644 index 00000000..9ec46927 Binary files /dev/null and b/Dozentenmodul/bin/thrift/AuthorizationException.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class new file mode 100644 index 00000000..c7f71131 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$Factory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class new file mode 100644 index 00000000..fb117af1 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$authenticate_call.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class new file mode 100644 index 00000000..43a434ad Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$getUserFromToken_call.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class new file mode 100644 index 00000000..6ebc2ea3 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient$ping_call.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class new file mode 100644 index 00000000..1d34c1e2 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncClient.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class new file mode 100644 index 00000000..e28e8f90 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncIface.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class new file mode 100644 index 00000000..3dadf0b7 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate$1.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class new file mode 100644 index 00000000..a02237d2 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$authenticate.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class new file mode 100644 index 00000000..8bd8bacf Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken$1.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class new file mode 100644 index 00000000..2b4fe03d Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$getUserFromToken.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class new file mode 100644 index 00000000..9dc81f2a Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping$1.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class new file mode 100644 index 00000000..4b4e0afe Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor$ping.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class new file mode 100644 index 00000000..9bd05794 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$AsyncProcessor.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class b/Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class new file mode 100644 index 00000000..215621f5 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Client$Factory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Client.class b/Dozentenmodul/bin/thrift/ImageServer$Client.class new file mode 100644 index 00000000..d8ecb8b8 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Client.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Iface.class b/Dozentenmodul/bin/thrift/ImageServer$Iface.class new file mode 100644 index 00000000..18aec242 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Iface.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class b/Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class new file mode 100644 index 00000000..1a1f939e Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Processor$authenticate.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class b/Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class new file mode 100644 index 00000000..eba9943e Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Processor$getUserFromToken.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class b/Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class new file mode 100644 index 00000000..a3dd6c8f Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Processor$ping.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$Processor.class b/Dozentenmodul/bin/thrift/ImageServer$Processor.class new file mode 100644 index 00000000..26f96272 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$Processor.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class new file mode 100644 index 00000000..a8cd4f66 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class new file mode 100644 index 00000000..29e03256 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class new file mode 100644 index 00000000..d20ee8b2 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class new file mode 100644 index 00000000..58d1374e Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class new file mode 100644 index 00000000..4429e284 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args$authenticate_argsTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class new file mode 100644 index 00000000..a92fb3e9 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_args.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class new file mode 100644 index 00000000..9fcb0a6e Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class new file mode 100644 index 00000000..b1243414 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class new file mode 100644 index 00000000..1c507ea2 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class new file mode 100644 index 00000000..4a3edda6 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class new file mode 100644 index 00000000..c82d6354 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result$authenticate_resultTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class new file mode 100644 index 00000000..db12a9f8 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$authenticate_result.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class new file mode 100644 index 00000000..ad982267 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class new file mode 100644 index 00000000..9b24fe8f Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class new file mode 100644 index 00000000..8bac7772 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class new file mode 100644 index 00000000..94eb7a5d Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class new file mode 100644 index 00000000..13e77c2b Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args$getUserFromToken_argsTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class new file mode 100644 index 00000000..90aa2fa1 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_args.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class new file mode 100644 index 00000000..f306cf9d Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class new file mode 100644 index 00000000..8ce44766 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class new file mode 100644 index 00000000..9cb117e7 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class new file mode 100644 index 00000000..e9186710 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class new file mode 100644 index 00000000..1ba83391 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result$getUserFromToken_resultTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class new file mode 100644 index 00000000..bc1a176b Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$getUserFromToken_result.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class new file mode 100644 index 00000000..af0bbe88 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_args$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class new file mode 100644 index 00000000..2c2f59cf Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class new file mode 100644 index 00000000..6fc626ef Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class new file mode 100644 index 00000000..822afb2c Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class new file mode 100644 index 00000000..7b2dc61c Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_args$ping_argsTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_args.class b/Dozentenmodul/bin/thrift/ImageServer$ping_args.class new file mode 100644 index 00000000..72a484fb Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_args.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class new file mode 100644 index 00000000..6af85a25 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_result$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class new file mode 100644 index 00000000..311b5c76 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class new file mode 100644 index 00000000..77ed53ce Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class new file mode 100644 index 00000000..eb11e143 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class new file mode 100644 index 00000000..95803bc3 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_result$ping_resultTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer$ping_result.class b/Dozentenmodul/bin/thrift/ImageServer$ping_result.class new file mode 100644 index 00000000..eb20bac5 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer$ping_result.class differ diff --git a/Dozentenmodul/bin/thrift/ImageServer.class b/Dozentenmodul/bin/thrift/ImageServer.class new file mode 100644 index 00000000..414f9a34 Binary files /dev/null and b/Dozentenmodul/bin/thrift/ImageServer.class differ diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class new file mode 100644 index 00000000..8336b756 Binary files /dev/null and b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class new file mode 100644 index 00000000..603e663a Binary files /dev/null and b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class new file mode 100644 index 00000000..cbce816c Binary files /dev/null and b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class new file mode 100644 index 00000000..0286db6c Binary files /dev/null and b/Dozentenmodul/bin/thrift/InvalidTokenException$InvalidTokenExceptionTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class b/Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class new file mode 100644 index 00000000..a93a93a8 Binary files /dev/null and b/Dozentenmodul/bin/thrift/InvalidTokenException$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/InvalidTokenException.class b/Dozentenmodul/bin/thrift/InvalidTokenException.class new file mode 100644 index 00000000..317b760c Binary files /dev/null and b/Dozentenmodul/bin/thrift/InvalidTokenException.class differ diff --git a/Dozentenmodul/bin/thrift/MasterThriftConnection.class b/Dozentenmodul/bin/thrift/MasterThriftConnection.class new file mode 100644 index 00000000..dd76a766 Binary files /dev/null and b/Dozentenmodul/bin/thrift/MasterThriftConnection.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class new file mode 100644 index 00000000..f7b6f6b6 Binary files /dev/null and b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class new file mode 100644 index 00000000..245e7cdc Binary files /dev/null and b/Dozentenmodul/bin/thrift/SessionData$SessionDataStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class new file mode 100644 index 00000000..9c968929 Binary files /dev/null and b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class new file mode 100644 index 00000000..2c83a82f Binary files /dev/null and b/Dozentenmodul/bin/thrift/SessionData$SessionDataTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData$_Fields.class b/Dozentenmodul/bin/thrift/SessionData$_Fields.class new file mode 100644 index 00000000..13a9da4f Binary files /dev/null and b/Dozentenmodul/bin/thrift/SessionData$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/SessionData.class b/Dozentenmodul/bin/thrift/SessionData.class new file mode 100644 index 00000000..f8597a01 Binary files /dev/null and b/Dozentenmodul/bin/thrift/SessionData.class differ diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class new file mode 100644 index 00000000..c4a055f7 Binary files /dev/null and b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardScheme.class differ diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class new file mode 100644 index 00000000..ff60ded1 Binary files /dev/null and b/Dozentenmodul/bin/thrift/UserInfo$UserInfoStandardSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class new file mode 100644 index 00000000..1d717010 Binary files /dev/null and b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleScheme.class differ diff --git a/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class new file mode 100644 index 00000000..adf2a51e Binary files /dev/null and b/Dozentenmodul/bin/thrift/UserInfo$UserInfoTupleSchemeFactory.class differ diff --git a/Dozentenmodul/bin/thrift/UserInfo$_Fields.class b/Dozentenmodul/bin/thrift/UserInfo$_Fields.class new file mode 100644 index 00000000..3bff9fe0 Binary files /dev/null and b/Dozentenmodul/bin/thrift/UserInfo$_Fields.class differ diff --git a/Dozentenmodul/bin/thrift/UserInfo.class b/Dozentenmodul/bin/thrift/UserInfo.class new file mode 100644 index 00000000..ed7e6f12 Binary files /dev/null and b/Dozentenmodul/bin/thrift/UserInfo.class differ diff --git a/Dozentenmodul/src/GUI/SearchImage_GUI.java b/Dozentenmodul/src/GUI/SearchImage_GUI.java index ad474768..4225a295 100644 --- a/Dozentenmodul/src/GUI/SearchImage_GUI.java +++ b/Dozentenmodul/src/GUI/SearchImage_GUI.java @@ -1,453 +1,453 @@ -package gui; - - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.SystemColor; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.Iterator; -import java.util.List; - -import javax.swing.JButton; -import javax.swing.JComboBox; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.JScrollPane; -import javax.swing.JSeparator; -import javax.swing.JTabbedPane; -import javax.swing.JTable; -import javax.swing.JTextField; -import javax.swing.JTextPane; -import javax.swing.RowFilter; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.table.DefaultTableModel; -import javax.swing.table.TableModel; -import javax.swing.table.TableRowSorter; - -import org.apache.thrift.TException; - -import server.Server.Client; -import thrift.ThriftConnection; - -@SuppressWarnings("serial") -public class SearchImage_GUI extends JFrame { - - private final JPanel contentPanel = new JPanel(); - String[] result; - JRadioButton rdbtnInternetJa; - JRadioButton rdbtnInternetNein; - JComboBox comboBox; - JTable tableAllImages; - JTable tablemyImages; - private JTextField textFieldName; - JTabbedPane tabbedPane; - String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; - ThriftConnection con=new ThriftConnection(); - Client client=con.getThriftConnection(); - final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); - final DefaultTableModel modelMyImages = new DefaultTableModel( titles, 0 ); - final TableRowSorter rowSorterAll = new TableRowSorter( modelAll ); - final TableRowSorter rowSorterMyImages = new TableRowSorter( modelMyImages ); - - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - SearchImage_GUI dialog = new SearchImage_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Create the dialog. - */ - public SearchImage_GUI() { - addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent arg0) { - //Beendet die Anwendung nach klick auf X - System.exit(0); - } - }); - //Verhindert das Vergrößern Des Fensters - setResizable(false); - - try { - //Setzt das Look & Feel auf System - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Setzt den Fenstertitel - setTitle("bwLehrpool Suite *Prototyp*"); - //Zentriert das Fenster in die Bildmitte - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int top=(screenSize.height - 722) / 2; - int left=(screenSize.width - 603) / 2; - setBounds(left, top, 603, 722); - - - - final DefaultTableModel model = new DefaultTableModel( titles, 0 ); - - - getContentPane().setLayout(null); - { - JPanel panel = new JPanel(); - panel.setBackground(SystemColor.menu); - panel.setBounds(10, 11, 577, 57); - getContentPane().add(panel); - panel.setLayout(null); - { - JLabel lblNewLabel = new JLabel("Suche nach VL-Image"); - lblNewLabel.setBounds(10, 11, 509, 22); - panel.add(lblNewLabel); - lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); - } - - JTextPane txtpnBitteWhlenSie = new JTextPane(); - txtpnBitteWhlenSie.setEditable(false); - txtpnBitteWhlenSie.setBackground(SystemColor.menu); - txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); - txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); - panel.add(txtpnBitteWhlenSie); - } - contentPanel.setBounds(10, 85, 577, 531); - contentPanel.setBackground(SystemColor.menu); - contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); - getContentPane().add(contentPanel); - contentPanel.setLayout(null); - - JPanel panel_1 = new JPanel(); - panel_1.setBackground(SystemColor.menu); - panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); - panel_1.setBounds(10, 49, 557, 131); - contentPanel.add(panel_1); - panel_1.setLayout(null); - - JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); - lblNewLabel_2.setBounds(10, 30, 250, 20); - panel_1.add(lblNewLabel_2); - - JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); - lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); - panel_1.add(lblInternetIstInnerhalb); - - textFieldName = new JTextField(); - //Key Listener der Tastatureingabe registriert - textFieldName.addKeyListener(new KeyAdapter() { - @Override - public void keyReleased(KeyEvent e) { - //Textfield eingabe auslesen - String stext=textFieldName.getText(); - - //Wenn Textfield nicht leer - if(stext!="") - { - //Filtere nach der Eingabe - rowSorterAll.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); - - } - }}); - - - textFieldName.setBounds(270, 30, 250, 20); - panel_1.add(textFieldName); - textFieldName.setColumns(10); - - JLabel lblErweiterteSuche = new JLabel("Erweiterte Suche"); - lblErweiterteSuche.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent arg0) { - //Öffnet das Fenster Extended GUI - ExtendedSearch_GUI es=new ExtendedSearch_GUI(); - es.setVisible(true); - } - }); - lblErweiterteSuche.setForeground(Color.BLUE); - - lblErweiterteSuche.setBounds(431, 106, 89, 14); - panel_1.add(lblErweiterteSuche); - - comboBox = new JComboBox(); - try { - //Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server - List list=client.getAllOS(); - //Leeres Item hinzufügen - comboBox.addItem(""); - for(int i=0;i"); - label_1.setBounds(69, 11, 13, 14); - contentPanel.add(label_1); - - JLabel lblVlimage = new JLabel("VL-Image"); - lblVlimage.setForeground(Color.BLUE); - lblVlimage.setBounds(81, 11, 45, 14); - contentPanel.add(lblVlimage); - - JLabel label_2 = new JLabel(">"); - label_2.setBounds(133, 11, 13, 14); - contentPanel.add(label_2); - - JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); - lblNewLabel_1.setBounds(146, 11, 85, 14); - contentPanel.add(lblNewLabel_1); - - tabbedPane = new JTabbedPane(JTabbedPane.TOP); - tabbedPane.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent arg0) { - System.out.println(tabbedPane.getSelectedIndex()); - if(tabbedPane.getSelectedIndex()==0){ - - - - } - else if(tabbedPane.getSelectedIndex()==1){ - String username="Spitzer Tobias"; - rowSorterMyImages.setRowFilter(RowFilter.regexFilter(username, 4)); - //rowSorterMyImages.toggleSortOrder(0); - } - - } - }); - - tabbedPane.setBounds(10, 197, 557, 300); - contentPanel.add(tabbedPane); - - JScrollPane scrollPaneMyImage = new JScrollPane(); - tablemyImages=new JTable(); - tablemyImages.setModel(modelMyImages); - tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); - initTableModel(modelMyImages); - tablemyImages.setRowSorter(rowSorterMyImages); - - JScrollPane scrollPaneAllImages = new JScrollPane(); - tableAllImages=new JTable(); - tableAllImages.setModel(modelAll); - tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); - initTableModel(modelAll); - tableAllImages.setRowSorter(rowSorterAll); - - scrollPaneAllImages.setViewportView(tableAllImages); - tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); - - scrollPaneMyImage.setViewportView(tablemyImages); - tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); - - JScrollPane scrollPaneCoopImages = new JScrollPane(); - JTable tableCoopImages=new JTable(); - tableCoopImages.setModel(model); - tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPaneCoopImages.setViewportView(tableCoopImages); - tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, null); - tabbedPane.setEnabledAt(2, false); - - JScrollPane scrollPanePublicImages = new JScrollPane(); - JTable tablePublicImages=new JTable(); - tablePublicImages.setModel(model); - tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); - tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); - tablePublicImages.getColumnModel().getColumn(3).sizeWidthToFit(); - tablePublicImages.getColumnModel().getColumn(4).sizeWidthToFit(); - tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPanePublicImages.setViewportView(tablePublicImages); - tabbedPane.addTab("\u00D6ffentliche Images", null, scrollPanePublicImages, null); - tabbedPane.setEnabledAt(3, false); - - JScrollPane scrollPanePublicVorlagen = new JScrollPane(); - JTable tablePublicVorlagen=new JTable(); - tablePublicVorlagen.setModel(model); - tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); - tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); - tablePublicVorlagen.getColumnModel().getColumn(3).sizeWidthToFit(); - tablePublicVorlagen.getColumnModel().getColumn(4).sizeWidthToFit(); - tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); - - scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); - tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null); - tabbedPane.setEnabledAt(4, false); - - - - - JButton btnDownload = new JButton("Download"); - btnDownload.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - //Öffnet den Downloader - FTPDownloader_GUI down=new FTPDownloader_GUI("Test"); - down.setVisible(true); - SearchImage_GUI.this.setVisible(false); - } - }); - btnDownload.setBounds(449, 508, 118, 23); - contentPanel.add(btnDownload); - { - JPanel buttonPane = new JPanel(); - buttonPane.setBounds(0, 640, 597, 33); - buttonPane.setBackground(SystemColor.menu); - buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); - getContentPane().add(buttonPane); - { - JButton okButton = new JButton("Zur\u00FCck"); - okButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - //Öffnet das Hauptmenü - MainMenue_GUI main=new MainMenue_GUI(); - main.setVisible(true); - dispose(); - } - }); - okButton.setActionCommand("OK"); - buttonPane.add(okButton); - getRootPane().setDefaultButton(okButton); - } - { - JButton cancelButton = new JButton("Weiter"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - - EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI(); - ea.setVisible(true); - dispose(); - - } - }); - cancelButton.setActionCommand("Cancel"); - buttonPane.add(cancelButton); - } - } - - JSeparator separator = new JSeparator(); - separator.setBounds(0, 78, 597, 2); - getContentPane().add(separator); - - JSeparator separator_1 = new JSeparator(); - separator_1.setBounds(0, 627, 597, 2); - getContentPane().add(separator_1); - - JMenuBar menuBar = new JMenuBar(); - setJMenuBar(menuBar); - - JMenu mnNewMenu_1 = new JMenu("Hilfe"); - menuBar.add(mnNewMenu_1); - - JMenuItem mntmFaq = new JMenuItem("FAQ"); - mnNewMenu_1.add(mntmFaq); - - JMenuItem mntmOtrs = new JMenuItem("OTRS"); - mnNewMenu_1.add(mntmOtrs); - - } - //Initiale Beffülung eines Table models - public DefaultTableModel initTableModel(DefaultTableModel model){ - List images; - try { - //Hole eine Liste der Images - - images = client.getImageList(); - Iterator i=images.iterator(); - - int x=0; - - while(i.hasNext()) - { - //erzeuge Objekte für die Tabelle - Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUserData(),images.get(x).getUpdateTime()}; - //Füge diese Objekte der Tabelle hinzu - model.addRow(obj); - x++; - i.next(); - - } - - return model; - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - return model; - } - - } - - +package gui; + + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.SystemColor; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.Iterator; +import java.util.List; + +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import javax.swing.RowFilter; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; +import javax.swing.table.TableRowSorter; + +import org.apache.thrift.TException; + +import server.Server.Client; +import thrift.ThriftConnection; + +@SuppressWarnings("serial") +public class SearchImage_GUI extends JFrame { + + private final JPanel contentPanel = new JPanel(); + String[] result; + JRadioButton rdbtnInternetJa; + JRadioButton rdbtnInternetNein; + JComboBox comboBox; + JTable tableAllImages; + JTable tablemyImages; + private JTextField textFieldName; + JTabbedPane tabbedPane; + String[] titles= {"Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", "Verantwortlicher", "Letztes Update", "Schlagwort"}; + ThriftConnection con=new ThriftConnection(); + Client client=con.getThriftConnection(); + final DefaultTableModel modelAll = new DefaultTableModel( titles, 0 ); + final DefaultTableModel modelMyImages = new DefaultTableModel( titles, 0 ); + final TableRowSorter rowSorterAll = new TableRowSorter( modelAll ); + final TableRowSorter rowSorterMyImages = new TableRowSorter( modelMyImages ); + + /** + * Launch the application. + */ + public static void main(String[] args) { + try { + SearchImage_GUI dialog = new SearchImage_GUI(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public SearchImage_GUI() { + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent arg0) { + //Beendet die Anwendung nach klick auf X + System.exit(0); + } + }); + //Verhindert das Vergrößern Des Fensters + setResizable(false); + + try { + //Setzt das Look & Feel auf System + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //Setzt den Fenstertitel + setTitle("bwLehrpool Suite *Prototyp*"); + //Zentriert das Fenster in die Bildmitte + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 722) / 2; + int left=(screenSize.width - 603) / 2; + setBounds(left, top, 603, 722); + + + + final DefaultTableModel model = new DefaultTableModel( titles, 0 ); + + + getContentPane().setLayout(null); + { + JPanel panel = new JPanel(); + panel.setBackground(SystemColor.menu); + panel.setBounds(10, 11, 577, 57); + getContentPane().add(panel); + panel.setLayout(null); + { + JLabel lblNewLabel = new JLabel("Suche nach VL-Image"); + lblNewLabel.setBounds(10, 11, 509, 22); + panel.add(lblNewLabel); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + } + + JTextPane txtpnBitteWhlenSie = new JTextPane(); + txtpnBitteWhlenSie.setEditable(false); + txtpnBitteWhlenSie.setBackground(SystemColor.menu); + txtpnBitteWhlenSie.setText("Hier k\u00F6nnen Sie nach Ihrem gew\u00FCnschten VL-Image suchen und dieses f\u00FCr weitere Schritte ausw\u00E4hlen"); + txtpnBitteWhlenSie.setBounds(10, 36, 509, 32); + panel.add(txtpnBitteWhlenSie); + } + contentPanel.setBounds(10, 85, 577, 531); + contentPanel.setBackground(SystemColor.menu); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel); + contentPanel.setLayout(null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(SystemColor.menu); + panel_1.setBorder(new TitledBorder(null, "Filterfunktionen", TitledBorder.LEADING, TitledBorder.TOP, null, null)); + panel_1.setBounds(10, 49, 557, 131); + contentPanel.add(panel_1); + panel_1.setLayout(null); + + JLabel lblNewLabel_2 = new JLabel("Anzeigename:"); + lblNewLabel_2.setBounds(10, 30, 250, 20); + panel_1.add(lblNewLabel_2); + + JLabel lblInternetIstInnerhalb = new JLabel("Betriebssystem:"); + lblInternetIstInnerhalb.setBounds(10, 58, 250, 20); + panel_1.add(lblInternetIstInnerhalb); + + textFieldName = new JTextField(); + //Key Listener der Tastatureingabe registriert + textFieldName.addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + //Textfield eingabe auslesen + String stext=textFieldName.getText(); + + //Wenn Textfield nicht leer + if(stext!="") + { + //Filtere nach der Eingabe + rowSorterAll.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); + rowSorterMyImages.setRowFilter(RowFilter.regexFilter(textFieldName.getText(), 0)); + + } + }}); + + + textFieldName.setBounds(270, 30, 250, 20); + panel_1.add(textFieldName); + textFieldName.setColumns(10); + + JLabel lblErweiterteSuche = new JLabel("Erweiterte Suche"); + lblErweiterteSuche.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + //Öffnet das Fenster Extended GUI + ExtendedSearch_GUI es=new ExtendedSearch_GUI(); + es.setVisible(true); + } + }); + lblErweiterteSuche.setForeground(Color.BLUE); + + lblErweiterteSuche.setBounds(431, 106, 89, 14); + panel_1.add(lblErweiterteSuche); + + comboBox = new JComboBox(); + try { + //Holt sich eine Liste aller verfügbaren Betriebssysteme vom Server + List list=client.getAllOS(); + //Leeres Item hinzufügen + comboBox.addItem(""); + for(int i=0;i"); + label_1.setBounds(69, 11, 13, 14); + contentPanel.add(label_1); + + JLabel lblVlimage = new JLabel("VL-Image"); + lblVlimage.setForeground(Color.BLUE); + lblVlimage.setBounds(81, 11, 45, 14); + contentPanel.add(lblVlimage); + + JLabel label_2 = new JLabel(">"); + label_2.setBounds(133, 11, 13, 14); + contentPanel.add(label_2); + + JLabel lblNewLabel_1 = new JLabel("Imageauswahl"); + lblNewLabel_1.setBounds(146, 11, 85, 14); + contentPanel.add(lblNewLabel_1); + + tabbedPane = new JTabbedPane(JTabbedPane.TOP); + tabbedPane.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent arg0) { + System.out.println(tabbedPane.getSelectedIndex()); + if(tabbedPane.getSelectedIndex()==0){ + + + + } + else if(tabbedPane.getSelectedIndex()==1){ + String username="Spitzer Tobias"; + rowSorterMyImages.setRowFilter(RowFilter.regexFilter(username, 4)); + //rowSorterMyImages.toggleSortOrder(0); + } + + } + }); + + tabbedPane.setBounds(10, 197, 557, 300); + contentPanel.add(tabbedPane); + + JScrollPane scrollPaneMyImage = new JScrollPane(); + tablemyImages=new JTable(); + tablemyImages.setModel(modelMyImages); + tablemyImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tablemyImages.getColumnModel().getColumn(5).sizeWidthToFit(); + initTableModel(modelMyImages); + tablemyImages.setRowSorter(rowSorterMyImages); + + JScrollPane scrollPaneAllImages = new JScrollPane(); + tableAllImages=new JTable(); + tableAllImages.setModel(modelAll); + tableAllImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableAllImages.getColumnModel().getColumn(5).sizeWidthToFit(); + initTableModel(modelAll); + tableAllImages.setRowSorter(rowSorterAll); + + scrollPaneAllImages.setViewportView(tableAllImages); + tabbedPane.addTab("Alle", null, scrollPaneAllImages, null); + + scrollPaneMyImage.setViewportView(tablemyImages); + tabbedPane.addTab("Meine Images", null, scrollPaneMyImage, null); + + JScrollPane scrollPaneCoopImages = new JScrollPane(); + JTable tableCoopImages=new JTable(); + tableCoopImages.setModel(model); + tableCoopImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tableCoopImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPaneCoopImages.setViewportView(tableCoopImages); + tabbedPane.addTab("Kooperative Images", null, scrollPaneCoopImages, null); + tabbedPane.setEnabledAt(2, false); + + JScrollPane scrollPanePublicImages = new JScrollPane(); + JTable tablePublicImages=new JTable(); + tablePublicImages.setModel(model); + tablePublicImages.getColumnModel().getColumn(1).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(2).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(3).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(4).sizeWidthToFit(); + tablePublicImages.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPanePublicImages.setViewportView(tablePublicImages); + tabbedPane.addTab("\u00D6ffentliche Images", null, scrollPanePublicImages, null); + tabbedPane.setEnabledAt(3, false); + + JScrollPane scrollPanePublicVorlagen = new JScrollPane(); + JTable tablePublicVorlagen=new JTable(); + tablePublicVorlagen.setModel(model); + tablePublicVorlagen.getColumnModel().getColumn(1).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(2).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(3).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(4).sizeWidthToFit(); + tablePublicVorlagen.getColumnModel().getColumn(5).sizeWidthToFit(); + + scrollPanePublicVorlagen.setViewportView(tablePublicVorlagen); + tabbedPane.addTab("\u00D6ffentliche Vorlagen", null, scrollPanePublicVorlagen, null); + tabbedPane.setEnabledAt(4, false); + + + + + JButton btnDownload = new JButton("Download"); + btnDownload.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + //Öffnet den Downloader + FTPDownloader_GUI down=new FTPDownloader_GUI("Test"); + down.setVisible(true); + SearchImage_GUI.this.setVisible(false); + } + }); + btnDownload.setBounds(449, 508, 118, 23); + contentPanel.add(btnDownload); + { + JPanel buttonPane = new JPanel(); + buttonPane.setBounds(0, 640, 597, 33); + buttonPane.setBackground(SystemColor.menu); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane); + { + JButton okButton = new JButton("Zur\u00FCck"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + //Öffnet das Hauptmenü + MainMenue_GUI main=new MainMenue_GUI(); + main.setVisible(true); + dispose(); + } + }); + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); + } + { + JButton cancelButton = new JButton("Weiter"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + EditImageAllgemein_GUI ea=new EditImageAllgemein_GUI(); + ea.setVisible(true); + dispose(); + + } + }); + cancelButton.setActionCommand("Cancel"); + buttonPane.add(cancelButton); + } + } + + JSeparator separator = new JSeparator(); + separator.setBounds(0, 78, 597, 2); + getContentPane().add(separator); + + JSeparator separator_1 = new JSeparator(); + separator_1.setBounds(0, 627, 597, 2); + getContentPane().add(separator_1); + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Hilfe"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmFaq = new JMenuItem("FAQ"); + mnNewMenu_1.add(mntmFaq); + + JMenuItem mntmOtrs = new JMenuItem("OTRS"); + mnNewMenu_1.add(mntmOtrs); + + } + //Initiale Beffülung eines Table models + public DefaultTableModel initTableModel(DefaultTableModel model){ + List images; + try { + //Hole eine Liste der Images + + images = client.getImageList(); + Iterator i=images.iterator(); + + int x=0; + + while(i.hasNext()) + { + //erzeuge Objekte für die Tabelle + Object [] obj={images.get(x).getImageName(),images.get(x).getLicenseRestriction(),images.get(x).getOsName(),images.get(x).getLectureName(),images.get(x).getUserData(),images.get(x).getUpdateTime()}; + //Füge diese Objekte der Tabelle hinzu + model.addRow(obj); + x++; + i.next(); + + } + + return model; + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return model; + } + + } + + diff --git a/Dozentenmodul/src/Models/person.java b/Dozentenmodul/src/Models/person.java index c106ec12..f4dd5c22 100644 --- a/Dozentenmodul/src/Models/person.java +++ b/Dozentenmodul/src/Models/person.java @@ -1,62 +1,62 @@ -package models; - - -public class person{ - - private String Name; - private String Vorname; - private String Hochschule; - private String EMail; - private String Tel; - private String Fakultät; - private boolean ischecked; - - - public static person verantowrtlicher=new person(); - public static person ersteller=new person(); - - public String getName() { - return Name; - } - public void setName(String name) { - Name = name; - } - public String getVorname() { - return Vorname; - } - public void setVorname(String vorname) { - Vorname = vorname; - } - public String getHochschule() { - return Hochschule; - } - public void setHochschule(String hochschule) { - Hochschule = hochschule; - } - public String getEMail() { - return EMail; - } - public void setEMail(String eMail) { - EMail = eMail; - } - public String getTel() { - return Tel; - } - public void setTel(String tel) { - Tel = tel; - } - public String getFakultät() { - return Fakultät; - } - public void setFakultät(String fakultät) { - Fakultät = fakultät; - } - public boolean isIschecked() { - return ischecked; - } - public void setIschecked(boolean ischecked) { - this.ischecked = ischecked; - } - - -} +package models; + + +public class person{ + + private String Name; + private String Vorname; + private String Hochschule; + private String EMail; + private String Tel; + private String Fakultät; + private boolean ischecked; + + + public static person verantowrtlicher=new person(); + public static person ersteller=new person(); + + public String getName() { + return Name; + } + public void setName(String name) { + Name = name; + } + public String getVorname() { + return Vorname; + } + public void setVorname(String vorname) { + Vorname = vorname; + } + public String getHochschule() { + return Hochschule; + } + public void setHochschule(String hochschule) { + Hochschule = hochschule; + } + public String getEMail() { + return EMail; + } + public void setEMail(String eMail) { + EMail = eMail; + } + public String getTel() { + return Tel; + } + public void setTel(String tel) { + Tel = tel; + } + public String getFakultät() { + return Fakultät; + } + public void setFakultät(String fakultät) { + Fakultät = fakultät; + } + public boolean isIschecked() { + return ischecked; + } + public void setIschecked(boolean ischecked) { + this.ischecked = ischecked; + } + + +} diff --git a/Dozentenmodul/src/Models/vm.java b/Dozentenmodul/src/Models/vm.java index 07074cf9..34f9ffaa 100644 --- a/Dozentenmodul/src/Models/vm.java +++ b/Dozentenmodul/src/Models/vm.java @@ -1,69 +1,69 @@ -package models; - -import java.awt.List; -import java.util.Date; - - -public class vm { - - private String Laborname; - private String shortDesc; - private String longDesc; - private String comment; - private String OS; - private Date begin; - private Date end; - private List software; - - public static vm vl=new vm(); - public String getLaborname() { - return Laborname; - } - public void setLaborname(String laborname) { - Laborname = laborname; - } - public String getShortDesc() { - return shortDesc; - } - public void setShortDesc(String shortDesc) { - this.shortDesc = shortDesc; - } - public String getLongDesc() { - return longDesc; - } - public void setLongDesc(String longDesc) { - this.longDesc = longDesc; - } - public String getComment() { - return comment; - } - public void setComment(String comment) { - this.comment = comment; - } - public String getOS() { - return OS; - } - public void setOS(String oS) { - OS = oS; - } - public Date getBegin() { - return begin; - } - public void setBegin(Date begin) { - this.begin = begin; - } - public Date getEnd() { - return end; - } - public void setEnd(Date end) { - this.end = end; - } - public List getSoftware() { - return software; - } - public void setSoftware(List software) { - this.software = software; - } - - -} +package models; + +import java.awt.List; +import java.util.Date; + + +public class vm { + + private String Laborname; + private String shortDesc; + private String longDesc; + private String comment; + private String OS; + private Date begin; + private Date end; + private List software; + + public static vm vl=new vm(); + public String getLaborname() { + return Laborname; + } + public void setLaborname(String laborname) { + Laborname = laborname; + } + public String getShortDesc() { + return shortDesc; + } + public void setShortDesc(String shortDesc) { + this.shortDesc = shortDesc; + } + public String getLongDesc() { + return longDesc; + } + public void setLongDesc(String longDesc) { + this.longDesc = longDesc; + } + public String getComment() { + return comment; + } + public void setComment(String comment) { + this.comment = comment; + } + public String getOS() { + return OS; + } + public void setOS(String oS) { + OS = oS; + } + public Date getBegin() { + return begin; + } + public void setBegin(Date begin) { + this.begin = begin; + } + public Date getEnd() { + return end; + } + public void setEnd(Date end) { + this.end = end; + } + public List getSoftware() { + return software; + } + public void setSoftware(List software) { + this.software = software; + } + + +} diff --git a/Dozentenmodul/src/gui/Login_GUI.java b/Dozentenmodul/src/gui/Login_GUI.java index cc558261..58d1d104 100644 --- a/Dozentenmodul/src/gui/Login_GUI.java +++ b/Dozentenmodul/src/gui/Login_GUI.java @@ -27,7 +27,15 @@ import javax.swing.border.EmptyBorder; import models.person; +import org.apache.thrift.TException; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; import org.ini4j.Wini; +import thrift.AuthenticationException; +import thrift.ImageServer; +import thrift.SessionData; +import thrift.MasterThriftConnection; +import thrift.ImageServer.Client; import config.config_file; @@ -145,6 +153,25 @@ public class Login_GUI extends JFrame { //Ldap check=new Ldap(); boolean login=true; //boolean login=check.LdapAuth(username.getText(), new String(pass.getPassword())); + MasterThriftConnection thrift=new MasterThriftConnection(); + Client client=thrift.getMasterThriftConnection(); + String token=null; + final thrift.SessionData result; + try { + String passText = new String(pass.getPassword()); + System.out.println(username.getText()+" "+passText); + result = client.authenticate(username.getText(), passText); + } catch (thrift.AuthenticationException e) { + System.out.println("Authentifizierung fehlgeschlagen: " + + e.message); + return; + } catch (TException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return; + } + System.out.println("Konnte mich beim MasterServer authentifizieren. Meine Session-ID ist " + result.sessionId + ", mein Token für den Satelliten " + result.authToken); + token = result.authToken; if(login==true) { diff --git a/Dozentenmodul/src/thrift/AuthenticationError.java b/Dozentenmodul/src/thrift/AuthenticationError.java new file mode 100644 index 00000000..7d543832 --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthenticationError.java @@ -0,0 +1,51 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum AuthenticationError implements org.apache.thrift.TEnum { + GENERIC_ERROR(0), + INVALID_CREDENTIALS(1), + ACCOUNT_SUSPENDED(2), + BANNED_NETWORK(3); + + private final int value; + + private AuthenticationError(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static AuthenticationError findByValue(int value) { + switch (value) { + case 0: + return GENERIC_ERROR; + case 1: + return INVALID_CREDENTIALS; + case 2: + return ACCOUNT_SUSPENDED; + case 3: + return BANNED_NETWORK; + default: + return null; + } + } +} diff --git a/Dozentenmodul/src/thrift/AuthenticationException.java b/Dozentenmodul/src/thrift/AuthenticationException.java new file mode 100644 index 00000000..d416cacf --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthenticationException.java @@ -0,0 +1,504 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AuthenticationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException"); + + private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AuthenticationExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory()); + } + + /** + * + * @see AuthenticationError + */ + public AuthenticationError number; // required + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see AuthenticationError + */ + NUMBER((short)1, "number"), + MESSAGE((short)2, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUMBER + return NUMBER; + case 2: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationError.class))); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthenticationException.class, metaDataMap); + } + + public AuthenticationException() { + } + + public AuthenticationException( + AuthenticationError number, + String message) + { + this(); + this.number = number; + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public AuthenticationException(AuthenticationException other) { + if (other.isSetNumber()) { + this.number = other.number; + } + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AuthenticationException deepCopy() { + return new AuthenticationException(this); + } + + @Override + public void clear() { + this.number = null; + this.message = null; + } + + /** + * + * @see AuthenticationError + */ + public AuthenticationError getNumber() { + return this.number; + } + + /** + * + * @see AuthenticationError + */ + public AuthenticationException setNumber(AuthenticationError number) { + this.number = number; + return this; + } + + public void unsetNumber() { + this.number = null; + } + + /** Returns true if field number is set (has been assigned a value) and false otherwise */ + public boolean isSetNumber() { + return this.number != null; + } + + public void setNumberIsSet(boolean value) { + if (!value) { + this.number = null; + } + } + + public String getMessage() { + return this.message; + } + + public AuthenticationException setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUMBER: + if (value == null) { + unsetNumber(); + } else { + setNumber((AuthenticationError)value); + } + break; + + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUMBER: + return getNumber(); + + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUMBER: + return isSetNumber(); + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AuthenticationException) + return this.equals((AuthenticationException)that); + return false; + } + + public boolean equals(AuthenticationException that) { + if (that == null) + return false; + + boolean this_present_number = true && this.isSetNumber(); + boolean that_present_number = true && that.isSetNumber(); + if (this_present_number || that_present_number) { + if (!(this_present_number && that_present_number)) + return false; + if (!this.number.equals(that.number)) + return false; + } + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(AuthenticationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumber()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AuthenticationException("); + boolean first = true; + + sb.append("number:"); + if (this.number == null) { + sb.append("null"); + } else { + sb.append(this.number); + } + first = false; + if (!first) sb.append(", "); + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class AuthenticationExceptionStandardSchemeFactory implements SchemeFactory { + public AuthenticationExceptionStandardScheme getScheme() { + return new AuthenticationExceptionStandardScheme(); + } + } + + private static class AuthenticationExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUMBER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.number = AuthenticationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AuthenticationException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.number != null) { + oprot.writeFieldBegin(NUMBER_FIELD_DESC); + oprot.writeI32(struct.number.getValue()); + oprot.writeFieldEnd(); + } + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory { + public AuthenticationExceptionTupleScheme getScheme() { + return new AuthenticationExceptionTupleScheme(); + } + } + + private static class AuthenticationExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNumber()) { + optionals.set(0); + } + if (struct.isSetMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNumber()) { + oprot.writeI32(struct.number.getValue()); + } + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.number = AuthenticationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } + if (incoming.get(1)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/AuthorizationError.java b/Dozentenmodul/src/thrift/AuthorizationError.java new file mode 100644 index 00000000..443be4f4 --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthorizationError.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum AuthorizationError implements org.apache.thrift.TEnum { + GENERIC_ERROR(0), + NOT_AUTHENTICATED(1), + NO_PERMISSION(2); + + private final int value; + + private AuthorizationError(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static AuthorizationError findByValue(int value) { + switch (value) { + case 0: + return GENERIC_ERROR; + case 1: + return NOT_AUTHENTICATED; + case 2: + return NO_PERMISSION; + default: + return null; + } + } +} diff --git a/Dozentenmodul/src/thrift/AuthorizationException.java b/Dozentenmodul/src/thrift/AuthorizationException.java new file mode 100644 index 00000000..0d5320c2 --- /dev/null +++ b/Dozentenmodul/src/thrift/AuthorizationException.java @@ -0,0 +1,504 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AuthorizationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException"); + + private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AuthorizationExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory()); + } + + /** + * + * @see AuthorizationError + */ + public AuthorizationError number; // required + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see AuthorizationError + */ + NUMBER((short)1, "number"), + MESSAGE((short)2, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUMBER + return NUMBER; + case 2: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthorizationError.class))); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap); + } + + public AuthorizationException() { + } + + public AuthorizationException( + AuthorizationError number, + String message) + { + this(); + this.number = number; + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public AuthorizationException(AuthorizationException other) { + if (other.isSetNumber()) { + this.number = other.number; + } + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AuthorizationException deepCopy() { + return new AuthorizationException(this); + } + + @Override + public void clear() { + this.number = null; + this.message = null; + } + + /** + * + * @see AuthorizationError + */ + public AuthorizationError getNumber() { + return this.number; + } + + /** + * + * @see AuthorizationError + */ + public AuthorizationException setNumber(AuthorizationError number) { + this.number = number; + return this; + } + + public void unsetNumber() { + this.number = null; + } + + /** Returns true if field number is set (has been assigned a value) and false otherwise */ + public boolean isSetNumber() { + return this.number != null; + } + + public void setNumberIsSet(boolean value) { + if (!value) { + this.number = null; + } + } + + public String getMessage() { + return this.message; + } + + public AuthorizationException setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUMBER: + if (value == null) { + unsetNumber(); + } else { + setNumber((AuthorizationError)value); + } + break; + + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUMBER: + return getNumber(); + + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUMBER: + return isSetNumber(); + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AuthorizationException) + return this.equals((AuthorizationException)that); + return false; + } + + public boolean equals(AuthorizationException that) { + if (that == null) + return false; + + boolean this_present_number = true && this.isSetNumber(); + boolean that_present_number = true && that.isSetNumber(); + if (this_present_number || that_present_number) { + if (!(this_present_number && that_present_number)) + return false; + if (!this.number.equals(that.number)) + return false; + } + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(AuthorizationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumber()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AuthorizationException("); + boolean first = true; + + sb.append("number:"); + if (this.number == null) { + sb.append("null"); + } else { + sb.append(this.number); + } + first = false; + if (!first) sb.append(", "); + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class AuthorizationExceptionStandardSchemeFactory implements SchemeFactory { + public AuthorizationExceptionStandardScheme getScheme() { + return new AuthorizationExceptionStandardScheme(); + } + } + + private static class AuthorizationExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUMBER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.number = AuthorizationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AuthorizationException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.number != null) { + oprot.writeFieldBegin(NUMBER_FIELD_DESC); + oprot.writeI32(struct.number.getValue()); + oprot.writeFieldEnd(); + } + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory { + public AuthorizationExceptionTupleScheme getScheme() { + return new AuthorizationExceptionTupleScheme(); + } + } + + private static class AuthorizationExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNumber()) { + optionals.set(0); + } + if (struct.isSetMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNumber()) { + oprot.writeI32(struct.number.getValue()); + } + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.number = AuthorizationError.findByValue(iprot.readI32()); + struct.setNumberIsSet(true); + } + if (incoming.get(1)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/ImageServer.java b/Dozentenmodul/src/thrift/ImageServer.java new file mode 100644 index 00000000..410f437b --- /dev/null +++ b/Dozentenmodul/src/thrift/ImageServer.java @@ -0,0 +1,2871 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ImageServer { + + public interface Iface { + + public boolean ping() throws org.apache.thrift.TException; + + public SessionData authenticate(String username, String password) throws AuthenticationException, org.apache.thrift.TException; + + public UserInfo getUserFromToken(String token) throws InvalidTokenException, org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void authenticate(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public boolean ping() throws org.apache.thrift.TException + { + send_ping(); + return recv_ping(); + } + + public void send_ping() throws org.apache.thrift.TException + { + ping_args args = new ping_args(); + sendBase("ping", args); + } + + public boolean recv_ping() throws org.apache.thrift.TException + { + ping_result result = new ping_result(); + receiveBase(result, "ping"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result"); + } + + public SessionData authenticate(String username, String password) throws AuthenticationException, org.apache.thrift.TException + { + send_authenticate(username, password); + return recv_authenticate(); + } + + public void send_authenticate(String username, String password) throws org.apache.thrift.TException + { + authenticate_args args = new authenticate_args(); + args.setUsername(username); + args.setPassword(password); + sendBase("authenticate", args); + } + + public SessionData recv_authenticate() throws AuthenticationException, org.apache.thrift.TException + { + authenticate_result result = new authenticate_result(); + receiveBase(result, "authenticate"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.failure != null) { + throw result.failure; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result"); + } + + public UserInfo getUserFromToken(String token) throws InvalidTokenException, org.apache.thrift.TException + { + send_getUserFromToken(token); + return recv_getUserFromToken(); + } + + public void send_getUserFromToken(String token) throws org.apache.thrift.TException + { + getUserFromToken_args args = new getUserFromToken_args(); + args.setToken(token); + sendBase("getUserFromToken", args); + } + + public UserInfo recv_getUserFromToken() throws InvalidTokenException, org.apache.thrift.TException + { + getUserFromToken_result result = new getUserFromToken_result(); + receiveBase(result, "getUserFromToken"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.failure != null) { + throw result.failure; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall { + public ping_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0)); + ping_args args = new ping_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_ping(); + } + } + + public void authenticate(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + authenticate_call method_call = new authenticate_call(username, password, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall { + private String username; + private String password; + public authenticate_call(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.username = username; + this.password = password; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + authenticate_args args = new authenticate_args(); + args.setUsername(username); + args.setPassword(password); + args.write(prot); + prot.writeMessageEnd(); + } + + public SessionData getResult() throws AuthenticationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_authenticate(); + } + } + + public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token; + public getUserFromToken_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token = token; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserFromToken", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getUserFromToken_args args = new getUserFromToken_args(); + args.setToken(token); + args.write(prot); + prot.writeMessageEnd(); + } + + public UserInfo getResult() throws InvalidTokenException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getUserFromToken(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("ping", new ping()); + processMap.put("authenticate", new authenticate()); + processMap.put("getUserFromToken", new getUserFromToken()); + return processMap; + } + + public static class ping extends org.apache.thrift.ProcessFunction { + public ping() { + super("ping"); + } + + public ping_args getEmptyArgsInstance() { + return new ping_args(); + } + + protected boolean isOneway() { + return false; + } + + public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException { + ping_result result = new ping_result(); + result.success = iface.ping(); + result.setSuccessIsSet(true); + return result; + } + } + + public static class authenticate extends org.apache.thrift.ProcessFunction { + public authenticate() { + super("authenticate"); + } + + public authenticate_args getEmptyArgsInstance() { + return new authenticate_args(); + } + + protected boolean isOneway() { + return false; + } + + public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException { + authenticate_result result = new authenticate_result(); + try { + result.success = iface.authenticate(args.username, args.password); + } catch (AuthenticationException failure) { + result.failure = failure; + } + return result; + } + } + + public static class getUserFromToken extends org.apache.thrift.ProcessFunction { + public getUserFromToken() { + super("getUserFromToken"); + } + + public getUserFromToken_args getEmptyArgsInstance() { + return new getUserFromToken_args(); + } + + protected boolean isOneway() { + return false; + } + + public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException { + getUserFromToken_result result = new getUserFromToken_result(); + try { + result.success = iface.getUserFromToken(args.token); + } catch (InvalidTokenException failure) { + result.failure = failure; + } + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("ping", new ping()); + processMap.put("authenticate", new authenticate()); + processMap.put("getUserFromToken", new getUserFromToken()); + return processMap; + } + + public static class ping extends org.apache.thrift.AsyncProcessFunction { + public ping() { + super("ping"); + } + + public ping_args getEmptyArgsInstance() { + return new ping_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + ping_result result = new ping_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + ping_result result = new ping_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.ping(resultHandler); + } + } + + public static class authenticate extends org.apache.thrift.AsyncProcessFunction { + public authenticate() { + super("authenticate"); + } + + public authenticate_args getEmptyArgsInstance() { + return new authenticate_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(SessionData o) { + authenticate_result result = new authenticate_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + authenticate_result result = new authenticate_result(); + if (e instanceof AuthenticationException) { + result.failure = (AuthenticationException) e; + result.setFailureIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.authenticate(args.username, args.password,resultHandler); + } + } + + public static class getUserFromToken extends org.apache.thrift.AsyncProcessFunction { + public getUserFromToken() { + super("getUserFromToken"); + } + + public getUserFromToken_args getEmptyArgsInstance() { + return new getUserFromToken_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(UserInfo o) { + getUserFromToken_result result = new getUserFromToken_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getUserFromToken_result result = new getUserFromToken_result(); + if (e instanceof InvalidTokenException) { + result.failure = (InvalidTokenException) e; + result.setFailureIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getUserFromToken(args.token,resultHandler); + } + } + + } + + public static class ping_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap); + } + + public ping_args() { + } + + /** + * Performs a deep copy on other. + */ + public ping_args(ping_args other) { + } + + public ping_args deepCopy() { + return new ping_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ping_args) + return this.equals((ping_args)that); + return false; + } + + public boolean equals(ping_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(ping_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ping_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ping_argsStandardSchemeFactory implements SchemeFactory { + public ping_argsStandardScheme getScheme() { + return new ping_argsStandardScheme(); + } + } + + private static class ping_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ping_argsTupleSchemeFactory implements SchemeFactory { + public ping_argsTupleScheme getScheme() { + return new ping_argsTupleScheme(); + } + } + + private static class ping_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class ping_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap); + } + + public ping_result() { + } + + public ping_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public ping_result(ping_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public ping_result deepCopy() { + return new ping_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public ping_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ping_result) + return this.equals((ping_result)that); + return false; + } + + public boolean equals(ping_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(ping_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ping_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ping_resultStandardSchemeFactory implements SchemeFactory { + public ping_resultStandardScheme getScheme() { + return new ping_resultStandardScheme(); + } + } + + private static class ping_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ping_resultTupleSchemeFactory implements SchemeFactory { + public ping_resultTupleScheme getScheme() { + return new ping_resultTupleScheme(); + } + } + + private static class ping_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class authenticate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_args"); + + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new authenticate_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new authenticate_argsTupleSchemeFactory()); + } + + public String username; // required + public String password; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USERNAME((short)1, "username"), + PASSWORD((short)2, "password"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USERNAME + return USERNAME; + case 2: // PASSWORD + return PASSWORD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap); + } + + public authenticate_args() { + } + + public authenticate_args( + String username, + String password) + { + this(); + this.username = username; + this.password = password; + } + + /** + * Performs a deep copy on other. + */ + public authenticate_args(authenticate_args other) { + if (other.isSetUsername()) { + this.username = other.username; + } + if (other.isSetPassword()) { + this.password = other.password; + } + } + + public authenticate_args deepCopy() { + return new authenticate_args(this); + } + + @Override + public void clear() { + this.username = null; + this.password = null; + } + + public String getUsername() { + return this.username; + } + + public authenticate_args setUsername(String username) { + this.username = username; + return this; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + public String getPassword() { + return this.password; + } + + public authenticate_args setPassword(String password) { + this.password = password; + return this; + } + + public void unsetPassword() { + this.password = null; + } + + /** Returns true if field password is set (has been assigned a value) and false otherwise */ + public boolean isSetPassword() { + return this.password != null; + } + + public void setPasswordIsSet(boolean value) { + if (!value) { + this.password = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((String)value); + } + break; + + case PASSWORD: + if (value == null) { + unsetPassword(); + } else { + setPassword((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USERNAME: + return getUsername(); + + case PASSWORD: + return getPassword(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USERNAME: + return isSetUsername(); + case PASSWORD: + return isSetPassword(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof authenticate_args) + return this.equals((authenticate_args)that); + return false; + } + + public boolean equals(authenticate_args that) { + if (that == null) + return false; + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + boolean this_present_password = true && this.isSetPassword(); + boolean that_present_password = true && that.isSetPassword(); + if (this_present_password || that_present_password) { + if (!(this_present_password && that_present_password)) + return false; + if (!this.password.equals(that.password)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(authenticate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPassword()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("authenticate_args("); + boolean first = true; + + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + first = false; + if (!first) sb.append(", "); + sb.append("password:"); + if (this.password == null) { + sb.append("null"); + } else { + sb.append(this.password); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class authenticate_argsStandardSchemeFactory implements SchemeFactory { + public authenticate_argsStandardScheme getScheme() { + return new authenticate_argsStandardScheme(); + } + } + + private static class authenticate_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PASSWORD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.username != null) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + if (struct.password != null) { + oprot.writeFieldBegin(PASSWORD_FIELD_DESC); + oprot.writeString(struct.password); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class authenticate_argsTupleSchemeFactory implements SchemeFactory { + public authenticate_argsTupleScheme getScheme() { + return new authenticate_argsTupleScheme(); + } + } + + private static class authenticate_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUsername()) { + optionals.set(0); + } + if (struct.isSetPassword()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUsername()) { + oprot.writeString(struct.username); + } + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } + if (incoming.get(1)) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } + } + } + + } + + public static class authenticate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new authenticate_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new authenticate_resultTupleSchemeFactory()); + } + + public SessionData success; // required + public AuthenticationException failure; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + FAILURE((short)1, "failure"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // FAILURE + return FAILURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionData.class))); + tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_result.class, metaDataMap); + } + + public authenticate_result() { + } + + public authenticate_result( + SessionData success, + AuthenticationException failure) + { + this(); + this.success = success; + this.failure = failure; + } + + /** + * Performs a deep copy on other. + */ + public authenticate_result(authenticate_result other) { + if (other.isSetSuccess()) { + this.success = new SessionData(other.success); + } + if (other.isSetFailure()) { + this.failure = new AuthenticationException(other.failure); + } + } + + public authenticate_result deepCopy() { + return new authenticate_result(this); + } + + @Override + public void clear() { + this.success = null; + this.failure = null; + } + + public SessionData getSuccess() { + return this.success; + } + + public authenticate_result setSuccess(SessionData success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public AuthenticationException getFailure() { + return this.failure; + } + + public authenticate_result setFailure(AuthenticationException failure) { + this.failure = failure; + return this; + } + + public void unsetFailure() { + this.failure = null; + } + + /** Returns true if field failure is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure() { + return this.failure != null; + } + + public void setFailureIsSet(boolean value) { + if (!value) { + this.failure = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((SessionData)value); + } + break; + + case FAILURE: + if (value == null) { + unsetFailure(); + } else { + setFailure((AuthenticationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case FAILURE: + return getFailure(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case FAILURE: + return isSetFailure(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof authenticate_result) + return this.equals((authenticate_result)that); + return false; + } + + public boolean equals(authenticate_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_failure = true && this.isSetFailure(); + boolean that_present_failure = true && that.isSetFailure(); + if (this_present_failure || that_present_failure) { + if (!(this_present_failure && that_present_failure)) + return false; + if (!this.failure.equals(that.failure)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(authenticate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("authenticate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("failure:"); + if (this.failure == null) { + sb.append("null"); + } else { + sb.append(this.failure); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class authenticate_resultStandardSchemeFactory implements SchemeFactory { + public authenticate_resultStandardScheme getScheme() { + return new authenticate_resultStandardScheme(); + } + } + + private static class authenticate_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new SessionData(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // FAILURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.failure = new AuthenticationException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.failure != null) { + oprot.writeFieldBegin(FAILURE_FIELD_DESC); + struct.failure.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class authenticate_resultTupleSchemeFactory implements SchemeFactory { + public authenticate_resultTupleScheme getScheme() { + return new authenticate_resultTupleScheme(); + } + } + + private static class authenticate_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetFailure()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetFailure()) { + struct.failure.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new SessionData(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.failure = new AuthenticationException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } + } + } + + } + + public static class getUserFromToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args"); + + private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getUserFromToken_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUserFromToken_argsTupleSchemeFactory()); + } + + public String token; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN((short)1, "token"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN + return TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_args.class, metaDataMap); + } + + public getUserFromToken_args() { + } + + public getUserFromToken_args( + String token) + { + this(); + this.token = token; + } + + /** + * Performs a deep copy on other. + */ + public getUserFromToken_args(getUserFromToken_args other) { + if (other.isSetToken()) { + this.token = other.token; + } + } + + public getUserFromToken_args deepCopy() { + return new getUserFromToken_args(this); + } + + @Override + public void clear() { + this.token = null; + } + + public String getToken() { + return this.token; + } + + public getUserFromToken_args setToken(String token) { + this.token = token; + return this; + } + + public void unsetToken() { + this.token = null; + } + + /** Returns true if field token is set (has been assigned a value) and false otherwise */ + public boolean isSetToken() { + return this.token != null; + } + + public void setTokenIsSet(boolean value) { + if (!value) { + this.token = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN: + if (value == null) { + unsetToken(); + } else { + setToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN: + return getToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN: + return isSetToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getUserFromToken_args) + return this.equals((getUserFromToken_args)that); + return false; + } + + public boolean equals(getUserFromToken_args that) { + if (that == null) + return false; + + boolean this_present_token = true && this.isSetToken(); + boolean that_present_token = true && that.isSetToken(); + if (this_present_token || that_present_token) { + if (!(this_present_token && that_present_token)) + return false; + if (!this.token.equals(that.token)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getUserFromToken_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getUserFromToken_args("); + boolean first = true; + + sb.append("token:"); + if (this.token == null) { + sb.append("null"); + } else { + sb.append(this.token); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getUserFromToken_argsStandardSchemeFactory implements SchemeFactory { + public getUserFromToken_argsStandardScheme getScheme() { + return new getUserFromToken_argsStandardScheme(); + } + } + + private static class getUserFromToken_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token = iprot.readString(); + struct.setTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token != null) { + oprot.writeFieldBegin(TOKEN_FIELD_DESC); + oprot.writeString(struct.token); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getUserFromToken_argsTupleSchemeFactory implements SchemeFactory { + public getUserFromToken_argsTupleScheme getScheme() { + return new getUserFromToken_argsTupleScheme(); + } + } + + private static class getUserFromToken_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken()) { + oprot.writeString(struct.token); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token = iprot.readString(); + struct.setTokenIsSet(true); + } + } + } + + } + + public static class getUserFromToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getUserFromToken_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUserFromToken_resultTupleSchemeFactory()); + } + + public UserInfo success; // required + public InvalidTokenException failure; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + FAILURE((short)1, "failure"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // FAILURE + return FAILURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class))); + tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_result.class, metaDataMap); + } + + public getUserFromToken_result() { + } + + public getUserFromToken_result( + UserInfo success, + InvalidTokenException failure) + { + this(); + this.success = success; + this.failure = failure; + } + + /** + * Performs a deep copy on other. + */ + public getUserFromToken_result(getUserFromToken_result other) { + if (other.isSetSuccess()) { + this.success = new UserInfo(other.success); + } + if (other.isSetFailure()) { + this.failure = new InvalidTokenException(other.failure); + } + } + + public getUserFromToken_result deepCopy() { + return new getUserFromToken_result(this); + } + + @Override + public void clear() { + this.success = null; + this.failure = null; + } + + public UserInfo getSuccess() { + return this.success; + } + + public getUserFromToken_result setSuccess(UserInfo success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidTokenException getFailure() { + return this.failure; + } + + public getUserFromToken_result setFailure(InvalidTokenException failure) { + this.failure = failure; + return this; + } + + public void unsetFailure() { + this.failure = null; + } + + /** Returns true if field failure is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure() { + return this.failure != null; + } + + public void setFailureIsSet(boolean value) { + if (!value) { + this.failure = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((UserInfo)value); + } + break; + + case FAILURE: + if (value == null) { + unsetFailure(); + } else { + setFailure((InvalidTokenException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case FAILURE: + return getFailure(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case FAILURE: + return isSetFailure(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getUserFromToken_result) + return this.equals((getUserFromToken_result)that); + return false; + } + + public boolean equals(getUserFromToken_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_failure = true && this.isSetFailure(); + boolean that_present_failure = true && that.isSetFailure(); + if (this_present_failure || that_present_failure) { + if (!(this_present_failure && that_present_failure)) + return false; + if (!this.failure.equals(that.failure)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getUserFromToken_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getUserFromToken_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("failure:"); + if (this.failure == null) { + sb.append("null"); + } else { + sb.append(this.failure); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getUserFromToken_resultStandardSchemeFactory implements SchemeFactory { + public getUserFromToken_resultStandardScheme getScheme() { + return new getUserFromToken_resultStandardScheme(); + } + } + + private static class getUserFromToken_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new UserInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // FAILURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.failure = new InvalidTokenException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.failure != null) { + oprot.writeFieldBegin(FAILURE_FIELD_DESC); + struct.failure.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getUserFromToken_resultTupleSchemeFactory implements SchemeFactory { + public getUserFromToken_resultTupleScheme getScheme() { + return new getUserFromToken_resultTupleScheme(); + } + } + + private static class getUserFromToken_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetFailure()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetFailure()) { + struct.failure.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new UserInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.failure = new InvalidTokenException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } + } + } + + } + +} diff --git a/Dozentenmodul/src/thrift/InvalidTokenException.java b/Dozentenmodul/src/thrift/InvalidTokenException.java new file mode 100644 index 00000000..914199b5 --- /dev/null +++ b/Dozentenmodul/src/thrift/InvalidTokenException.java @@ -0,0 +1,280 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class InvalidTokenException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidTokenException"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidTokenExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidTokenExceptionTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidTokenException.class, metaDataMap); + } + + public InvalidTokenException() { + } + + /** + * Performs a deep copy on other. + */ + public InvalidTokenException(InvalidTokenException other) { + } + + public InvalidTokenException deepCopy() { + return new InvalidTokenException(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidTokenException) + return this.equals((InvalidTokenException)that); + return false; + } + + public boolean equals(InvalidTokenException that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(InvalidTokenException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidTokenException("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class InvalidTokenExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidTokenExceptionStandardScheme getScheme() { + return new InvalidTokenExceptionStandardScheme(); + } + } + + private static class InvalidTokenExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidTokenException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidTokenException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidTokenExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidTokenExceptionTupleScheme getScheme() { + return new InvalidTokenExceptionTupleScheme(); + } + } + + private static class InvalidTokenExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidTokenException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidTokenException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git a/Dozentenmodul/src/thrift/MasterThriftConnection.java b/Dozentenmodul/src/thrift/MasterThriftConnection.java new file mode 100644 index 00000000..ecbc689c --- /dev/null +++ b/Dozentenmodul/src/thrift/MasterThriftConnection.java @@ -0,0 +1,38 @@ +package thrift; + +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import org.apache.thrift.transport.TTransportException; + +import thrift.ImageServer.Client; + + + +public class MasterThriftConnection { + final TTransport transport = new TSocket("132.230.4.16", 9090); + public Client getMasterThriftConnection() + { + + try { + transport.open(); + } catch (TTransportException e) { + System.out.println("Keine Verbindung möglich!"); + return null; + } + + final TProtocol protocol = new TBinaryProtocol(transport); + final Client client = new Client(protocol); + + + System.out.println("Der Server läuft!"); + + return client; + } + + public void closeMasterThriftConnection() + { + transport.close(); + } +} diff --git a/Dozentenmodul/src/thrift/SessionData.java b/Dozentenmodul/src/thrift/SessionData.java new file mode 100644 index 00000000..98ef43b4 --- /dev/null +++ b/Dozentenmodul/src/thrift/SessionData.java @@ -0,0 +1,488 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SessionData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SessionData"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SessionDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SessionDataTupleSchemeFactory()); + } + + public String sessionId; // required + public String authToken; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + AUTH_TOKEN((short)2, "authToken"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // AUTH_TOKEN + return AUTH_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID"))); + tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SessionData.class, metaDataMap); + } + + public SessionData() { + } + + public SessionData( + String sessionId, + String authToken) + { + this(); + this.sessionId = sessionId; + this.authToken = authToken; + } + + /** + * Performs a deep copy on other. + */ + public SessionData(SessionData other) { + if (other.isSetSessionId()) { + this.sessionId = other.sessionId; + } + if (other.isSetAuthToken()) { + this.authToken = other.authToken; + } + } + + public SessionData deepCopy() { + return new SessionData(this); + } + + @Override + public void clear() { + this.sessionId = null; + this.authToken = null; + } + + public String getSessionId() { + return this.sessionId; + } + + public SessionData setSessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + public void unsetSessionId() { + this.sessionId = null; + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return this.sessionId != null; + } + + public void setSessionIdIsSet(boolean value) { + if (!value) { + this.sessionId = null; + } + } + + public String getAuthToken() { + return this.authToken; + } + + public SessionData setAuthToken(String authToken) { + this.authToken = authToken; + return this; + } + + public void unsetAuthToken() { + this.authToken = null; + } + + /** Returns true if field authToken is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthToken() { + return this.authToken != null; + } + + public void setAuthTokenIsSet(boolean value) { + if (!value) { + this.authToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((String)value); + } + break; + + case AUTH_TOKEN: + if (value == null) { + unsetAuthToken(); + } else { + setAuthToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case AUTH_TOKEN: + return getAuthToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case AUTH_TOKEN: + return isSetAuthToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SessionData) + return this.equals((SessionData)that); + return false; + } + + public boolean equals(SessionData that) { + if (that == null) + return false; + + boolean this_present_sessionId = true && this.isSetSessionId(); + boolean that_present_sessionId = true && that.isSetSessionId(); + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (!this.sessionId.equals(that.sessionId)) + return false; + } + + boolean this_present_authToken = true && this.isSetAuthToken(); + boolean that_present_authToken = true && that.isSetAuthToken(); + if (this_present_authToken || that_present_authToken) { + if (!(this_present_authToken && that_present_authToken)) + return false; + if (!this.authToken.equals(that.authToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(SessionData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SessionData("); + boolean first = true; + + sb.append("sessionId:"); + if (this.sessionId == null) { + sb.append("null"); + } else { + sb.append(this.sessionId); + } + first = false; + if (!first) sb.append(", "); + sb.append("authToken:"); + if (this.authToken == null) { + sb.append("null"); + } else { + sb.append(this.authToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class SessionDataStandardSchemeFactory implements SchemeFactory { + public SessionDataStandardScheme getScheme() { + return new SessionDataStandardScheme(); + } + } + + private static class SessionDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SessionData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.sessionId = iprot.readString(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AUTH_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.authToken = iprot.readString(); + struct.setAuthTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, SessionData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.sessionId != null) { + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeString(struct.sessionId); + oprot.writeFieldEnd(); + } + if (struct.authToken != null) { + oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC); + oprot.writeString(struct.authToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SessionDataTupleSchemeFactory implements SchemeFactory { + public SessionDataTupleScheme getScheme() { + return new SessionDataTupleScheme(); + } + } + + private static class SessionDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + if (struct.isSetAuthToken()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSessionId()) { + oprot.writeString(struct.sessionId); + } + if (struct.isSetAuthToken()) { + oprot.writeString(struct.authToken); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.sessionId = iprot.readString(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + struct.authToken = iprot.readString(); + struct.setAuthTokenIsSet(true); + } + } + } + +} + diff --git a/Dozentenmodul/src/thrift/UserInfo.java b/Dozentenmodul/src/thrift/UserInfo.java new file mode 100644 index 00000000..56678646 --- /dev/null +++ b/Dozentenmodul/src/thrift/UserInfo.java @@ -0,0 +1,688 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class UserInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInfo"); + + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField E_MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("eMail", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UserInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UserInfoTupleSchemeFactory()); + } + + public String userId; // required + public String firstName; // required + public String lastName; // required + public String eMail; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_ID((short)1, "userId"), + FIRST_NAME((short)2, "firstName"), + LAST_NAME((short)3, "lastName"), + E_MAIL((short)4, "eMail"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_ID + return USER_ID; + case 2: // FIRST_NAME + return FIRST_NAME; + case 3: // LAST_NAME + return LAST_NAME; + case 4: // E_MAIL + return E_MAIL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.E_MAIL, new org.apache.thrift.meta_data.FieldMetaData("eMail", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserInfo.class, metaDataMap); + } + + public UserInfo() { + } + + public UserInfo( + String userId, + String firstName, + String lastName, + String eMail) + { + this(); + this.userId = userId; + this.firstName = firstName; + this.lastName = lastName; + this.eMail = eMail; + } + + /** + * Performs a deep copy on other. + */ + public UserInfo(UserInfo other) { + if (other.isSetUserId()) { + this.userId = other.userId; + } + if (other.isSetFirstName()) { + this.firstName = other.firstName; + } + if (other.isSetLastName()) { + this.lastName = other.lastName; + } + if (other.isSetEMail()) { + this.eMail = other.eMail; + } + } + + public UserInfo deepCopy() { + return new UserInfo(this); + } + + @Override + public void clear() { + this.userId = null; + this.firstName = null; + this.lastName = null; + this.eMail = null; + } + + public String getUserId() { + return this.userId; + } + + public UserInfo setUserId(String userId) { + this.userId = userId; + return this; + } + + public void unsetUserId() { + this.userId = null; + } + + /** Returns true if field userId is set (has been assigned a value) and false otherwise */ + public boolean isSetUserId() { + return this.userId != null; + } + + public void setUserIdIsSet(boolean value) { + if (!value) { + this.userId = null; + } + } + + public String getFirstName() { + return this.firstName; + } + + public UserInfo setFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + public void unsetFirstName() { + this.firstName = null; + } + + /** Returns true if field firstName is set (has been assigned a value) and false otherwise */ + public boolean isSetFirstName() { + return this.firstName != null; + } + + public void setFirstNameIsSet(boolean value) { + if (!value) { + this.firstName = null; + } + } + + public String getLastName() { + return this.lastName; + } + + public UserInfo setLastName(String lastName) { + this.lastName = lastName; + return this; + } + + public void unsetLastName() { + this.lastName = null; + } + + /** Returns true if field lastName is set (has been assigned a value) and false otherwise */ + public boolean isSetLastName() { + return this.lastName != null; + } + + public void setLastNameIsSet(boolean value) { + if (!value) { + this.lastName = null; + } + } + + public String getEMail() { + return this.eMail; + } + + public UserInfo setEMail(String eMail) { + this.eMail = eMail; + return this; + } + + public void unsetEMail() { + this.eMail = null; + } + + /** Returns true if field eMail is set (has been assigned a value) and false otherwise */ + public boolean isSetEMail() { + return this.eMail != null; + } + + public void setEMailIsSet(boolean value) { + if (!value) { + this.eMail = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_ID: + if (value == null) { + unsetUserId(); + } else { + setUserId((String)value); + } + break; + + case FIRST_NAME: + if (value == null) { + unsetFirstName(); + } else { + setFirstName((String)value); + } + break; + + case LAST_NAME: + if (value == null) { + unsetLastName(); + } else { + setLastName((String)value); + } + break; + + case E_MAIL: + if (value == null) { + unsetEMail(); + } else { + setEMail((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_ID: + return getUserId(); + + case FIRST_NAME: + return getFirstName(); + + case LAST_NAME: + return getLastName(); + + case E_MAIL: + return getEMail(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_ID: + return isSetUserId(); + case FIRST_NAME: + return isSetFirstName(); + case LAST_NAME: + return isSetLastName(); + case E_MAIL: + return isSetEMail(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UserInfo) + return this.equals((UserInfo)that); + return false; + } + + public boolean equals(UserInfo that) { + if (that == null) + return false; + + boolean this_present_userId = true && this.isSetUserId(); + boolean that_present_userId = true && that.isSetUserId(); + if (this_present_userId || that_present_userId) { + if (!(this_present_userId && that_present_userId)) + return false; + if (!this.userId.equals(that.userId)) + return false; + } + + boolean this_present_firstName = true && this.isSetFirstName(); + boolean that_present_firstName = true && that.isSetFirstName(); + if (this_present_firstName || that_present_firstName) { + if (!(this_present_firstName && that_present_firstName)) + return false; + if (!this.firstName.equals(that.firstName)) + return false; + } + + boolean this_present_lastName = true && this.isSetLastName(); + boolean that_present_lastName = true && that.isSetLastName(); + if (this_present_lastName || that_present_lastName) { + if (!(this_present_lastName && that_present_lastName)) + return false; + if (!this.lastName.equals(that.lastName)) + return false; + } + + boolean this_present_eMail = true && this.isSetEMail(); + boolean that_present_eMail = true && that.isSetEMail(); + if (this_present_eMail || that_present_eMail) { + if (!(this_present_eMail && that_present_eMail)) + return false; + if (!this.eMail.equals(that.eMail)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(UserInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFirstName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEMail()).compareTo(other.isSetEMail()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEMail()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eMail, other.eMail); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("UserInfo("); + boolean first = true; + + sb.append("userId:"); + if (this.userId == null) { + sb.append("null"); + } else { + sb.append(this.userId); + } + first = false; + if (!first) sb.append(", "); + sb.append("firstName:"); + if (this.firstName == null) { + sb.append("null"); + } else { + sb.append(this.firstName); + } + first = false; + if (!first) sb.append(", "); + sb.append("lastName:"); + if (this.lastName == null) { + sb.append("null"); + } else { + sb.append(this.lastName); + } + first = false; + if (!first) sb.append(", "); + sb.append("eMail:"); + if (this.eMail == null) { + sb.append("null"); + } else { + sb.append(this.eMail); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class UserInfoStandardSchemeFactory implements SchemeFactory { + public UserInfoStandardScheme getScheme() { + return new UserInfoStandardScheme(); + } + } + + private static class UserInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UserInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userId = iprot.readString(); + struct.setUserIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FIRST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LAST_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // E_MAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.eMail = iprot.readString(); + struct.setEMailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UserInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userId != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userId); + oprot.writeFieldEnd(); + } + if (struct.firstName != null) { + oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC); + oprot.writeString(struct.firstName); + oprot.writeFieldEnd(); + } + if (struct.lastName != null) { + oprot.writeFieldBegin(LAST_NAME_FIELD_DESC); + oprot.writeString(struct.lastName); + oprot.writeFieldEnd(); + } + if (struct.eMail != null) { + oprot.writeFieldBegin(E_MAIL_FIELD_DESC); + oprot.writeString(struct.eMail); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UserInfoTupleSchemeFactory implements SchemeFactory { + public UserInfoTupleScheme getScheme() { + return new UserInfoTupleScheme(); + } + } + + private static class UserInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserId()) { + optionals.set(0); + } + if (struct.isSetFirstName()) { + optionals.set(1); + } + if (struct.isSetLastName()) { + optionals.set(2); + } + if (struct.isSetEMail()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUserId()) { + oprot.writeString(struct.userId); + } + if (struct.isSetFirstName()) { + oprot.writeString(struct.firstName); + } + if (struct.isSetLastName()) { + oprot.writeString(struct.lastName); + } + if (struct.isSetEMail()) { + oprot.writeString(struct.eMail); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.userId = iprot.readString(); + struct.setUserIdIsSet(true); + } + if (incoming.get(1)) { + struct.firstName = iprot.readString(); + struct.setFirstNameIsSet(true); + } + if (incoming.get(2)) { + struct.lastName = iprot.readString(); + struct.setLastNameIsSet(true); + } + if (incoming.get(3)) { + struct.eMail = iprot.readString(); + struct.setEMailIsSet(true); + } + } + } + +} + -- cgit v1.2.3-55-g7522