diff --git a/Client/.gradle/3.2.1/taskArtifacts/fileHashes.bin b/Client/.gradle/3.2.1/taskArtifacts/fileHashes.bin new file mode 100644 index 0000000..b4ecd17 Binary files /dev/null and b/Client/.gradle/3.2.1/taskArtifacts/fileHashes.bin differ diff --git a/Client/.gradle/3.2.1/taskArtifacts/fileSnapshots.bin b/Client/.gradle/3.2.1/taskArtifacts/fileSnapshots.bin new file mode 100644 index 0000000..390ca25 Binary files /dev/null and b/Client/.gradle/3.2.1/taskArtifacts/fileSnapshots.bin differ diff --git a/Client/.gradle/3.2.1/taskArtifacts/taskArtifacts.bin b/Client/.gradle/3.2.1/taskArtifacts/taskArtifacts.bin new file mode 100644 index 0000000..9eddc12 Binary files /dev/null and b/Client/.gradle/3.2.1/taskArtifacts/taskArtifacts.bin differ diff --git a/Client/.gradle/3.2.1/taskArtifacts/taskArtifacts.lock b/Client/.gradle/3.2.1/taskArtifacts/taskArtifacts.lock new file mode 100644 index 0000000..4516d32 Binary files /dev/null and b/Client/.gradle/3.2.1/taskArtifacts/taskArtifacts.lock differ diff --git a/Client/bib/commons-logging-1.2-bin.zip b/Client/bib/commons-logging-1.2-bin.zip new file mode 100755 index 0000000..091e6bd Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin.zip differ diff --git a/Client/bib/commons-logging-1.2-bin/LICENSE.txt b/Client/bib/commons-logging-1.2-bin/LICENSE.txt new file mode 100755 index 0000000..d645695 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Client/bib/commons-logging-1.2-bin/NOTICE.txt b/Client/bib/commons-logging-1.2-bin/NOTICE.txt new file mode 100755 index 0000000..556bd03 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/NOTICE.txt @@ -0,0 +1,6 @@ +Apache Commons Logging +Copyright 2003-2014 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + diff --git a/Client/bib/commons-logging-1.2-bin/RELEASE-NOTES.txt b/Client/bib/commons-logging-1.2-bin/RELEASE-NOTES.txt new file mode 100755 index 0000000..6376134 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/RELEASE-NOTES.txt @@ -0,0 +1,31 @@ + Apache Commons Logging + Version 1.2 + RELEASE NOTES + +The Apache Commons Logging team is pleased to announce +the release of Apache Commons Logging 1.2 + +Apache Commons Logging is a thin adapter allowing configurable +bridging to other, well known logging systems. + +This is a maintenance release containing bug fixes. +Java 1.2 or later is required. + +Changes in this version include: + +Fixed Bugs: +o LOGGING-37: Improve performance of LogFactory#getFactory() by calling + Thread#currentThread()#getContextClassLoader() directly instead + of using reflection. As a consequence support for JDK 1.1 has + been dropped. Thanks to Matthias Ernst, Archie Cobbs. +o LOGGING-156: Fix SecurityAllowedTestCase when executed with OpenJDK 1.7 due + to an additional required RuntimePermission. Thanks to Mikolaj Izdebski. +o LOGGING-157: Fix javadoc to comply with javadoc tool from jdk 1.8. Thanks to Ville Skyttä. + + +Historical list of changes: http://commons.apache.org/proper/commons-logging/changes-report.html + +For complete information on Apache Commons Logging, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Commons Logging website: + +http://commons.apache.org/proper/commons-logging/ \ No newline at end of file diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/allclasses-frame.html b/Client/bib/commons-logging-1.2-bin/apidocs/allclasses-frame.html new file mode 100755 index 0000000..8ff9b38 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/allclasses-frame.html @@ -0,0 +1,30 @@ + + + + + +All Classes (Apache Commons Logging 1.2 API) + + + +

All Classes

+
+ +
+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/allclasses-noframe.html b/Client/bib/commons-logging-1.2-bin/apidocs/allclasses-noframe.html new file mode 100755 index 0000000..4920976 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/allclasses-noframe.html @@ -0,0 +1,30 @@ + + + + + +All Classes (Apache Commons Logging 1.2 API) + + + +

All Classes

+
+ +
+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/constant-values.html b/Client/bib/commons-logging-1.2-bin/apidocs/constant-values.html new file mode 100755 index 0000000..e1294ca --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/constant-values.html @@ -0,0 +1,324 @@ + + + + + +Constant Field Values (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

org.apache.*

+ + +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/deprecated-list.html b/Client/bib/commons-logging-1.2-bin/apidocs/deprecated-list.html new file mode 100755 index 0000000..c6a1978 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/deprecated-list.html @@ -0,0 +1,207 @@ + + + + + +Deprecated List (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+ +
+
+ + + + + + + + + + + +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/help-doc.html b/Client/bib/commons-logging-1.2-bin/apidocs/help-doc.html new file mode 100755 index 0000000..776d93f --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/help-doc.html @@ -0,0 +1,220 @@ + + + + + +API Help (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/index-all.html b/Client/bib/commons-logging-1.2-bin/apidocs/index-all.html new file mode 100755 index 0000000..0dc02c5 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/index-all.html @@ -0,0 +1,1546 @@ + + + + + +Index (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
A C D E F G H I J K L M N O P R S T V W  + + +

A

+
+
ALLOW_FLAWED_CONTEXT_PROPERTY - Static variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The name (org.apache.commons.logging.Log.allowFlawedContext) + of the system property which can be set true/false to + determine system behaviour when a bad context-classloader is encountered.
+
+
ALLOW_FLAWED_DISCOVERY_PROPERTY - Static variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The name (org.apache.commons.logging.Log.allowFlawedDiscovery) + of the system property which can be set true/false to + determine system behaviour when a bad logging adapter class is + encountered during logging discovery.
+
+
ALLOW_FLAWED_HIERARCHY_PROPERTY - Static variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The name (org.apache.commons.logging.Log.allowFlawedHierarchy) + of the system property which can be set true/false to + determine system behaviour when a logging adapter class is + encountered which has bound to the wrong Log class implementation.
+
+
attributes - Variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Configuration attributes.
+
+
AvalonLogger - Class in org.apache.commons.logging.impl
+
+
Implementation of commons-logging Log interface that delegates all + logging calls to the Avalon logging abstraction: the Logger interface.
+
+
AvalonLogger(Logger) - Constructor for class org.apache.commons.logging.impl.AvalonLogger
+
+
Constructs an AvalonLogger that outputs to the given + Logger instance.
+
+
AvalonLogger(String) - Constructor for class org.apache.commons.logging.impl.AvalonLogger
+
+
Constructs an AvalonLogger that will log to a child + of the Logger set by calling AvalonLogger.setDefaultLogger(org.apache.avalon.framework.logger.Logger).
+
+
+ + + +

C

+
+
cause - Variable in exception org.apache.commons.logging.LogConfigurationException
+
+
The underlying cause of this exception.
+
+
containsKey(Object) - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
contextDestroyed(ServletContextEvent) - Method in class org.apache.commons.logging.impl.ServletContextCleaner
+
+
Invoked when a webapp is undeployed, this tells the LogFactory + class to release any logging information related to the current + contextClassloader.
+
+
contextInitialized(ServletContextEvent) - Method in class org.apache.commons.logging.impl.ServletContextCleaner
+
+
Invoked when a webapp is deployed.
+
+
createFactory(String, ClassLoader) - Static method in class org.apache.commons.logging.LogFactory
+
+
Implements the operations described in the javadoc for newFactory.
+
+
currentLogLevel - Variable in class org.apache.commons.logging.impl.SimpleLog
+
+
The current log level
+
+
+ + + +

D

+
+
dateFormatter - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Used to format times.
+
+
dateTimeFormat - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
The date and time format to use in the log message
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.debug.
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.debug.
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.FINE.
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.FINE.
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.FINE.
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.FINE.
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.DEBUG.
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.DEBUG.
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.DEBUG.
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.DEBUG.
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
debug(Object) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with + org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG.
+
+
debug(Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with + org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG.
+
+
debug(Object) - Method in interface org.apache.commons.logging.Log
+
+
Logs a message with debug log level.
+
+
debug(Object, Throwable) - Method in interface org.apache.commons.logging.Log
+
+
Logs an error with debug log level.
+
+
DEFAULT_DATE_TIME_FORMAT - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
The default format to use when formating dates
+
+
DIAGNOSTICS_DEST_PROPERTY - Static variable in class org.apache.commons.logging.LogFactory
+
+
The name (org.apache.commons.logging.diagnostics.dest) + of the property used to enable internal commons-logging + diagnostic output, in order to get information on what logging + implementations are being discovered, what classloaders they + are loaded through, etc.
+
+
directGetContextClassLoader() - Static method in class org.apache.commons.logging.LogFactory
+
+
Return the thread context class loader if available; otherwise return null.
+
+
dummyLevel - Static variable in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
This member variable simply ensures that any attempt to initialise + this class in a pre-1.4 JVM will result in an ExceptionInInitializerError.
+
+
dummyLevel - Static variable in class org.apache.commons.logging.impl.Jdk14Logger
+
+
This member variable simply ensures that any attempt to initialise + this class in a pre-1.4 JVM will result in an ExceptionInInitializerError.
+
+
+ + + +

E

+
+
elements() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
entrySet() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.error.
+
+
error(Object) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.error.
+
+
error(Object) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
error(Object) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
error(Object) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.ERROR.
+
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.ERROR.
+
+
error(Object) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.ERROR.
+
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.ERROR.
+
+
error(Object) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
error(Object) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR.
+
+
error(Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR.
+
+
error(Object) - Method in interface org.apache.commons.logging.Log
+
+
Logs a message with error log level.
+
+
error(Object, Throwable) - Method in interface org.apache.commons.logging.Log
+
+
Logs an error with error log level.
+
+
+ + + +

F

+
+
factories - Static variable in class org.apache.commons.logging.LogFactory
+
+
The previously constructed LogFactory instances, keyed by + the ClassLoader with which it was created.
+
+
FACTORY_DEFAULT - Static variable in class org.apache.commons.logging.LogFactory
+
+
The fully qualified class name of the fallback LogFactory + implementation class to use, if no other can be found.
+
+
FACTORY_PROPERTIES - Static variable in class org.apache.commons.logging.LogFactory
+
+
The name (commons-logging.properties) of the properties file to search for.
+
+
FACTORY_PROPERTY - Static variable in class org.apache.commons.logging.LogFactory
+
+
The name (org.apache.commons.logging.LogFactory) of the property + used to identify the LogFactory implementation + class name.
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.fatalError.
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.fatalError.
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.SEVERE.
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.FATAL.
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.FATAL.
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.FATAL_ERROR.
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.FATAL_ERROR.
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
fatal(Object) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Log a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL.
+
+
fatal(Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL.
+
+
fatal(Object) - Method in interface org.apache.commons.logging.Log
+
+
Logs a message with fatal log level.
+
+
fatal(Object, Throwable) - Method in interface org.apache.commons.logging.Log
+
+
Logs an error with fatal log level.
+
+
+ + + +

G

+
+
get(Object) - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
getAttribute(String) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Return the configuration attribute with the specified name (if any), + or null if there is no such attribute.
+
+
getAttribute(String) - Method in class org.apache.commons.logging.LogFactory
+
+
Return the configuration attribute with the specified name (if any), + or null if there is no such attribute.
+
+
getAttributeNames() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Return an array containing the names of all currently defined + configuration attributes.
+
+
getAttributeNames() - Method in class org.apache.commons.logging.LogFactory
+
+
Return an array containing the names of all currently defined + configuration attributes.
+
+
getCause() - Method in exception org.apache.commons.logging.LogConfigurationException
+
+
Return the underlying cause of this exception (if any).
+
+
getClassLoader(Class) - Static method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Workaround for bug in Java1.2; in theory this method is not needed.
+
+
getClassLoader(Class) - Static method in class org.apache.commons.logging.LogFactory
+
+
Safely get access to the classloader for the specified class.
+
+
getContextClassLoader() - Static method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Gets the context classloader.
+
+
getContextClassLoader() - Static method in class org.apache.commons.logging.LogFactory
+
+
Returns the current context classloader.
+
+
getFactory() - Static method in class org.apache.commons.logging.LogFactory
+
+
Construct (if necessary) and return a LogFactory + instance, using the following ordered lookup procedure to determine + the name of the implementation class to be loaded.
+
+
getInstance(Class) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Convenience method to derive a name from the specified class and + call getInstance(String) with it.
+
+
getInstance(String) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Construct (if necessary) and return a Log instance, + using the factory's current set of configuration attributes.
+
+
getInstance(Class) - Method in class org.apache.commons.logging.LogFactory
+
+
Convenience method to derive a name from the specified class and + call getInstance(String) with it.
+
+
getInstance(String) - Method in class org.apache.commons.logging.LogFactory
+
+
Construct (if necessary) and return a Log instance, + using the factory's current set of configuration attributes.
+
+
getInstance(String) - Static method in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Get a Log instance by class name.
+
+
getInstance(Class) - Static method in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Get a Log instance by class.
+
+
getLevel() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Get logging level.
+
+
getLog(Class) - Static method in class org.apache.commons.logging.LogFactory
+
+
Convenience method to return a named logger, without the application + having to care about factories.
+
+
getLog(String) - Static method in class org.apache.commons.logging.LogFactory
+
+
Convenience method to return a named logger, without the application + having to care about factories.
+
+
getLogClassName() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Deprecated. +
Never invoked by this class; subclasses should not assume + it will be.
+
+
+
getLogConstructor() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Deprecated. +
Never invoked by this class; subclasses should not assume + it will be.
+
+
+
getLogger() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Gets the Avalon logger implementation used to perform logging.
+
+
getLogger() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Return the native Logger instance we are using.
+
+
getLogger() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Return the native Logger instance we are using.
+
+
getLogger() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Return the native Logger instance we are using.
+
+
getLogger() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Return the underlying Logger we are using.
+
+
getLogNames() - Static method in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Returns a String array containing the names of + all logs known to me.
+
+
+ + + +

H

+
+
handleThrowable(Throwable) - Static method in class org.apache.commons.logging.LogFactory
+
+
Checks whether the supplied Throwable is one that needs to be + re-thrown and ignores all others.
+
+
HASHTABLE_IMPLEMENTATION_PROPERTY - Static variable in class org.apache.commons.logging.LogFactory
+
+
Setting this system property + (org.apache.commons.logging.LogFactory.HashtableImpl) + value allows the Hashtable used to store + classloaders to be substituted by an alternative implementation.
+
+
+ + + +

I

+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.info.
+
+
info(Object) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.info.
+
+
info(Object) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.INFO.
+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.INFO.
+
+
info(Object) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.INFO.
+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.INFO.
+
+
info(Object) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.INFO.
+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.INFO.
+
+
info(Object) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.INFO.
+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.INFO.
+
+
info(Object) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
info(Object) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO.
+
+
info(Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO.
+
+
info(Object) - Method in interface org.apache.commons.logging.Log
+
+
Logs a message with info log level.
+
+
info(Object, Throwable) - Method in interface org.apache.commons.logging.Log
+
+
Logs an error with info log level.
+
+
instances - Variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The Log instances that have + already been created, keyed by logger name.
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Is logging to org.apache.avalon.framework.logger.Logger.debug enabled?
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Is debug logging currently enabled?
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Is debug logging currently enabled?
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Check whether the Log4j Logger used is enabled for DEBUG priority.
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Checks whether the LogKit logger will log messages of priority DEBUG.
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Debug is never enabled.
+
+
isDebugEnabled() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Are debug messages currently enabled?
+
+
isDebugEnabled() - Method in interface org.apache.commons.logging.Log
+
+
Is debug logging currently enabled?
+
+
isDiagnosticsEnabled() - Static method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Workaround for bug in Java1.2; in theory this method is not needed.
+
+
isDiagnosticsEnabled() - Static method in class org.apache.commons.logging.LogFactory
+
+
Indicates true if the user has enabled internal logging.
+
+
isEmpty() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Is logging to org.apache.avalon.framework.logger.Logger.error enabled?
+
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Is error logging currently enabled?
+
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Is error logging currently enabled?
+
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Check whether the Log4j Logger used is enabled for ERROR priority.
+
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Checks whether the LogKit logger will log messages of priority ERROR.
+
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Error is never enabled.
+
+
isErrorEnabled() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Are error messages currently enabled?
+
+
isErrorEnabled() - Method in interface org.apache.commons.logging.Log
+
+
Is error logging currently enabled?
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Is logging to org.apache.avalon.framework.logger.Logger.fatalError enabled?
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Is fatal logging currently enabled?
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Is fatal logging currently enabled?
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Check whether the Log4j Logger used is enabled for FATAL priority.
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Checks whether the LogKit logger will log messages of priority FATAL_ERROR.
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Fatal is never enabled.
+
+
isFatalEnabled() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Are fatal messages currently enabled?
+
+
isFatalEnabled() - Method in interface org.apache.commons.logging.Log
+
+
Is fatal logging currently enabled?
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Is logging to org.apache.avalon.framework.logger.Logger.info enabled?
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Is info logging currently enabled?
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Is info logging currently enabled?
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Check whether the Log4j Logger used is enabled for INFO priority.
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Checks whether the LogKit logger will log messages of priority INFO.
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Info is never enabled.
+
+
isInfoEnabled() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Are info messages currently enabled?
+
+
isInfoEnabled() - Method in interface org.apache.commons.logging.Log
+
+
Is info logging currently enabled?
+
+
isJdk13LumberjackAvailable() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Deprecated. +
Never invoked by this class; subclasses should not assume + it will be.
+
+
+
isJdk14Available() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Deprecated. +
Never invoked by this class; subclasses should not assume + it will be.
+
+
+
isLevelEnabled(int) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Is the given log level currently enabled?
+
+
isLog4JAvailable() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Deprecated. +
Never invoked by this class; subclasses should not assume + it will be.
+
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Is logging to org.apache.avalon.framework.logger.Logger.debug enabled?
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Is trace logging currently enabled?
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Is trace logging currently enabled?
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Check whether the Log4j Logger used is enabled for TRACE priority.
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Checks whether the LogKit logger will log messages of priority DEBUG.
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Trace is never enabled.
+
+
isTraceEnabled() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Are trace messages currently enabled?
+
+
isTraceEnabled() - Method in interface org.apache.commons.logging.Log
+
+
Is trace logging currently enabled?
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Is logging to org.apache.avalon.framework.logger.Logger.warn enabled?
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Is warn logging currently enabled?
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Is warn logging currently enabled?
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Check whether the Log4j Logger used is enabled for WARN priority.
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Checks whether the LogKit logger will log messages of priority WARN.
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Warn is never enabled.
+
+
isWarnEnabled() - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Are warn messages currently enabled?
+
+
isWarnEnabled() - Method in interface org.apache.commons.logging.Log
+
+
Is warn logging currently enabled?
+
+
+ + + +

J

+
+
Jdk13LumberjackLogger - Class in org.apache.commons.logging.impl
+
+
Implementation of the org.apache.commons.logging.Log + interface that wraps the standard JDK logging mechanisms that are + available in SourceForge's Lumberjack for JDKs prior to 1.4.
+
+
Jdk13LumberjackLogger(String) - Constructor for class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Construct a named instance of this Logger.
+
+
jdk14IsAvailable - Static variable in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Is JDK 1.4 logging available
+
+
Jdk14Logger - Class in org.apache.commons.logging.impl
+
+
Implementation of the org.apache.commons.logging.Log + interface that wraps the standard JDK logging mechanisms that were + introduced in the Merlin release (JDK 1.4).
+
+
Jdk14Logger(String) - Constructor for class org.apache.commons.logging.impl.Jdk14Logger
+
+
Construct a named instance of this Logger.
+
+
+ + + +

K

+
+
keys() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
keySet() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
+ + + +

L

+
+
log(Level, String, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
 
+
log(int, Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Do the actual logging.
+
+
Log - Interface in org.apache.commons.logging
+
+
A simple logging interface abstracting logging APIs.
+
+
log4jIsAvailable - Static variable in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Is log4j available (in the current classpath)
+
+
Log4JLogger - Class in org.apache.commons.logging.impl
+
+
Implementation of Log that maps directly to a + Logger for log4J version 1.2.
+
+
Log4JLogger() - Constructor for class org.apache.commons.logging.impl.Log4JLogger
+
 
+
Log4JLogger(String) - Constructor for class org.apache.commons.logging.impl.Log4JLogger
+
+
Base constructor.
+
+
Log4JLogger(Logger) - Constructor for class org.apache.commons.logging.impl.Log4JLogger
+
+
For use with a log4j factory.
+
+
LOG_LEVEL_ALL - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Enable all logging levels
+
+
LOG_LEVEL_DEBUG - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
"Debug" level logging.
+
+
LOG_LEVEL_ERROR - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
"Error" level logging.
+
+
LOG_LEVEL_FATAL - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
"Fatal" level logging.
+
+
LOG_LEVEL_INFO - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
"Info" level logging.
+
+
LOG_LEVEL_OFF - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Enable no logging levels
+
+
LOG_LEVEL_TRACE - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
"Trace" level logging.
+
+
LOG_LEVEL_WARN - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
"Warn" level logging.
+
+
LOG_PROPERTY - Static variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The name (org.apache.commons.logging.Log) of the system + property identifying our Log implementation class.
+
+
LOG_PROPERTY_OLD - Static variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The deprecated system property used for backwards compatibility with + old versions of JCL.
+
+
LogConfigurationException - Exception in org.apache.commons.logging
+
+
An exception that is thrown only if a suitable LogFactory + or Log instance cannot be created by the corresponding + factory methods.
+
+
LogConfigurationException() - Constructor for exception org.apache.commons.logging.LogConfigurationException
+
+
Construct a new exception with null as its detail message.
+
+
LogConfigurationException(String) - Constructor for exception org.apache.commons.logging.LogConfigurationException
+
+
Construct a new exception with the specified detail message.
+
+
LogConfigurationException(Throwable) - Constructor for exception org.apache.commons.logging.LogConfigurationException
+
+
Construct a new exception with the specified cause and a derived + detail message.
+
+
LogConfigurationException(String, Throwable) - Constructor for exception org.apache.commons.logging.LogConfigurationException
+
+
Construct a new exception with the specified detail message and cause.
+
+
logConstructor - Variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The one-argument constructor of the + Log + implementation class that will be used to create new instances.
+
+
logConstructorSignature - Variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The signature of the Constructor to be used.
+
+
logDiagnostic(String) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Output a diagnostic message to a user-specified destination (if the + user has enabled diagnostic logging).
+
+
LogFactory - Class in org.apache.commons.logging
+
+
Factory for creating Log instances, with discovery and + configuration features similar to that employed by standard Java APIs + such as JAXP.
+
+
LogFactory() - Constructor for class org.apache.commons.logging.LogFactory
+
+
Protected constructor that is not available for public use.
+
+
LogFactoryImpl - Class in org.apache.commons.logging.impl
+
+
Concrete subclass of LogFactory that implements the + following algorithm to dynamically select a logging implementation + class to instantiate a wrapper for: + + Use a factory configuration attribute named + org.apache.commons.logging.Log to identify the + requested implementation class. + Use the org.apache.commons.logging.Log system property + to identify the requested implementation class. + If Log4J is available, return an instance of + org.apache.commons.logging.impl.Log4JLogger. + If JDK 1.4 or later is available, return an instance of + org.apache.commons.logging.impl.Jdk14Logger. + Otherwise, return an instance of + org.apache.commons.logging.impl.SimpleLog. +
+
+
LogFactoryImpl() - Constructor for class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Public no-arguments constructor required by the lookup mechanism.
+
+
logger - Variable in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
The underlying Logger implementation we are using.
+
+
logger - Variable in class org.apache.commons.logging.impl.Jdk14Logger
+
+
The underlying Logger implementation we are using.
+
+
logger - Variable in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logging goes to this LogKit logger
+
+
logImplctor - Static variable in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Constructor for current log class
+
+
LogKitLogger - Class in org.apache.commons.logging.impl
+
+
Implementation of org.apache.commons.logging.Log + that wraps the avalon-logkit + logging system.
+
+
LogKitLogger(String) - Constructor for class org.apache.commons.logging.impl.LogKitLogger
+
+
Construct LogKitLogger which wraps the LogKit + logger with given name.
+
+
logMethod - Variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The one-argument setLogFactory method of the selected + Log method, if it exists.
+
+
logMethodSignature - Variable in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
The signature of the setLogFactory method to be used.
+
+
logName - Variable in class org.apache.commons.logging.impl.SimpleLog
+
+
The name of this simple log instance
+
+
logRawDiagnostic(String) - Static method in class org.apache.commons.logging.LogFactory
+
+
Write the specified message to the internal logging destination.
+
+
logs - Static variable in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
LogSource - Class in org.apache.commons.logging
+
+
Deprecated. +
Use LogFactory instead - The default factory + implementation performs exactly the same algorithm as this class did
+
+
+
+ + + +

M

+
+
makeNewLogInstance(String) - Static method in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Create a new Log implementation, based on the given name.
+
+
+ + + +

N

+
+
name - Variable in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
 
+
name - Variable in class org.apache.commons.logging.impl.Jdk14Logger
+
+
The name of the logger we are wrapping.
+
+
name - Variable in class org.apache.commons.logging.impl.LogKitLogger
+
+
Name of this logger
+
+
newFactory(String, ClassLoader, ClassLoader) - Static method in class org.apache.commons.logging.LogFactory
+
+
Return a new instance of the specified LogFactory + implementation class, loaded by the specified class loader.
+
+
newFactory(String, ClassLoader) - Static method in class org.apache.commons.logging.LogFactory
+
+
Method provided for backwards compatibility; see newFactory version that + takes 3 parameters.
+
+
newInstance(String) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Create and return a new Log + instance for the specified name.
+
+
NoOpLog - Class in org.apache.commons.logging.impl
+
+
Trivial implementation of Log that throws away all messages.
+
+
NoOpLog() - Constructor for class org.apache.commons.logging.impl.NoOpLog
+
+
Convenience constructor
+
+
NoOpLog(String) - Constructor for class org.apache.commons.logging.impl.NoOpLog
+
+
Base constructor
+
+
nullClassLoaderFactory - Static variable in class org.apache.commons.logging.LogFactory
+
+
Deprecated. +
since 1.1.2
+
+
+
+ + + +

O

+
+
objectId(Object) - Static method in class org.apache.commons.logging.LogFactory
+
+
Returns a string that uniquely identifies the specified object, including + its class.
+
+
org.apache.commons.logging - package org.apache.commons.logging
+
+
Simple wrapper API around multiple logging APIs.
+
+
org.apache.commons.logging.impl - package org.apache.commons.logging.impl
+
+
Concrete implementations of commons-logging wrapper APIs.
+
+
+ + + +

P

+
+
PRIORITY_KEY - Static variable in class org.apache.commons.logging.LogFactory
+
+
The name (priority) of the key in the config file used to + specify the priority of that particular config file.
+
+
put(Object, Object) - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
putAll(Map) - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
+ + + +

R

+
+
rehash() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
release() - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Release any internal references to previously created + Log + instances returned by this factory.
+
+
release() - Method in class org.apache.commons.logging.LogFactory
+
+
Release any internal references to previously created Log + instances returned by this factory.
+
+
release(ClassLoader) - Static method in class org.apache.commons.logging.LogFactory
+
+
Release any internal references to previously created LogFactory + instances that have been associated with the specified class loader + (if any), after calling the instance method release() on + each of them.
+
+
releaseAll() - Static method in class org.apache.commons.logging.LogFactory
+
+
Release any internal references to previously created LogFactory + instances, after calling the instance method release() on + each of them.
+
+
remove(Object) - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
removeAttribute(String) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Remove any configuration attribute associated with the specified name.
+
+
removeAttribute(String) - Method in class org.apache.commons.logging.LogFactory
+
+
Remove any configuration attribute associated with the specified name.
+
+
+ + + +

S

+
+
SERVICE_ID - Static variable in class org.apache.commons.logging.LogFactory
+
+ +
+
ServletContextCleaner - Class in org.apache.commons.logging.impl
+
+
This class is capable of receiving notifications about the undeployment of + a webapp, and responds by ensuring that commons-logging releases all + memory associated with the undeployed webapp.
+
+
ServletContextCleaner() - Constructor for class org.apache.commons.logging.impl.ServletContextCleaner
+
 
+
setAttribute(String, Object) - Method in class org.apache.commons.logging.impl.LogFactoryImpl
+
+
Set the configuration attribute with the specified name.
+
+
setAttribute(String, Object) - Method in class org.apache.commons.logging.LogFactory
+
+
Set the configuration attribute with the specified name.
+
+
setDefaultLogger(Logger) - Static method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Sets the ancestral Avalon logger from which the delegating loggers will descend.
+
+
setLevel(int) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Set logging level.
+
+
setLogImplementation(String) - Static method in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Set the log implementation/log implementation factory + by the name of the class.
+
+
setLogImplementation(Class) - Static method in class org.apache.commons.logging.LogSource
+
+
Deprecated.
+
Set the log implementation/log implementation factory by class.
+
+
showDateTime - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Include the current time in the log message
+
+
showLogName - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Include the instance name in the log message?
+
+
showShortName - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Include the short name ( last component ) of the logger in the log + message.
+
+
SimpleLog - Class in org.apache.commons.logging.impl
+
+
Simple implementation of Log that sends all enabled log messages, + for all defined loggers, to System.err.
+
+
SimpleLog(String) - Constructor for class org.apache.commons.logging.impl.SimpleLog
+
+
Construct a simple log with given name.
+
+
simpleLogProps - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
Properties loaded from simplelog.properties
+
+
size() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
systemPrefix - Static variable in class org.apache.commons.logging.impl.SimpleLog
+
+
All system properties used by SimpleLog start with this
+
+
+ + + +

T

+
+
TCCL_KEY - Static variable in class org.apache.commons.logging.LogFactory
+
+
The name (use_tccl) of the key in the config file used + to specify whether logging classes should be loaded via the thread + context class loader (TCCL), or not.
+
+
toString() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.debug.
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.debug.
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.FINEST.
+
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.FINEST.
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.FINEST.
+
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.FINEST.
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.TRACE.
+
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.TRACE.
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.DEBUG.
+
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.DEBUG.
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
trace(Object) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE.
+
+
trace(Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE.
+
+
trace(Object) - Method in interface org.apache.commons.logging.Log
+
+
Logs a message with trace log level.
+
+
trace(Object, Throwable) - Method in interface org.apache.commons.logging.Log
+
+
Logs an error with trace log level.
+
+
+ + + +

V

+
+
values() - Method in class org.apache.commons.logging.impl.WeakHashtable
+
 
+
+ + + +

W

+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.warn.
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.AvalonLogger
+
+
Logs a message with org.apache.avalon.framework.logger.Logger.warn.
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.WARNING.
+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk13LumberjackLogger
+
+
Logs a message with java.util.logging.Level.WARNING.
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.WARNING.
+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.Jdk14Logger
+
+
Logs a message with java.util.logging.Level.WARNING.
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.WARN.
+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.Log4JLogger
+
+
Logs a message with org.apache.log4j.Priority.WARN.
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.WARN.
+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.LogKitLogger
+
+
Logs a message with org.apache.log.Priority.WARN.
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.NoOpLog
+
+
Do nothing
+
+
warn(Object) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN.
+
+
warn(Object, Throwable) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Logs a message with org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN.
+
+
warn(Object) - Method in interface org.apache.commons.logging.Log
+
+
Logs a message with warn log level.
+
+
warn(Object, Throwable) - Method in interface org.apache.commons.logging.Log
+
+
Logs an error with warn log level.
+
+
WeakHashtable - Class in org.apache.commons.logging.impl
+
+
Implementation of Hashtable that uses WeakReference's + to hold its keys thus allowing them to be reclaimed by the garbage collector.
+
+
WeakHashtable() - Constructor for class org.apache.commons.logging.impl.WeakHashtable
+
+
Constructs a WeakHashtable with the Hashtable default + capacity and load factor.
+
+
write(StringBuffer) - Method in class org.apache.commons.logging.impl.SimpleLog
+
+
Write the content of the message accumulated in the specified + StringBuffer to the appropriate output destination.
+
+
+A C D E F G H I J K L M N O P R S T V W 
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/index.html b/Client/bib/commons-logging-1.2-bin/apidocs/index.html new file mode 100755 index 0000000..c3c6475 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/index.html @@ -0,0 +1,67 @@ + + + + + +Apache Commons Logging 1.2 API + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/Log.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/Log.html new file mode 100755 index 0000000..de97130 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/Log.html @@ -0,0 +1,576 @@ + + + + + +Log (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging
+

Interface Log

+
+
+
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogConfigurationException.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogConfigurationException.html new file mode 100755 index 0000000..0e77c98 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogConfigurationException.html @@ -0,0 +1,389 @@ + + + + + +LogConfigurationException (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging
+

Class LogConfigurationException

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogFactory.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogFactory.html new file mode 100755 index 0000000..93877cd --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogFactory.html @@ -0,0 +1,1135 @@ + + + + + +LogFactory (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging
+

Class LogFactory

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogSource.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogSource.html new file mode 100755 index 0000000..1ed032a --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/LogSource.html @@ -0,0 +1,478 @@ + + + + + +LogSource (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging
+

Class LogSource

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/Log.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/Log.html new file mode 100755 index 0000000..e40b417 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/Log.html @@ -0,0 +1,303 @@ + + + + + +Uses of Interface org.apache.commons.logging.Log (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Interface
org.apache.commons.logging.Log

+
+
+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogConfigurationException.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogConfigurationException.html new file mode 100755 index 0000000..543341c --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogConfigurationException.html @@ -0,0 +1,266 @@ + + + + + +Uses of Class org.apache.commons.logging.LogConfigurationException (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.LogConfigurationException

+
+
+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogFactory.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogFactory.html new file mode 100755 index 0000000..a067ec9 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogFactory.html @@ -0,0 +1,236 @@ + + + + + +Uses of Class org.apache.commons.logging.LogFactory (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.LogFactory

+
+
+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogSource.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogSource.html new file mode 100755 index 0000000..b965231 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/class-use/LogSource.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.LogSource (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.LogSource

+
+
No usage of org.apache.commons.logging.LogSource
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/AvalonLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/AvalonLogger.html new file mode 100755 index 0000000..f8d1b6d --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/AvalonLogger.html @@ -0,0 +1,706 @@ + + + + + +AvalonLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class AvalonLogger

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Jdk13LumberjackLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Jdk13LumberjackLogger.html new file mode 100755 index 0000000..efad2f6 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Jdk13LumberjackLogger.html @@ -0,0 +1,720 @@ + + + + + +Jdk13LumberjackLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class Jdk13LumberjackLogger

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Jdk14Logger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Jdk14Logger.html new file mode 100755 index 0000000..6e0a507 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Jdk14Logger.html @@ -0,0 +1,738 @@ + + + + + +Jdk14Logger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class Jdk14Logger

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Log4JLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Log4JLogger.html new file mode 100755 index 0000000..7b0fb52 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/Log4JLogger.html @@ -0,0 +1,690 @@ + + + + + +Log4JLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class Log4JLogger

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/LogFactoryImpl.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/LogFactoryImpl.html new file mode 100755 index 0000000..4c98427 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/LogFactoryImpl.html @@ -0,0 +1,960 @@ + + + + + +LogFactoryImpl (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class LogFactoryImpl

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/LogKitLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/LogKitLogger.html new file mode 100755 index 0000000..ee2eb79 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/LogKitLogger.html @@ -0,0 +1,707 @@ + + + + + +LogKitLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class LogKitLogger

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/NoOpLog.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/NoOpLog.html new file mode 100755 index 0000000..6368b26 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/NoOpLog.html @@ -0,0 +1,643 @@ + + + + + +NoOpLog (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class NoOpLog

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/ServletContextCleaner.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/ServletContextCleaner.html new file mode 100755 index 0000000..b2d4a08 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/ServletContextCleaner.html @@ -0,0 +1,313 @@ + + + + + +ServletContextCleaner (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class ServletContextCleaner

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/SimpleLog.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/SimpleLog.html new file mode 100755 index 0000000..c62be47 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/SimpleLog.html @@ -0,0 +1,1112 @@ + + + + + +SimpleLog (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class SimpleLog

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/WeakHashtable.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/WeakHashtable.html new file mode 100755 index 0000000..63efa28 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/WeakHashtable.html @@ -0,0 +1,608 @@ + + + + + +WeakHashtable (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + + +
+
org.apache.commons.logging.impl
+

Class WeakHashtable

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/AvalonLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/AvalonLogger.html new file mode 100755 index 0000000..b22be7e --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/AvalonLogger.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.AvalonLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.AvalonLogger

+
+
No usage of org.apache.commons.logging.impl.AvalonLogger
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Jdk13LumberjackLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Jdk13LumberjackLogger.html new file mode 100755 index 0000000..fada0a7 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Jdk13LumberjackLogger.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.Jdk13LumberjackLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.Jdk13LumberjackLogger

+
+
No usage of org.apache.commons.logging.impl.Jdk13LumberjackLogger
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Jdk14Logger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Jdk14Logger.html new file mode 100755 index 0000000..a44d455 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Jdk14Logger.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.Jdk14Logger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.Jdk14Logger

+
+
No usage of org.apache.commons.logging.impl.Jdk14Logger
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Log4JLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Log4JLogger.html new file mode 100755 index 0000000..72d5329 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/Log4JLogger.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.Log4JLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.Log4JLogger

+
+
No usage of org.apache.commons.logging.impl.Log4JLogger
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/LogFactoryImpl.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/LogFactoryImpl.html new file mode 100755 index 0000000..0a0077a --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/LogFactoryImpl.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.LogFactoryImpl (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.LogFactoryImpl

+
+
No usage of org.apache.commons.logging.impl.LogFactoryImpl
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/LogKitLogger.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/LogKitLogger.html new file mode 100755 index 0000000..73aae39 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/LogKitLogger.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.LogKitLogger (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.LogKitLogger

+
+
No usage of org.apache.commons.logging.impl.LogKitLogger
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/NoOpLog.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/NoOpLog.html new file mode 100755 index 0000000..6863b6e --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/NoOpLog.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.NoOpLog (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.NoOpLog

+
+
No usage of org.apache.commons.logging.impl.NoOpLog
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/ServletContextCleaner.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/ServletContextCleaner.html new file mode 100755 index 0000000..8bac481 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/ServletContextCleaner.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.ServletContextCleaner (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.ServletContextCleaner

+
+
No usage of org.apache.commons.logging.impl.ServletContextCleaner
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/SimpleLog.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/SimpleLog.html new file mode 100755 index 0000000..0d00b0b --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/SimpleLog.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.SimpleLog (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.SimpleLog

+
+
No usage of org.apache.commons.logging.impl.SimpleLog
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/WeakHashtable.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/WeakHashtable.html new file mode 100755 index 0000000..ccb8bd2 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/class-use/WeakHashtable.html @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.logging.impl.WeakHashtable (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
org.apache.commons.logging.impl.WeakHashtable

+
+
No usage of org.apache.commons.logging.impl.WeakHashtable
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-frame.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-frame.html new file mode 100755 index 0000000..54909e8 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-frame.html @@ -0,0 +1,27 @@ + + + + + +org.apache.commons.logging.impl (Apache Commons Logging 1.2 API) + + + +

org.apache.commons.logging.impl

+
+

Classes

+ +
+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-summary.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-summary.html new file mode 100755 index 0000000..f16ad3c --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-summary.html @@ -0,0 +1,225 @@ + + + + + +org.apache.commons.logging.impl (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Package org.apache.commons.logging.impl

+
+
Concrete implementations of commons-logging wrapper APIs.
+
+

See: Description

+
+
+ + + + +

Package org.apache.commons.logging.impl Description

+

Concrete implementations of commons-logging wrapper APIs.

+
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-tree.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-tree.html new file mode 100755 index 0000000..0598d3e --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-tree.html @@ -0,0 +1,149 @@ + + + + + +org.apache.commons.logging.impl Class Hierarchy (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package org.apache.commons.logging.impl

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-use.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-use.html new file mode 100755 index 0000000..0e903db --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/impl/package-use.html @@ -0,0 +1,115 @@ + + + + + +Uses of Package org.apache.commons.logging.impl (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
org.apache.commons.logging.impl

+
+
No usage of org.apache.commons.logging.impl
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-frame.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-frame.html new file mode 100755 index 0000000..7c1509a --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-frame.html @@ -0,0 +1,27 @@ + + + + + +org.apache.commons.logging (Apache Commons Logging 1.2 API) + + + +

org.apache.commons.logging

+
+

Interfaces

+ +

Classes

+ +

Exceptions

+ +
+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-summary.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-summary.html new file mode 100755 index 0000000..56430ec --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-summary.html @@ -0,0 +1,421 @@ + + + + + +org.apache.commons.logging (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Package org.apache.commons.logging

+
+
Simple wrapper API around multiple logging APIs.
+
+

See: Description

+
+
+ + + + +

Package org.apache.commons.logging Description

+

Simple wrapper API around multiple logging APIs.

+ + +

Overview

+ +

This package provides an API for logging in server-based applications that +can be used around a variety of different logging implementations, including +prebuilt support for the following:

+ + + +

Quick Start Guide

+ +

For those impatient to just get on with it, the following example +illustrates the typical declaration and use of a logger that is named (by +convention) after the calling class: + +

+    import org.apache.commons.logging.Log;
+    import org.apache.commons.logging.LogFactory;
+
+    public class Foo {
+
+        private Log log = LogFactory.getLog(Foo.class);
+
+        public void foo() {
+            ...
+            try {
+                if (log.isDebugEnabled()) {
+                    log.debug("About to do something to object " + name);
+                }
+                name.bar();
+            } catch (IllegalStateException e) {
+                log.error("Something bad happened to " + name, e);
+            }
+            ...
+        }
+
+ +

Unless you configure things differently, all log output will be written +to System.err. Therefore, you really will want to review the remainder of +this page in order to understand how to configure logging for your +application.

+ + +

Configuring the Commons Logging Package

+ + +

Choosing a LogFactory Implementation

+ +

From an application perspective, the first requirement is to retrieve an +object reference to the LogFactory instance that will be used +to create Log instances for this +application. This is normally accomplished by calling the static +getFactory() method. This method implements the following +discovery algorithm to select the name of the LogFactory +implementation class this application wants to use:

+ + +

If a commons-logging.properties file is found, all of the +properties defined there are also used to set configuration attributes on +the instantiated LogFactory instance.

+ +

Once an implementation class name is selected, the corresponding class is +loaded from the current Thread context class loader (if there is one), or +from the class loader that loaded the LogFactory class itself +otherwise. This allows a copy of commons-logging.jar to be +shared in a multiple class loader environment (such as a servlet container), +but still allow each web application to provide its own LogFactory +implementation, if it so desires. An instance of this class will then be +created, and cached per class loader. + + +

The Default LogFactory Implementation

+ +

The Logging Package APIs include a default LogFactory +implementation class ( +org.apache.commons.logging.impl.LogFactoryImpl) that is selected if no +other implementation class name can be discovered. Its primary purpose is +to create (as necessary) and return Log instances +in response to calls to the getInstance() method. The default +implementation uses the following rules:

+ + +

See the SimpleLog JavaDocs for detailed +configuration information for this default implementation.

+ + +

Configuring the Underlying Logging System

+ +

The basic principle is that the user is totally responsible for the +configuration of the underlying logging system. +Commons-logging should not change the existing configuration.

+ +

Each individual Log implementation may +support its own configuration properties. These will be documented in the +class descriptions for the corresponding implementation class.

+ +

Finally, some Log implementations (such as the one for Log4J) +require an external configuration file for the entire logging environment. +This file should be prepared in a manner that is specific to the actual logging +technology being used.

+ + +

Using the Logging Package APIs

+ +

Use of the Logging Package APIs, from the perspective of an application +component, consists of the following steps:

+
    +
  1. Acquire a reference to an instance of + org.apache.commons.logging.Log, by calling the + factory method + + LogFactory.getInstance(String name). Your application can contain + references to multiple loggers that are used for different + purposes. A typical scenario for a server application is to have each + major component of the server use its own Log instance.
  2. +
  3. Cause messages to be logged (if the corresponding detail level is enabled) + by calling appropriate methods (trace(), debug(), + info(), warn(), error, and + fatal()).
  4. +
+ +

For convenience, LogFactory also offers a static method +getLog() that combines the typical two-step pattern:

+
+  Log log = LogFactory.getFactory().getInstance(Foo.class);
+
+

into a single method call:

+
+  Log log = LogFactory.getLog(Foo.class);
+
+ +

For example, you might use the following technique to initialize and +use a Log instance in an application component:

+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class MyComponent {
+
+  protected Log log =
+    LogFactory.getLog(MyComponent.class);
+
+  // Called once at startup time
+  public void start() {
+    ...
+    log.info("MyComponent started");
+    ...
+  }
+
+  // Called once at shutdown time
+  public void stop() {
+    ...
+    log.info("MyComponent stopped");
+    ...
+  }
+
+  // Called repeatedly to process a particular argument value
+  // which you want logged if debugging is enabled
+  public void process(String value) {
+    ...
+    // Do the string concatenation only if logging is enabled
+    if (log.isDebugEnabled())
+      log.debug("MyComponent processing " + value);
+    ...
+  }
+
+}
+
+
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-tree.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-tree.html new file mode 100755 index 0000000..459b6bb --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-tree.html @@ -0,0 +1,146 @@ + + + + + +org.apache.commons.logging Class Hierarchy (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package org.apache.commons.logging

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-use.html b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-use.html new file mode 100755 index 0000000..c4da83d --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/org/apache/commons/logging/package-use.html @@ -0,0 +1,203 @@ + + + + + +Uses of Package org.apache.commons.logging (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
org.apache.commons.logging

+
+
+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/overview-frame.html b/Client/bib/commons-logging-1.2-bin/apidocs/overview-frame.html new file mode 100755 index 0000000..60f569a --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/overview-frame.html @@ -0,0 +1,20 @@ + + + + + +Overview List (Apache Commons Logging 1.2 API) + + + +
All Classes
+
+

Packages

+ +
+

 

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/overview-summary.html b/Client/bib/commons-logging-1.2-bin/apidocs/overview-summary.html new file mode 100755 index 0000000..f53b240 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/overview-summary.html @@ -0,0 +1,137 @@ + + + + + +Overview (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Apache Commons Logging 1.2 API

+
+
+ + + + + + + + + + + + + + + + +
Packages 
PackageDescription
org.apache.commons.logging +
Simple wrapper API around multiple logging APIs.
+
org.apache.commons.logging.impl +
Concrete implementations of commons-logging wrapper APIs.
+
+
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/overview-tree.html b/Client/bib/commons-logging-1.2-bin/apidocs/overview-tree.html new file mode 100755 index 0000000..5f379ed --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/overview-tree.html @@ -0,0 +1,168 @@ + + + + + +Class Hierarchy (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/package-list b/Client/bib/commons-logging-1.2-bin/apidocs/package-list new file mode 100755 index 0000000..7d2d655 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/package-list @@ -0,0 +1,2 @@ +org.apache.commons.logging +org.apache.commons.logging.impl diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/resources/background.gif b/Client/bib/commons-logging-1.2-bin/apidocs/resources/background.gif new file mode 100755 index 0000000..f471940 Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin/apidocs/resources/background.gif differ diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/resources/tab.gif b/Client/bib/commons-logging-1.2-bin/apidocs/resources/tab.gif new file mode 100755 index 0000000..1a73a83 Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin/apidocs/resources/tab.gif differ diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/resources/titlebar.gif b/Client/bib/commons-logging-1.2-bin/apidocs/resources/titlebar.gif new file mode 100755 index 0000000..17443b3 Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin/apidocs/resources/titlebar.gif differ diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/resources/titlebar_end.gif b/Client/bib/commons-logging-1.2-bin/apidocs/resources/titlebar_end.gif new file mode 100755 index 0000000..3ad78d4 Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin/apidocs/resources/titlebar_end.gif differ diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/serialized-form.html b/Client/bib/commons-logging-1.2-bin/apidocs/serialized-form.html new file mode 100755 index 0000000..7e0bf1a --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/serialized-form.html @@ -0,0 +1,322 @@ + + + + + +Serialized Form (Apache Commons Logging 1.2 API) + + + + + + +
+ + + + + +
+ + +
+

Serialized Form

+
+
+ +
+ +
+ + + + + +
+ + +

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.

+ + diff --git a/Client/bib/commons-logging-1.2-bin/apidocs/stylesheet.css b/Client/bib/commons-logging-1.2-bin/apidocs/stylesheet.css new file mode 100755 index 0000000..0aeaa97 --- /dev/null +++ b/Client/bib/commons-logging-1.2-bin/apidocs/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/Client/bib/commons-logging-1.2-bin/commons-logging-1.2-javadoc.jar b/Client/bib/commons-logging-1.2-bin/commons-logging-1.2-javadoc.jar new file mode 100755 index 0000000..05eb3ed Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin/commons-logging-1.2-javadoc.jar differ diff --git a/Client/bib/commons-logging-1.2-bin/commons-logging-1.2.jar b/Client/bib/commons-logging-1.2-bin/commons-logging-1.2.jar new file mode 100755 index 0000000..93a3b9f Binary files /dev/null and b/Client/bib/commons-logging-1.2-bin/commons-logging-1.2.jar differ diff --git a/Client/bib/jdatepicker-1.3.4.jar b/Client/bib/jdatepicker-1.3.4.jar new file mode 100755 index 0000000..a716259 Binary files /dev/null and b/Client/bib/jdatepicker-1.3.4.jar differ diff --git a/Client/bib/postgresql-9.4.1212.jre6.jar b/Client/bib/postgresql-9.4.1212.jre6.jar new file mode 100755 index 0000000..153dd8f Binary files /dev/null and b/Client/bib/postgresql-9.4.1212.jre6.jar differ diff --git a/Client/bib/sqlite.jar b/Client/bib/sqlite.jar new file mode 100644 index 0000000..9d4b5bb Binary files /dev/null and b/Client/bib/sqlite.jar differ diff --git a/Client/build.gradle b/Client/build.gradle index efeac5f..a13d29c 100644 --- a/Client/build.gradle +++ b/Client/build.gradle @@ -12,4 +12,6 @@ targetCompatibility = 1.8 dependencies { compile "org.jdatepicker:jdatepicker:1.3.4" + compile "org.json:json:20090211" + compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.16.1' } diff --git a/Client/datenbankentwurf/datenbanken b/Client/datenbankentwurf/datenbanken new file mode 100644 index 0000000..1eb10b9 --- /dev/null +++ b/Client/datenbankentwurf/datenbanken @@ -0,0 +1,72 @@ + Table "public.agent" + Column | Type | Modifiers +-----------+---------------+----------- + agentid | integer | not null + agentname | character(25) | not null +Indexes: + "agent_pkey" PRIMARY KEY, btree (agentid) + + + Table "public.customer" + Column | Type | Modifiers +--------------+---------------+----------- + customerid | integer | not null + customername | character(25) | not null + fonnr | character(12) | + email | character(25) | + hotelname | character(25) | + hotelroom | character(10) | +Indexes: + "customer_pkey" PRIMARY KEY, btree (customerid) + + + Table "public.quota" + Column | Type | Modifiers +------------+---------+----------- + tourid | integer | not null + agentid | integer | not null + countseats | integer | not null +Indexes: + "quota_pkey" PRIMARY KEY, btree (tourid, agentid) + + + Table "public.reservation" + Column | Type | Modifiers +------------+---------+----------- + tourid | integer | not null + customerid | integer | not null + countseats | integer | not null +Indexes: + "reservation_pkey" PRIMARY KEY, btree (tourid, customerid) + + + Table "public.route" + Column | Type | Modifiers +------------+---------------+----------- + routeid | integer | not null + routenname | character(25) | +Indexes: + "route_pkey" PRIMARY KEY, btree (routeid) + + + Table "public.ship" + Column | Type | Modifiers +----------+---------------+----------- + shipid | integer | not null + shipname | character(25) | not null + seats | integer | not null +Indexes: + "ship_pkey" PRIMARY KEY, btree (shipid) + + + Table "public.tour" + Column | Type | Modifiers +----------+---------------+----------- + tourid | integer | not null + tourdate | date | not null + tourname | character(25) | not null + shipid | integer | not null + routeid | integer | not null +Indexes: + "tour_pkey" PRIMARY KEY, btree (tourid) + diff --git a/Client/src/.classpath b/Client/src/.classpath new file mode 100644 index 0000000..3516534 --- /dev/null +++ b/Client/src/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Client/src/main/java/adminMVC/View.properties b/Client/src/.metadata/.lock old mode 100755 new mode 100644 similarity index 100% rename from Client/src/main/java/adminMVC/View.properties rename to Client/src/.metadata/.lock diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 0000000..25cb955 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 0000000..10c75e3 Binary files /dev/null and b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version new file mode 100644 index 0000000..6b2aaa7 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree new file mode 100644 index 0000000..8a1fc9e Binary files /dev/null and b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree differ diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources new file mode 100644 index 0000000..c25bd05 Binary files /dev/null and b/Client/src/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..dffc6b5 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +version=1 diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs new file mode 100644 index 0000000..6e6c73f --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\n\n diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..70e90b5 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,14 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=60,60,60 +eclipse.preferences.version=1 +fontPropagated=true +org.eclipse.jdt.internal.ui.navigator.layout=2 +org.eclipse.jdt.ui.editor.tab.width= +org.eclipse.jdt.ui.formatterprofiles.version=12 +org.eclipse.jdt.ui.javadoclocations.migrated=true +org.eclipse.jface.textfont=1|Monospace|10.0|0|GTK|1|; +proposalOrderMigrated=true +spelling_locale_initialized=true +tabWidthPropagated=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 0000000..1ce7d67 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,5 @@ +TASKS_FILTERS_MIGRATE=true +eclipse.preferences.version=1 +platformState=1481578406865 +quickStart=false +tipsAndTricks=true diff --git a/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs new file mode 100644 index 0000000..08076f2 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +showIntro=false diff --git a/Client/src/.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache b/Client/src/.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/Client/src/.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache differ diff --git a/Client/src/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/Client/src/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/Client/src/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/Client/src/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/Client/src/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 0000000..0ea340d Binary files /dev/null and b/Client/src/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/Client/src/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/Client/src/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 0000000..a4ee3cb --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/Client/src/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/Client/src/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 0000000..9e390f5 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/Client/src/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/Client/src/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml new file mode 100644 index 0000000..95ca575 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 0000000..5b583c4 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml new file mode 100644 index 0000000..1fc0352 --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 0000000..9ad47ff --- /dev/null +++ b/Client/src/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Client/src/.metadata/version.ini b/Client/src/.metadata/version.ini new file mode 100644 index 0000000..c51ff74 --- /dev/null +++ b/Client/src/.metadata/version.ini @@ -0,0 +1 @@ +org.eclipse.core.runtime=1 \ No newline at end of file diff --git a/Client/src/.project b/Client/src/.project new file mode 100644 index 0000000..0f6f6a7 --- /dev/null +++ b/Client/src/.project @@ -0,0 +1,17 @@ + + + src + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Client/src/main/java/Schema-Datenbanken.txt b/Client/src/Schema-Datenbanken.txt similarity index 100% rename from Client/src/main/java/Schema-Datenbanken.txt rename to Client/src/Schema-Datenbanken.txt diff --git a/Client/src/bin/.classpath b/Client/src/bin/.classpath new file mode 100644 index 0000000..233be1d --- /dev/null +++ b/Client/src/bin/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Client/src/bin/.project b/Client/src/bin/.project new file mode 100644 index 0000000..f9e9289 --- /dev/null +++ b/Client/src/bin/.project @@ -0,0 +1,17 @@ + + + main + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Client/src/bin/buchungenMVC/View.properties b/Client/src/bin/buchungenMVC/View.properties new file mode 100755 index 0000000..e69de29 diff --git a/Client/src/main/java/.classpath b/Client/src/main/java/.classpath new file mode 100644 index 0000000..233be1d --- /dev/null +++ b/Client/src/main/java/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Client/src/main/java/.project b/Client/src/main/java/.project new file mode 100644 index 0000000..f9e9289 --- /dev/null +++ b/Client/src/main/java/.project @@ -0,0 +1,17 @@ + + + main + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Client/src/main/java/adminMVC/AdminController.java b/Client/src/main/java/adminMVC/AdminController.java deleted file mode 100755 index 4697f4f..0000000 --- a/Client/src/main/java/adminMVC/AdminController.java +++ /dev/null @@ -1,229 +0,0 @@ -package adminMVC; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.lang.reflect.Array; -import java.sql.Timestamp; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.Observable; -import java.util.Observer; -import java.util.Spliterator; - -import javax.swing.ComboBoxModel; -import javax.swing.DefaultComboBoxModel; -import javax.swing.DefaultListModel; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; -import javax.swing.table.DefaultTableModel; -import javax.swing.table.TableModel; - -import datenbank.Select; -import gui.GlobaleVariablen; -import gui.UFrame; -import valueObjecte.Routen; - -public class AdminController implements Observer, ActionListener, ListSelectionListener { - - private AdminModel adminModel; - private AdminView adminView; - - public AdminController(AdminModel adminModel, AdminView adminView) { - this.adminModel = adminModel; - this.adminView = adminView; - adminModel.addObserver(this); - - // ActionListener - adminView.getButtonAbbrechenPlaetze().addActionListener(this); - adminView.getButtonAbbrechenTour().addActionListener(this); - adminView.getButtonErstellenTour().addActionListener(this); - adminView.getButtonZuweisenPlaetze().addActionListener(this); - - adminView.getTextFieldSchiffAenern().addActionListener(this); - adminView.getTextFieldRouteAendern().addActionListener(this); - adminView.getTextFieldDatumAendern().addActionListener(this); - adminView.getTextFieldZeitAendern().addActionListener(this); - - adminView.getJComboBoxEingabeUhrzeit().addActionListener(this); - adminView.getjComboBoxMitarbeiter().addActionListener(this); - - adminView.getDatePicker().addActionListener(this); - - // SelectionListener - adminView.getListRoute().addListSelectionListener(this); - adminView.getListSchiffe().addListSelectionListener(this); - adminView.getListMitarbeiterBestaetigt().addListSelectionListener(this); - adminView.getListMitarbeiterNichtBestaetigt().addListSelectionListener(this); - - // Routen Informationen im Model speichern - String[] routenName = new Select().selectRoutenNameFromRoute(); - adminModel.getRoutenVO().setRouten_name(routenName); - adminModel.getRoutenVO().setRouten_id(new Select().selectRoutenIdFromRoute()); - adminModel.getRoutenVO().setRouten_dauer(new Select().selectRoutenDauerFromRoute()); - - // Schiff Informationen im Model speichern - String[] schiffName = new Select().selectSchiffNameFromSchiff(); - adminModel.getSchiffVO().setSchiff_name(schiffName); - - // Routen/Schiff Namen auf der Oberfl�che ausgaben - adminView.getListRoute().setListData(routenName); - adminView.getListSchiffe().setListData(schiffName); - - // Tabelle Touren �bersicht - String[] spaltenNamen = {"Routen", "Schiff", "Datum", "Startzeit", "freie Plätze"}; - adminView.getTableVorhandeneTouren().setData(spaltenNamen, new Select().selectAllesFromTour()); - - // Voreinstellungen - adminView.getButtonErstellenTour().setEnabled(false); - adminView.getButtonZuweisenPlaetze().setEnabled(false); - - // Inhalt der JComboBoxen - String[] jComboBoxUhrzeit = {"Uhrzeit", "10:30","12:30", "15:30", "16:00"}; - ComboBoxModel modelJComboBoxUhrzeit = new DefaultComboBoxModel(jComboBoxUhrzeit); - adminView.getJComboBoxEingabeUhrzeit().setModel(modelJComboBoxUhrzeit); - - // Sichtbarkeit - adminView.setVisible(true); - - } - - public void actionPerformed(ActionEvent e) { - switch (e.getActionCommand()) { - case GlobaleVariablen.EVENT_ENTERUHRZEIT: - // Wenn ein Uhrzeit Selectiert wurde, muss abgefragt werden, - // ob alle Bedingungen erf�llt sind (Route, Schiff, Datum, Zeit) - handleEventAnklickbarButtonErstellenTour(); - break; - case GlobaleVariablen.EVENT_BUTTONERSTELLENTOUR: - handleEventButtonErstellenTour(); - break; - case GlobaleVariablen.EVENT_BUTTONABBRECHENTOUR: - handleEventButtonErstellenTourAbbrechen(); - } - - - if(e.getSource() == adminView.getDatePanel()) { - handleEventAnklickbarButtonErstellenTour(); - } else if(e.getSource() == adminView.getTablePlaetzeProMitarbeiter().getSelectionModel() - && adminView.getTablePlaetzeProMitarbeiter().getColumnSelectionAllowed()) { - handleSelectionEventTablePlaetzeProMitarbeiter(); - } - } - - @Override - public void update(Observable arg0, Object arg1) { - if (arg0 == this.adminModel) { - - } - - } - - @Override - public void valueChanged(ListSelectionEvent e) { - if(e.getSource() == adminView.getTablePlaetzeProMitarbeiter().getSelectionModel() - && adminView.getTablePlaetzeProMitarbeiter().getColumnSelectionAllowed()) { - handleSelectionEventTablePlaetzeProMitarbeiter(); - } else if(e.getSource() == adminView.getTableVorhandeneTouren().getSelectionModel() - && adminView.getTableVorhandeneTouren().getColumnSelectionAllowed()) { - handleSelectionEventTableVorhandeneTouren(); - } else if(e.getSource() == adminView.getListRoute()) { - // Wenn ein Uhrzeit Selectiert wurde, muss abgefragt werden, - // ob alle Bedingungen erf�llt sind (Route, Schiff, Datum, Zeit) - handleEventAnklickbarButtonErstellenTour(); - } else if(e.getSource() == adminView.getListSchiffe()) { - // Wenn ein Uhrzeit Selectiert wurde, muss abgefragt werden, - // ob alle Bedingungen erf�llt sind (Route, Schiff, Datum, Zeit) - handleEventAnklickbarButtonErstellenTour(); - } - } - - private void handleSelectionEventTableVorhandeneTouren() { - // TODO - } - - private void handleSelectionEventTablePlaetzeProMitarbeiter() { - // TODO - } - /** - * Der Button darf nur gedr�ckt werden, wenn eine Zeile - * in Schiffe und Route selektiert ist sowie ein Datum ausgew�hlt und eine Zeitausgesucht ist. - */ - private void handleEventAnklickbarButtonErstellenTour() { - if(!adminView.getListRoute().isSelectionEmpty() - && !adminView.getListSchiffe().isSelectionEmpty() - && adminView.getDatePicker().getModel().getValue() != null - && !adminView.getJComboBoxEingabeUhrzeit().getSelectedItem().equals("Uhrzeit")) { - // Button anklickbar - adminView.getButtonErstellenTour().setEnabled(true); - } - } - /** - * Event wenn der Buttongedr�ckt wird. - */ - private void handleEventButtonErstellenTour() { - // Variablen - ArrayList schiffeInTour = new Select().selectSchiffIdFromTour(); - int schiff_ID = new Select().selectSchiffIDFromSchiff(adminView.getListSchiffe().getSelectedValue()); - Date tour_datum = (Date) adminView.getDatePicker().getModel().getValue(); -// String tour_startzeit = (String) adminView.getJComboBoxEingabeUhrzeit().getSelectedItem(); // TODO Datentyp - Timestamp route_dauer = new Select().selectRoutenDauer(); // TODO Datentyp - - // Date umwandeln in String - SimpleDateFormat sdfDatum = new SimpleDateFormat("yyyy-MM-d"); - SimpleDateFormat sdfZeit = new SimpleDateFormat("H:m"); - - // Ist das Schiff in der Liste Tour.Schiffe enthalten? - if(schiffeInTour.contains(schiff_ID)) { - // Ist das Datum ebenfalls schon vorhanden? - ArrayList datumInTour = new Select().selectTourDatumFromTour(schiff_ID); - if(datumInTour.contains(sdfDatum.format(tour_datum))) { - // Fehlermeldung - new UFrame().fehlermeldung(); - - } else { - // Insert in TOUR TODO - } - } else { - // Insert in TOUR TODO - } - } - - - /** - * Deselektiert Route und Schiffe - * Datum = Datum - * Zeit = Zeit - */ - private void handleEventButtonErstellenTourAbbrechen() { - new UFrame().fehlermeldung(); - - - new Select().selectRouteStartzeit(0, "2016-12-12"); - - // Datum = null - adminView.getDatePicker().getModel().setValue(null); - - // Zeit gleich Zeit: - adminView.getJComboBoxEingabeUhrzeit().setSelectedIndex(0); - - // Deseletieren von Route und Schiffe - adminView.getListRoute().clearSelection(); - adminView.getListSchiffe().clearSelection(); - - // Button nicht mehr anklickbar - adminView.getButtonErstellenTour().setEnabled(false); - - handleSelectionEventTablePlaetzeProMitarbeiter(); - } - - - - - - - - - -} diff --git a/Client/src/main/java/adminMVC/AdminMain.java b/Client/src/main/java/adminMVC/AdminMain.java deleted file mode 100755 index da1b184..0000000 --- a/Client/src/main/java/adminMVC/AdminMain.java +++ /dev/null @@ -1,13 +0,0 @@ -package adminMVC; - -public class AdminMain { - public static void main(String[] args) { - AdminModel modelGUI = new AdminModel(); - AdminView viewGUI = new AdminView(); - - - @SuppressWarnings("unused") - AdminController controllerGUI = new AdminController(modelGUI, viewGUI); - - } -} diff --git a/Client/src/main/java/adminMVC/AdminModel.java b/Client/src/main/java/adminMVC/AdminModel.java deleted file mode 100755 index fa07ad9..0000000 --- a/Client/src/main/java/adminMVC/AdminModel.java +++ /dev/null @@ -1,33 +0,0 @@ -package adminMVC; - -import java.util.Observable; -import valueObjecte.Routen; -import valueObjecte.Schiff; -import valueObjecte.Tour; - -public class AdminModel extends Observable{ - - private Routen routenVO = new Routen(); - private Tour tourVO = new Tour(); - private Schiff schiffVO = new Schiff(); - public Routen getRoutenVO() { - return routenVO; - } - public void setRoutenVO(Routen routenVO) { - this.routenVO = routenVO; - } - public Tour getTourVO() { - return tourVO; - } - public void setTourVO(Tour tourVO) { - this.tourVO = tourVO; - } - public Schiff getSchiffVO() { - return schiffVO; - } - public void setSchiffVO(Schiff schiffVO) { - this.schiffVO = schiffVO; - } - - -} \ No newline at end of file diff --git a/Client/src/main/java/adminMVC/AdminView.java b/Client/src/main/java/adminMVC/AdminView.java deleted file mode 100755 index bc7a055..0000000 --- a/Client/src/main/java/adminMVC/AdminView.java +++ /dev/null @@ -1,418 +0,0 @@ -package adminMVC; - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Font; -import java.util.Properties; - -import javax.swing.JComboBox; -import javax.swing.JFrame; -import javax.swing.JList; -import javax.swing.JScrollPane; -import javax.swing.JTable; -import javax.swing.ListSelectionModel; - -import org.jdatepicker.impl.DateComponentFormatter; -import org.jdatepicker.impl.JDatePanelImpl; -import org.jdatepicker.impl.JDatePickerImpl; -import org.jdatepicker.impl.UtilDateModel; -import gui.UPanel; -import gui.UTable; -import gui.UTextField; -import gui.GlobaleVariablen; -import gui.UButton; -import gui.UConstraints; -import gui.ULabel; - -public class AdminView extends JFrame { - private static final long serialVersionUID = 6038622921625628983L; - // Textfelder - private UTextField textFieldZeitAendern; - private UTextField textFieldDatumAendern; - private UTextField textFieldSchiffAenern; - private UTextField textFieldRouteAendern; - - // JComboBox - private JComboBox jComboBoxMitarbeiter; - private JComboBox jComboBoxEingabeUhrzeit; - - // Button - private UButton buttonErstellenTour; - private UButton buttonAbbrechenTour; - private UButton buttonZuweisenPlaetze; - private UButton buttonAbbrechenPlaetze; - - // Listen - private JList listRoute; - private JList listSchiffe; - private JList listMitarbeiterBestaetigt; - private JList listMitarbeiterNichtBestaetigt; - - private JScrollPane scrollListRoute; - private JScrollPane scrollListSchiffe; - private JScrollPane scrollTableVorhandeneTouren; - private JScrollPane scrollTablePlaetzeProMitarbeiter; - private JScrollPane scrollListMitarbeiterBestaetigt; - private JScrollPane scrollListMitarbeiterNichtBestaetigt; - private JScrollPane scrollRootPanel; - - // Panel - private UPanel rootPanel; - private UPanel panelUeberschrift; - private UPanel panelButtonErstellenTour; - private UPanel panelAuswahl; - private UPanel panelDatumZeit; - private UPanel panelvorhandeneTouren; - private UPanel panelButtonZuweisenPlaetze; - private UPanel panelMitarbeiterReport; - - // Datumsfeld - private JDatePickerImpl datePicker; - private JDatePanelImpl datePanel; - - // Label - private ULabel labelUeberschrift; - private ULabel labelRoute; - private ULabel labelSchiffe; - private ULabel labelDatum; - private ULabel labelZeit; - private ULabel labelZeitAendern; - private ULabel labelDatumAendern; - private ULabel labelSchiffAenern; - private ULabel labelRouteAendern; - private ULabel labelMitarbeiter; - private ULabel labelTabelleMitarbeiterInfo; - private ULabel labelListMitarbeiterBestaetigt; - private ULabel labelListMitarbeiterNichtBestaetigt; - - //Tabelle - private UTable tableVorhandeneTouren; - private UTable tablePlaetzeProMitarbeiter; - - - - public AdminView() { - // Definition des Frames - this.setTitle("PricatBayTours-Buchungen"); - this.setExtendedState(MAXIMIZED_BOTH); - this.setDefaultCloseOperation(EXIT_ON_CLOSE); - - // Root Panel, welches am Ende �bergeben wird. Alles auf der Oberfl�che - // muss am Ende dem rootPanel �bergeben werden. - { - rootPanel = new UPanel(); - rootPanel.setTitledBorder("Administrator"); - - scrollRootPanel= new JScrollPane(); - scrollRootPanel.setPreferredSize(new Dimension(200, 200)); - scrollRootPanel.setViewportView(rootPanel); - - - this.add(scrollRootPanel); - } - - // Panel f�r die �berschrift - { - panelUeberschrift = new UPanel(); - rootPanel.add(panelUeberschrift, new UConstraints(0, 0)); - - labelUeberschrift = new ULabel("
PirateBayTours
Admin
"); - labelUeberschrift.setForeground(Color.blue); - labelUeberschrift.setFont(new Font("Arial", Font.PLAIN, 30)); - panelUeberschrift.add(labelUeberschrift, new UConstraints(0, 0)); - } - - // Panel f�r die Erstellung einer Tour - { - panelAuswahl = new UPanel(); - panelAuswahl.setTitledBorder("Erstellung einer neuen Tour"); - rootPanel.add(panelAuswahl, new UConstraints(0, 1)); - - labelRoute = new ULabel("Routen"); - panelAuswahl.add(labelRoute, new UConstraints(0, 0)); - - labelSchiffe = new ULabel("Schiffe"); - panelAuswahl.add(labelSchiffe, new UConstraints(1, 0)); - - listRoute = new JList(); - listRoute.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - scrollListRoute = new JScrollPane(); - scrollListRoute.setPreferredSize(new Dimension(200, 200)); - scrollListRoute.setViewportView(listRoute); - panelAuswahl.add(scrollListRoute, new UConstraints(0, 1)); - - listSchiffe = new JList(); - listSchiffe.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - scrollListSchiffe = new JScrollPane(); - scrollListSchiffe.setPreferredSize(new Dimension(200, 200)); - scrollListSchiffe.setViewportView(listSchiffe); - panelAuswahl.add(scrollListSchiffe, new UConstraints(1, 1)); - - // Panel f�r das Datum und die Zeit - { - panelDatumZeit = new UPanel(); - UConstraints gbc = new UConstraints(2, 0, 2, 0); - gbc.anchor = UConstraints.PAGE_START; - panelAuswahl.add(panelDatumZeit, gbc); - - labelDatum = new ULabel("Datum"); - panelDatumZeit.add(labelDatum, new UConstraints(0, 0)); - - labelZeit = new ULabel("Zeit"); - panelDatumZeit.add(labelZeit, new UConstraints(0, 2)); - - // Datums als Textfeld - UtilDateModel model = new UtilDateModel(); - Properties p = new Properties(); - p.put("text.today", "Today"); - p.put("text.month", "Month"); - p.put("text.year", "Year"); - datePanel = new JDatePanelImpl(model, p); - datePicker = new JDatePickerImpl(datePanel, new DateComponentFormatter()); - panelDatumZeit.add(datePicker, new UConstraints(0, 1)); - - jComboBoxEingabeUhrzeit = new JComboBox(); - jComboBoxEingabeUhrzeit.setActionCommand(GlobaleVariablen.EVENT_ENTERUHRZEIT); - panelDatumZeit.add(jComboBoxEingabeUhrzeit, new UConstraints(0, 3)); - } - - // Panel f�r die Button zur Erstellung einer Tour - { - panelButtonErstellenTour = new UPanel(); - UConstraints uc = new UConstraints(2, 1, 0, 2); - uc.anchor = UConstraints.PAGE_END; - panelAuswahl.add(panelButtonErstellenTour, uc); - - buttonErstellenTour = new UButton(); - buttonErstellenTour.setText("Erstellen"); - buttonErstellenTour.setActionCommand(GlobaleVariablen.EVENT_BUTTONERSTELLENTOUR); - buttonErstellenTour.setBackground(Color.GREEN); - panelButtonErstellenTour.add(buttonErstellenTour, new UConstraints(0, 0)); - - buttonAbbrechenTour = new UButton(); - buttonAbbrechenTour.setText("Abbrechen"); - buttonAbbrechenTour.setActionCommand(GlobaleVariablen.EVENT_BUTTONABBRECHENTOUR); - buttonAbbrechenTour.setBackground(Color.RED); - panelButtonErstellenTour.add(buttonAbbrechenTour, new UConstraints(1, 0)); - } - } - - // Panel f�r die Auflistung der Touren - { - - panelvorhandeneTouren = new UPanel(); - panelvorhandeneTouren.setTitledBorder("Zum Verkauf stehende Touren"); - rootPanel.add(panelvorhandeneTouren, new UConstraints(0, 3)); - - tableVorhandeneTouren = new UTable(); - - scrollTableVorhandeneTouren = new JScrollPane(); - scrollTableVorhandeneTouren.setPreferredSize(new Dimension(600, 200)); - scrollTableVorhandeneTouren.setViewportView(tableVorhandeneTouren); - panelvorhandeneTouren.add(scrollTableVorhandeneTouren, new UConstraints(0, 0, 2, 0)); - - labelSchiffAenern = new ULabel("Schiff"); - panelvorhandeneTouren.add(labelSchiffAenern, new UConstraints(0, 2)); - - labelRouteAendern = new ULabel("Route"); - panelvorhandeneTouren.add(labelRouteAendern, new UConstraints(1, 2)); - - labelDatumAendern = new ULabel("Datum"); - panelvorhandeneTouren.add(labelDatumAendern, new UConstraints(2, 2)); - - labelZeitAendern = new ULabel("Startzeit"); - panelvorhandeneTouren.add(labelZeitAendern, new UConstraints(3, 2)); - - labelMitarbeiter = new ULabel("Mitarbeiter"); - panelvorhandeneTouren.add(labelMitarbeiter, new UConstraints(4, 2)); - - textFieldSchiffAenern = new UTextField(20); - textFieldSchiffAenern.setEditable(false); - panelvorhandeneTouren.add(textFieldSchiffAenern, new UConstraints(0, 3)); - - textFieldRouteAendern = new UTextField(20); - textFieldRouteAendern.setEditable(false); - panelvorhandeneTouren.add(textFieldRouteAendern, new UConstraints(1, 3)); - - textFieldDatumAendern = new UTextField(10); - textFieldDatumAendern.setEditable(false); - panelvorhandeneTouren.add(textFieldDatumAendern, new UConstraints(2, 3)); - - textFieldZeitAendern = new UTextField(5); - textFieldZeitAendern.setEditable(false); - panelvorhandeneTouren.add(textFieldZeitAendern, new UConstraints(3, 3)); - - jComboBoxMitarbeiter = new JComboBox(); - panelvorhandeneTouren.add(jComboBoxMitarbeiter, new UConstraints(4, 3)); - - // Panel f�r die Button zur Erstellung einer Tour - { - panelButtonZuweisenPlaetze = new UPanel(); - UConstraints uc = new UConstraints(3, 4, 0, 2); - panelvorhandeneTouren.add(panelButtonZuweisenPlaetze, uc); - - buttonZuweisenPlaetze = new UButton(); - buttonZuweisenPlaetze.setText("Zuweisen"); -// buttonZuweisenPlaetze.setActionCommand(GlobaleVariablen.EVENT_BUTTONERSTELLEN); TODO Fenster wirklich? - buttonZuweisenPlaetze.setBackground(Color.GREEN); - panelButtonZuweisenPlaetze.add(buttonZuweisenPlaetze, new UConstraints(0, 0)); - - buttonAbbrechenPlaetze = new UButton(); - buttonAbbrechenPlaetze.setText("Abbrechen"); -// buttonAbbrechenPlaetze.setActionCommand(GlobaleVariablen.EVENT_BUTTONBUCHUNGABBRECHEN); TODO - buttonAbbrechenPlaetze.setBackground(Color.RED); - panelButtonZuweisenPlaetze.add(buttonAbbrechenPlaetze, new UConstraints(1, 0)); - } - } - - - panelMitarbeiterReport = new UPanel(); - panelMitarbeiterReport.setTitledBorder("Mitarbeiter Report"); - rootPanel.add(panelMitarbeiterReport, new UConstraints(0, 4)); - - labelTabelleMitarbeiterInfo = new ULabel("Mitarbeiter Informationen"); - panelMitarbeiterReport.add(labelTabelleMitarbeiterInfo, new UConstraints(0, 0)); - - labelListMitarbeiterBestaetigt = new ULabel("R�ckmeldung"); - panelMitarbeiterReport.add(labelListMitarbeiterBestaetigt, new UConstraints(1, 0)); - - labelListMitarbeiterNichtBestaetigt = new ULabel("Keine R�ckmeldung"); - panelMitarbeiterReport.add(labelListMitarbeiterNichtBestaetigt, new UConstraints(2, 0)); - - tablePlaetzeProMitarbeiter = new UTable(); - - scrollTablePlaetzeProMitarbeiter = new JScrollPane(); - scrollTablePlaetzeProMitarbeiter.setPreferredSize(new Dimension(400, 200)); - scrollTablePlaetzeProMitarbeiter.setViewportView(tablePlaetzeProMitarbeiter); - panelMitarbeiterReport.add(scrollTablePlaetzeProMitarbeiter, new UConstraints(0, 1, UConstraints.NONE)); - - listMitarbeiterBestaetigt = new JList(); - listMitarbeiterBestaetigt.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - scrollListMitarbeiterBestaetigt= new JScrollPane(); - scrollListMitarbeiterBestaetigt.setPreferredSize(new Dimension(200, 200)); - scrollListMitarbeiterBestaetigt.setViewportView(listMitarbeiterBestaetigt); - panelMitarbeiterReport.add(scrollListMitarbeiterBestaetigt, new UConstraints(1, 1)); - - - listMitarbeiterNichtBestaetigt = new JList(); - listMitarbeiterNichtBestaetigt.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - scrollListMitarbeiterNichtBestaetigt= new JScrollPane(); - scrollListMitarbeiterNichtBestaetigt.setPreferredSize(new Dimension(200, 200)); - scrollListMitarbeiterNichtBestaetigt.setViewportView(listMitarbeiterNichtBestaetigt); - panelMitarbeiterReport.add(scrollListMitarbeiterNichtBestaetigt, new UConstraints(2, 1)); - - - // Packen - - pack(); - } - - - - public JComboBox getJComboBoxEingabeUhrzeit() { - return jComboBoxEingabeUhrzeit; - } - - - - public UTextField getTextFieldZeitAendern() { - return textFieldZeitAendern; - } - - - - public UTextField getTextFieldDatumAendern() { - return textFieldDatumAendern; - } - - - - public UTextField getTextFieldSchiffAenern() { - return textFieldSchiffAenern; - } - - - - public UTextField getTextFieldRouteAendern() { - return textFieldRouteAendern; - } - - - - public JComboBox getjComboBoxMitarbeiter() { - return jComboBoxMitarbeiter; - } - - - - public UButton getButtonErstellenTour() { - return buttonErstellenTour; - } - - - - public UButton getButtonAbbrechenTour() { - return buttonAbbrechenTour; - } - - - - public UButton getButtonZuweisenPlaetze() { - return buttonZuweisenPlaetze; - } - - - - public UButton getButtonAbbrechenPlaetze() { - return buttonAbbrechenPlaetze; - } - - - - public JList getListRoute() { - return listRoute; - } - - - - public JList getListSchiffe() { - return listSchiffe; - } - - - - public JList getListMitarbeiterBestaetigt() { - return listMitarbeiterBestaetigt; - } - - - - public JList getListMitarbeiterNichtBestaetigt() { - return listMitarbeiterNichtBestaetigt; - } - - - - public UTable getTableVorhandeneTouren() { - return tableVorhandeneTouren; - } - - - - public UTable getTablePlaetzeProMitarbeiter() { - return tablePlaetzeProMitarbeiter; - } - - public JDatePickerImpl getDatePicker() { - return datePicker; - } - - public JDatePanelImpl getDatePanel() { - return datePanel; - } - -} \ No newline at end of file diff --git a/Client/src/main/java/api_client/agent.java b/Client/src/main/java/api_client/agent.java new file mode 100644 index 0000000..b6de104 --- /dev/null +++ b/Client/src/main/java/api_client/agent.java @@ -0,0 +1,17 @@ +package api_client; + +import java.util.ArrayList; +import java.util.List; + +public class agent{ + public int id; + public String name; + + + public List quotas = new ArrayList(); + + public agent(){} + public void addQuota(Integer x) { + this.quotas.add(x); + }; +} \ No newline at end of file diff --git a/Client/src/main/java/api_client/api_client.java b/Client/src/main/java/api_client/api_client.java new file mode 100644 index 0000000..b6f4b9f --- /dev/null +++ b/Client/src/main/java/api_client/api_client.java @@ -0,0 +1,318 @@ +package api_client; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; + +import org.json.*; + +import java.net.URL; +import java.util.ArrayList; +import java.util.List; + + +import api_client.*; + + +public class api_client{ + + private final String USER_AGENT = "Mozilla/5.0"; + private final String API_ROOT = "http://robin-app1.fh-muenster.de/"; + + + public api_client(){ + + + } + public List get_ships(){ + + List tmp_ship_list = new ArrayList(); + try{ + String response = request("ships",""); + JSONArray arr = new JSONArray(response); + for (int i = 0; i < arr.length(); i++) + { + ship tmp_ship = new ship(); + + tmp_ship.id = arr.getJSONObject(i).getInt("id"); + tmp_ship.name = arr.getJSONObject(i).getString("name"); + tmp_ship.seats = arr.getJSONObject(i).getInt("seats"); + + JSONArray tmp_tours = arr.getJSONObject(i).getJSONArray("tours"); + + if (tmp_tours.length()>0) { + for (int j = 0; j get_tours(){ + + List tmp_tour_list = new ArrayList(); + try{ + String response = request("tours",""); + JSONArray arr = new JSONArray(response); + for (int i = 0; i < arr.length(); i++) + { + tour tmp_tour = new tour(); + + tmp_tour.id = arr.getJSONObject(i).getInt("id"); + tmp_tour.name = arr.getJSONObject(i).getString("name"); + tmp_tour.date = arr.getJSONObject(i).getString("date"); + tmp_tour.time = arr.getJSONObject(i).getString("time"); + tmp_tour.ship_id = arr.getJSONObject(i).getInt("ship"); + + + JSONArray tmp_reservations = arr.getJSONObject(i).getJSONArray("reservations"); + + if (tmp_reservations.length()>0) { + for (int j = 0; j 0) { + for (int j = 0; j get_quotas(){ + + List tmp_quota_list = new ArrayList(); + try{ + String response = request("quotas",""); + JSONArray arr = new JSONArray(response); + for (int i = 0; i < arr.length(); i++) + { + quota tmp_quota = new quota(); + + tmp_quota.count = arr.getJSONObject(i).getInt("count"); + tmp_quota.tour = arr.getJSONObject(i).getInt("tour"); + tmp_quota.agent = arr.getJSONObject(i).getInt("agent"); + + + tmp_quota_list.add(tmp_quota); + + } + return tmp_quota_list; + } catch(Exception e){ + return null; + } + } + + + public List get_agents(){ + + List tmp_agent_list = new ArrayList(); + try{ + String response = request("agents",""); + JSONArray arr = new JSONArray(response); + for (int i = 0; i < arr.length(); i++) + { + agent tmp_agent = new agent(); + + tmp_agent.id = arr.getJSONObject(i).getInt("id"); + tmp_agent.name = arr.getJSONObject(i).getString("name"); + + + JSONArray tmp_quotas = arr.getJSONObject(i).getJSONArray("quotas"); + + if (tmp_quotas.length()>0) { + for (int j = 0; j get_customers(){ + + List tmp_customer_list = new ArrayList(); + try{ + String response = request("customers",""); + JSONArray arr = new JSONArray(response); + for (int i = 0; i < arr.length(); i++) + { + customer tmp_customer = new customer(); + + tmp_customer.id = arr.getJSONObject(i).getInt("id"); + tmp_customer.name = arr.getJSONObject(i).getString("name"); + + + JSONArray tmp_reservations = arr.getJSONObject(i).getJSONArray("reservations"); + + if (tmp_reservations.length()>0) { + for (int j = 0; j get_reservations(){ + + List tmp_reservation_list = new ArrayList(); + try{ + String response = request("reservations",""); + JSONArray arr = new JSONArray(response); + for (int i = 0; i < arr.length(); i++) + { + reservation tmp_reservation = new reservation(); + + tmp_reservation.id = arr.getJSONObject(i).getInt("id"); + tmp_reservation.count = arr.getJSONObject(i).getInt("count"); + tmp_reservation.tour = arr.getJSONObject(i).getInt("tour"); + tmp_reservation.customer = arr.getJSONObject(i).getInt("customer"); + + tmp_reservation_list.add(tmp_reservation); + + } + return tmp_reservation_list; + } catch(Exception e){ + return null; + } + } + + public void upload_reservation(reservation reserv){ + try{ + String enc_reserv = "count=" + reserv.count + "&tour=" + reserv.tour + "&customer=" + reserv.customer; + String resp= write_request("reservations", enc_reserv); + if( resp == null) throw new Exception("Could not write reservation"); + return; + } catch(Exception e){ + System.out.println(e); + return; + } + } + + private String request(String api_endpoint, String api_filters) throws Exception { + + String url = API_ROOT + api_endpoint + "?format=json&" + api_filters; + + URL obj = new URL(url); + HttpURLConnection con = (HttpURLConnection) obj.openConnection(); + + // optional default is GET + con.setRequestMethod("GET"); + con.setRequestProperty("Content-Type", "application/json; charset=utf-8"); + con.setRequestProperty("User-Agent", USER_AGENT); + + int responseCode = con.getResponseCode(); + System.out.println("Sending 'GET' request to URL : " + url); + System.out.println("Response Code : " + responseCode); + + BufferedReader in = new BufferedReader( + new InputStreamReader(con.getInputStream())); + String inputLine; + StringBuffer response = new StringBuffer(); + + while ((inputLine = in.readLine()) != null) { + response.append(inputLine); + } + in.close(); + + //print result + return response.toString(); + } + + private String write_request(String api_endpoint, String data) throws Exception { + + String url = API_ROOT + api_endpoint + "/?format=json"; //for some reason, the / is critical + + URL obj = new URL(url); + HttpURLConnection con = (HttpURLConnection) obj.openConnection(); + + con.setRequestMethod("POST"); + con.setRequestProperty("Content-Type","application/x-www-form-urlencoded; charset=utf-8"); + con.setRequestProperty("User-Agent", USER_AGENT); + con.setDoOutput(true); + DataOutputStream wr = new DataOutputStream(con.getOutputStream()); + wr.writeBytes(data); + wr.flush(); + wr.close(); + + + int responseCode = con.getResponseCode(); + if(responseCode != 201) + return null; + BufferedReader br = new BufferedReader(new InputStreamReader((con.getInputStream()))); + StringBuilder sb = new StringBuilder(); + String output; + while ((output = br.readLine()) != null) { + sb.append(output); + } + System.out.println("Sending 'POST' request to URL : " + url); + System.out.println("Response Code : " + responseCode); + + return sb.toString(); + } +} + diff --git a/Client/src/main/java/api_client/customer.java b/Client/src/main/java/api_client/customer.java new file mode 100644 index 0000000..831bb04 --- /dev/null +++ b/Client/src/main/java/api_client/customer.java @@ -0,0 +1,17 @@ +package api_client; + +import java.util.ArrayList; +import java.util.List; + +public class customer{ + public int id; + public String name; + + + public List reservations = new ArrayList(); + + public customer(){} + public void addReservation(Integer x) { + this.reservations.add(x); + }; +} \ No newline at end of file diff --git a/Client/src/main/java/api_client/quota.java b/Client/src/main/java/api_client/quota.java new file mode 100644 index 0000000..0534992 --- /dev/null +++ b/Client/src/main/java/api_client/quota.java @@ -0,0 +1,12 @@ +package api_client; + +import java.util.ArrayList; +import java.util.List; + +public class quota{ + public int count; + public int tour; + public int agent; + + public quota(){} +} \ No newline at end of file diff --git a/Client/src/main/java/api_client/reservation.java b/Client/src/main/java/api_client/reservation.java new file mode 100644 index 0000000..fcae86b --- /dev/null +++ b/Client/src/main/java/api_client/reservation.java @@ -0,0 +1,13 @@ +package api_client; + +import java.util.ArrayList; +import java.util.List; + +public class reservation{ + public int id; + public int count; + public int tour; + public int customer; + + public reservation(){} +} \ No newline at end of file diff --git a/Client/src/main/java/api_client/ship.java b/Client/src/main/java/api_client/ship.java new file mode 100644 index 0000000..f01a9ee --- /dev/null +++ b/Client/src/main/java/api_client/ship.java @@ -0,0 +1,18 @@ +package api_client; + +import java.util.ArrayList; +import java.util.List; + +public class ship{ + public int id; + public String name; + public int seats; + + public List tours = new ArrayList(); + + public ship(){} + + public void addTour(Integer x) { + this.tours.add(x); + }; +} \ No newline at end of file diff --git a/Client/src/main/java/api_client/tour.java b/Client/src/main/java/api_client/tour.java new file mode 100644 index 0000000..c99fd3e --- /dev/null +++ b/Client/src/main/java/api_client/tour.java @@ -0,0 +1,27 @@ +package api_client; + +import java.util.ArrayList; +import java.util.List; + +public class tour{ + public int id; + public String name; + public String date; + public String time; + public int ship_id; + + public List reservations = new ArrayList(); + public List quotas = new ArrayList(); + + + public tour(){} + + public void addReservation(Integer x) { + this.reservations.add(x); + }; + + public void addQuota(Integer x) { + this.quotas.add(x); + }; + +} \ No newline at end of file diff --git a/Client/src/main/java/buchungenMVC/BuchungenController.java b/Client/src/main/java/buchungenMVC/BuchungenController.java index e14702b..72ef216 100755 --- a/Client/src/main/java/buchungenMVC/BuchungenController.java +++ b/Client/src/main/java/buchungenMVC/BuchungenController.java @@ -4,17 +4,26 @@ import java.awt.event.ActionListener; import java.util.Observable; import java.util.Observer; +import java.util.ArrayList; +import java.util.List; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import datenbank.Insert; import datenbank.Select; +import datenbank.Create; +import datenbank.Drop; +import datenbank.Insert; import datenbank.Update; + + +import api_client.*; import gui.GlobaleVariablen; public class BuchungenController implements Observer, ActionListener, ListSelectionListener { + private Boolean debug = true; + private BuchungenModel buchungenModel; private BuchungenView buchungenView; @@ -25,20 +34,25 @@ public BuchungenController(BuchungenModel modelGUI, BuchungenView viewGUI) { // ActionListener buchungenView.getTextBenoetigtePlaete().addActionListener(this); buchungenView.getTextName().addActionListener(this); - buchungenView.getTextVorname().addActionListener(this); - buchungenView.getTextMail().addActionListener(this); - buchungenView.getTextTelefon().addActionListener(this); + buchungenView.getTextNameAgent().addActionListener(this); buchungenView.getButtonBuchungBestaetigung().addActionListener(this); buchungenView.getButtonBuchungAbbrechen().addActionListener(this); + buchungenView.getButtonDownload().addActionListener(this); + buchungenView.getButtonUpload().addActionListener(this); + // Selection Listener - buchungenView.getListRoute().addListSelectionListener(this); - buchungenView.getListDauer().addListSelectionListener(this); + buchungenView.getListTour().addListSelectionListener(this); buchungenView.getListDatum().addListSelectionListener(this); - buchungenView.getListUhrzeiten().addListSelectionListener(this); + buchungenView.getListUhrzeiten().addListSelectionListener(this); // Voreinstellungen buchungenView.getButtonBuchungBestaetigung().setEnabled(false); + buchungenView.getTextNameAgent().setText("1"); + + if(new Select().selectIdFromLookButtton() == 1) { + buchungenView.getButtonDownload().setEnabled(false); + } // Sichtbarkeit buchungenView.setVisible(true); @@ -48,30 +62,28 @@ public BuchungenController(BuchungenModel modelGUI, BuchungenView viewGUI) { @Override public void actionPerformed(ActionEvent e) { switch (e.getActionCommand()) { - case GlobaleVariablen.EVENT_ENTER_PLAETZE: + case GlobaleVariablen.EVENT_ENTER_PLAETZE: handleActionEventEnterPlaetze(); break; - case GlobaleVariablen.EVENT_ENTER_NAME: + case GlobaleVariablen.EVENT_ENTER_NAME: handleActionEventEnterName(); break; - case GlobaleVariablen.EVENT_ENTER_VORNAME: - handleActionEventEnterVorname(); - break; - case GlobaleVariablen.EVENT_ENTER_TELEFON: - handleActionEventEnterTelefon(); - break; - case GlobaleVariablen.EVENT_ENTER_MAIL: - handleActionEventEnterMail(); - break; - case GlobaleVariablen.EVENT_BUTTONBUCHUNGBESTAETIGUNG: + case GlobaleVariablen.EVENT_BUTTONBUCHUNGBESTAETIGUNG: handleActionEventButtonBestaetigung(); break; - case GlobaleVariablen.EVENT_BUTTONBUCHUNGABBRECHEN: + case GlobaleVariablen.EVENT_BUTTONBUCHUNGABBRECHEN: handleActionEventButtonAbbrechen(); break; + case GlobaleVariablen.EVENT_BUTTONDOWNLOAD: + handleActionEventButtonSynchronisieren(); + break; + case GlobaleVariablen.EVENT_BUTTONUPLOAD: + handleActionEventButtonUpload(); + break; } + } - + @Override public void update(Observable arg0, Object arg1) { if (arg0 == this.buchungenModel) { @@ -82,235 +94,265 @@ public void update(Observable arg0, Object arg1) { @Override public void valueChanged(ListSelectionEvent e) { - if (e.getSource() == buchungenView.getListRoute()) { + if (e.getSource() == buchungenView.getListTour()) { handleListSelectionEventListRoute(); } else if (e.getSource() == buchungenView.getListDatum()) { handleListSelectionEventListDatum(); } else if (e.getSource() == buchungenView.getListUhrzeiten()) { handleListSelectionEventListUhrzeit(); - } else if (e.getSource() == buchungenView.getListDauer()) { - handleListSelectionEventListDauer(); } } private void handleListSelectionEventListRoute() { // Aufruf, damit die Methode nur gestartet wird, wenn ein // Feld selectiert ist - if(buchungenView.getListRoute().isSelectionEmpty() == true) { + if(buchungenView.getListTour().isSelectionEmpty() == true) { return; } - // l�schen der anderen Listen und Textfelder + // löschen der anderen Listen und Textfelder buchungenView.getListDatum().setListData(new String[0]); buchungenView.getListUhrzeiten().setListData(new String[0]); - buchungenView.getTextDatumBestaetigung().setText(""); buchungenView.getTextUhrzeitBestaetigung().setText(""); + buchungenView.getTextDatumBestaetigung().setText(""); buchungenView.getTextSchiffBestaetigung().setText(""); + buchungenView.getTextExistingCount().setText(""); - // RoutenID und RoutenName im Model speichern. - int selectedIndex = buchungenView.getListRoute().getSelectedIndex(); - int[] listeIDRoute = buchungenModel.getRoutenVO().getRouten_id(); - - buchungenModel.setRouteId(listeIDRoute[selectedIndex]); - buchungenModel.setRouteName(buchungenView.getListRoute().getSelectedValue()); + // Tour Name eintragen + buchungenModel.setTourName(buchungenView.getListTour().getSelectedValue()); + buchungenView.getTextRouteBestaetigung().setText(buchungenView.getListTour().getSelectedValue()); - // Selektiert ebenfalls die Liste "Dauer" - buchungenView.getListDauer().setSelectedIndex(selectedIndex); + // Ausgabe des RoutenName + buchungenView.getTextRouteBestaetigung().setText(buchungenModel.getTourName()); - // Ausgabe des RoutenName (RoutenDauer) - buchungenView.getTextRouteBestaetigung().setText(buchungenView.getListRoute().getSelectedValue() + - "\t(" + buchungenView.getListDauer().getSelectedValue() + ")"); - - // Datum aus der Tabelle Tour lesen und im model speichern - buchungenModel.getTourVO().setDatum( - new Select().selectRouteDatumFromTour(buchungenModel.getPlaetze(), buchungenModel.getRouteId())); - - // Datum in der Liste auf der Oberfl�che ausgeben - buchungenView.getListDatum().setListData(buchungenModel.getTourVO().getDatum()); + //Datum eintragen + buchungenView.getListDatum().setListData(new Select().selectRouteDatumFromTour( + buchungenModel.getPlaetze(), buchungenModel.getTourName(), buchungenModel.getAgentNr())); // Button zum Buchen auf Enabled(false) setzen = nicht anklickbar buchungenView.getButtonBuchungBestaetigung().setEnabled(false); } private void handleListSelectionEventListDatum() { - // �berpr�fung, ob ein Element selektiert ist. + // Überprüfung, ob ein Element selektiert ist. if(buchungenView.getListDatum().isSelectionEmpty() == true) { return; } - // l�schen der anderen Listen und Textfelder + // löschen der anderen Listen und Textfelder buchungenView.getListUhrzeiten().setListData(new String[0]); buchungenView.getTextUhrzeitBestaetigung().setText(""); buchungenView.getTextSchiffBestaetigung().setText(""); + buchungenView.getTextExistingCount().setText(""); // Datum aus der Liste in das entsprechende Textfeld schreiben buchungenView.getTextDatumBestaetigung().setText(buchungenView.getListDatum().getSelectedValue()); - // Datum im Model �bernehmen. - buchungenModel.setDatum(buchungenView.getListDatum().getSelectedValue()); + // Datum + String[] datumunformatiert = buchungenView.getListDatum().getSelectedValue().split(java.util.regex.Pattern.quote(".")); - // startzeiten aus Tabelle Tour laden und im Model speichern. - buchungenModel.getTourVO().setStartzeit( - new Select().selectRoutenStartzeitFromTour(buchungenModel.getPlaetze(), buchungenModel.getRouteId(), - buchungenModel.getDatum())); + buchungenModel.setDatum(datumunformatiert[2] + "-" + datumunformatiert[1] + "-" + datumunformatiert[0]); - // Startzeiten auf der Oberfl�che ausgeben. - buchungenView.getListUhrzeiten().setListData(buchungenModel.getTourVO().getStartzeit()); + buchungenView.getListUhrzeiten().setListData(new Select().selectRouteZeitFromTour( + buchungenModel.getPlaetze(), buchungenModel.getTourName(), buchungenModel.getDatum(), buchungenModel.getAgentNr())); // Button zum Buchen auf Enabled(false) setzen = nicht anklickbar buchungenView.getButtonBuchungBestaetigung().setEnabled(false); } private void handleListSelectionEventListUhrzeit() { - // �berpr�fung, ob ein Element selektiert ist. + // Überprüfung, ob ein Element selektiert ist. if(buchungenView.getListUhrzeiten().isSelectionEmpty() == true) { return; } - // Variablen - int schiffId = new Select().selectSchiffIdFromTourWHERE(buchungenModel.getRouteId(), - buchungenModel.getDatum(), buchungenModel.getUhrzeit()); - String schiffName = new Select().selectSchiffNameFromSchiffWHERE(schiffId); - String uhrzeit = buchungenView.getListUhrzeiten().getSelectedValue(); - // Die Uhrzeit im Model speichern. - buchungenModel.setUhrzeit(uhrzeit); + buchungenModel.setUhrzeit(buchungenView.getListUhrzeiten().getSelectedValue() + ":00"); - // Die Uhrzeit auf der Oberfl�che ausgeben - buchungenView.getTextUhrzeitBestaetigung().setText(uhrzeit); + buchungenView.getTextUhrzeitBestaetigung().setText(buchungenView.getListUhrzeiten().getSelectedValue()); - // SchiffsId und Schiffsname im Model speichern - buchungenModel.setSchiffId(schiffId); - buchungenModel.setSchiffName(schiffName); + String[] ship = new Select().selectRouteSchiffFromShip( + buchungenModel.getPlaetze(), buchungenModel.getTourName(), buchungenModel.getDatum(), + buchungenModel.getUhrzeit(), buchungenModel.getAgentNr()); - // Schiffsname speichern. - buchungenView.getTextSchiffBestaetigung().setText(schiffName); + buchungenView.getTextSchiffBestaetigung().setText(ship[0]); - // Button anklickbar, weil alle Felder einen Wert besitzen. - buchungenView.getButtonBuchungBestaetigung().setEnabled(true); - } - - private void handleListSelectionEventListDauer() { - if(buchungenView.getListDauer().isSelectionEmpty() == true) { - return; - } + buchungenModel.setSchiffId((Integer.parseInt(ship[1]))); - int indexSelection = buchungenView.getListDauer().getSelectedIndex(); + buchungenModel.setTourId(new Select().selectTourIDfromTour( + buchungenModel.getTourName(), buchungenModel.getDatum(), + buchungenModel.getUhrzeit(), buchungenModel.getSchiffId())); - buchungenView.getListRoute().setSelectedIndex(indexSelection); + buchungenModel.setExistingCount((new Select().selectCountfromQuotas( + buchungenModel.getTourId(), buchungenModel.getAgentNr()) - buchungenModel.getPlaetze())); - // TODO Auto-generated method stub + buchungenView.getTextExistingCount().setText("" + buchungenModel.getExistingCount()); + + // Button anklickbar, weil alle Felder einen Wert besitzen. + buchungenView.getButtonBuchungBestaetigung().setEnabled(true); } - private void handleActionEventEnterPlaetze() { - // l�schen der anderen Listen und Textfelder + // Löschen der anderen Listen und Textfelder buchungenView.getListDatum().setListData(new String[0]); buchungenView.getListUhrzeiten().setListData(new String[0]); buchungenView.getTextDatumBestaetigung().setText(""); - buchungenView.getTextUhrzeitBestaetigung().setText(""); buchungenView.getTextSchiffBestaetigung().setText(""); buchungenView.getTextRouteBestaetigung().setText(""); buchungenView.getTextPlaetzeBestaetigung().setText(""); + buchungenView.getTextExistingCount().setText(""); - // Die Anzahl der gesuchten Pl�tze wird gespeichert + // Die Anzahl der gesuchten Plätze wird gespeichert buchungenModel.setPlaetze(Integer.parseInt(buchungenView.getTextBenoetigtePlaete().getText())); + buchungenView.getTextPlaetzeBestaetigung().setText(buchungenView.getTextBenoetigtePlaete().getText()); - // Die "verf�gbaren" Routen werden aus der "Touren"-Tabelle geladen und im Model speichern - buchungenModel.getRoutenVO().setRouten_id(new Select().selectRouteIdFromTour(buchungenModel.getPlaetze())); + buchungenModel.setAgentNr(Integer.parseInt(buchungenView.getTextNameAgent().getText())); - // Die passenden RoutenNamen aus der Tabelle Routen lesen und im Model speichern - buchungenModel.getRoutenVO().setRouten_name(new Select().selectRoutenNameFromRouten( - buchungenModel.getRoutenVO().getRouten_id())); - // Die passenden RoutenDauern aus der tabelle Routen lesen und im Model speichern -// buchungenModel.getRoutenVO().setRouten_dauer(new Select().selectFloatFromRouten( -// buchungenModel.getRoutenVO().getRouten_id())); - // TODO umwandeln des Routentyps - - // Die Werte an der Oberfl�che darstellen - buchungenView.getTextPlaetzeBestaetigung().setText("" + buchungenModel.getPlaetze()); - buchungenView.getListRoute().setListData(this.buchungenModel.getRoutenVO().getRouten_name()); -// buchungenView.getListDauer().setListData(this.buchungenModel.getRoutenVO().getRouten_dauer()); - // TODO umwandeln des Datentyps - -// // Die infrage kommenden Schiffs IDs eintragen TODO hier muss die Anzahl der Pl�tze �ber die Tabelle Buchungen errechnet werden -// buchungenModel.getSchiffVO().setSchiff_id(new Select().selectIDFromSchiffWHERE(buchungenModel.getPlaetze())); -// + // Die Werte an der Oberfläche darstellen + buchungenView.getListTour().setListData(new Select().selectRouteNameFromTour(buchungenModel.getPlaetze(), + buchungenModel.getAgentNr())); - // legt den Fokus auf das n�chste Textfeld + // legt den Fokus auf das nächste Textfeld buchungenView.getTextName().requestFocus(); // Button zum Buchen auf Enabled(false) setzen = nicht anklickbar buchungenView.getButtonBuchungBestaetigung().setEnabled(false); } - - private void handleActionEventEnterName() { - buchungenView.getTextVorname().requestFocus(); - } - - private void handleActionEventEnterVorname() { - buchungenView.getTextMail().requestFocus(); - } - - private void handleActionEventEnterMail() { - buchungenView.getTextTelefon().requestFocus(); - } - private void handleActionEventEnterTelefon() { - buchungenView.getListRoute().requestFocus(); + private void handleActionEventEnterName() { + buchungenView.getListTour().requestFocus(); + System.out.println(buchungenView.getTextName().getText()); + } /** - * l�scht alles auf der Oberfl�che und setzt den Fokus - * auf das Textfeld f�r die Eingabe der pl�tze + * löscht alles auf der Oberfläche und setzt den Fokus + * auf das Textfeld für die Eingabe der Plätze */ private void handleActionEventButtonAbbrechen() { - // Leerzeichen f�r die Textfelder + // Leerzeichen für die Textfelder buchungenView.getTextBenoetigtePlaete().setText(""); + buchungenView.getTextUhrzeitBestaetigung().setText(""); + buchungenView.getTextUhrzeitBestaetigung().setText(""); buchungenView.getTextName().setText(""); - buchungenView.getTextVorname().setText(""); - buchungenView.getTextMail().setText(""); - buchungenView.getTextTelefon().setText(""); buchungenView.getTextPlaetzeBestaetigung().setText(""); buchungenView.getTextRouteBestaetigung().setText(""); buchungenView.getTextSchiffBestaetigung().setText(""); buchungenView.getTextDatumBestaetigung().setText(""); - buchungenView.getTextUhrzeitBestaetigung().setText(""); + buchungenView.getTextExistingCount().setText(""); - // leere Listen f�r die Listen + // leere Listen für die Listen buchungenView.getListUhrzeiten().setListData(new String[0]); buchungenView.getListDatum().setListData(new String[0]); - buchungenView.getListDauer().setListData(new Float[0]); - buchungenView.getListRoute().setListData(new String[0]); + buchungenView.getListTour().setListData(new String[0]); // "Buchen"-Button als nicht anklickbar buchungenView.getButtonBuchungBestaetigung().setEnabled(false); - // Fokus auf das Textfeld f�r die eingabe der Daten + // Fokus auf das Textfeld für die eingabe der Daten buchungenView.getTextBenoetigtePlaete().requestFocus(); } + private void handleActionEventButtonSynchronisieren(){ + + Drop dropper = new Drop(); + dropper.DropDB(); + + Create creater = new Create(); + creater.CreatePlainDB(); + + Insert inserter = new Insert(); + + api_client http= new api_client(); + + List agents=http.get_agents(); + List ships=http.get_ships(); + List tours=http.get_tours(); + List quotas=http.get_quotas(); + List customers=http.get_customers(); + + for(agent tmp: agents) + inserter.insertAgent(tmp); + + for(ship tmp: ships) + inserter.insertShip(tmp); + + for(tour tmp: tours) + inserter.insertTour(tmp); + + for(quota tmp: quotas) + inserter.insertQuota(tmp); + + for(customer tmp: customers) + inserter.insertCustomer(tmp); + + + // unlook Button Download + new Update().UpdatelookButton(0); + } + + private void handleActionEventButtonUpload() { + Select selector = new Select(); + Update updater = new Update(); + Drop dropper = new Drop(); + ArrayList customers = selector.selectOfflineCustomersWOReservations(); + api_client http= new api_client(); + customer returned_cust = null; + + for(customer tmp:customers){ //send each customer to server, update local DB with remote id + returned_cust = http.upload_customer(tmp); + updater.updateOfflineCustomer(tmp.id, returned_cust.id); + } + + ArrayList reservations = selector.getAllReservations(); + int remote_id = 0; + for(reservation tmp:reservations){ + remote_id = selector.selectRemoteCustomerIDForReservation(tmp.customer); + if(remote_id == 0){ + System.out.println("Could not connect reservation to remote customer id!"); + return; + } + tmp.customer = remote_id; + http.upload_reservation(tmp); + } + + dropper.dropRecreateLocalTables(); + + //unlook Button Upload + + buchungenView.getButtonDownload().setEnabled(true); + new Update().UpdatelookButton(0); + } + + + /** - * Der Button ist f�r die Buchungsbest�tigung. Die Buchung wird in einer Datenbank - * gespeichert. Anschlie�end wird die Methode des Abbrechen-Button aufgerufen. + * Der Button ist für die Buchungsbestätigung. Die Buchung wird in einer Datenbank + * gespeichert. Anschließend wird die Methode des Abbrechen-Button aufgerufen. */ private void handleActionEventButtonBestaetigung() { - int routenId = buchungenModel.getRouteId(); - String tourDatum = buchungenModel.getDatum(); - String tourStartzeit = buchungenModel.getUhrzeit(); - int plaetze = buchungenModel.getPlaetze(); - new Insert().insertIntoBuchungen(plaetze, routenId, - tourDatum, tourStartzeit , buchungenModel.getSchiffId()); + if (debug) System.out.println("Plätze:" + buchungenModel.getPlaetze()); + if (debug) System.out.println("Tour ID:" + buchungenModel.getTourId()); + if (debug) System.out.println("Customer Name: " + buchungenView.getTextName().getText()); + if (debug) System.out.println("Agent ID: " + buchungenModel.getAgentNr()); + + + new Insert().insertOfflineBooking(buchungenModel.getPlaetze(), + buchungenModel.getTourId(), buchungenView.getTextName().getText()); + new Update().UpdateQuotas(buchungenModel.getPlaetze(), buchungenModel.getTourId(), buchungenModel.getAgentNr()); - int plaetze_vorhanden = new Select().selectPlaetzeFromTour(routenId, tourDatum, tourStartzeit); - new Update().UpdateTourSetplaetze(plaetze_vorhanden - plaetze , routenId, tourDatum, tourStartzeit); + // handleActionEventButtonAbbrechen(); + // Look Button until Upload + buchungenView.getButtonDownload().setEnabled(false); + new Update().UpdatelookButton(1); + } } diff --git a/Client/src/main/java/buchungenMVC/BuchungenMain.java b/Client/src/main/java/buchungenMVC/BuchungenMain.java index 0771d79..c17bdbe 100755 --- a/Client/src/main/java/buchungenMVC/BuchungenMain.java +++ b/Client/src/main/java/buchungenMVC/BuchungenMain.java @@ -6,7 +6,7 @@ public static void main(String[] args) { BuchungenView viewGUI = new BuchungenView(); - @SuppressWarnings("unused") + @SuppressWarnings("unused") BuchungenController controllerGUI = new BuchungenController(modelGUI, viewGUI); } diff --git a/Client/src/main/java/buchungenMVC/BuchungenModel.java b/Client/src/main/java/buchungenMVC/BuchungenModel.java index 5ac85f5..f848166 100755 --- a/Client/src/main/java/buchungenMVC/BuchungenModel.java +++ b/Client/src/main/java/buchungenMVC/BuchungenModel.java @@ -7,43 +7,22 @@ public class BuchungenModel extends Observable{ - private Routen routenVO = new Routen(); - private Tour tourVO = new Tour(); - private Schiff schiffVO = new Schiff(); - private int plaetze; - private int routeId; private String datum; private String uhrzeit; private int schiffId; - private String schiffName; private String routeName; + private int tourId; + private int AgentNr; + private int existingCount; // Getter und Setter - public String getRouteName() { + public String getTourName() { return routeName; } - public Routen getRoutenVO() { - return routenVO; - } - public void setRoutenVO(Routen routenVO) { - this.routenVO = routenVO; - } - public Tour getTourVO() { - return tourVO; - } - public void setTourVO(Tour tourVO) { - this.tourVO = tourVO; - } - public Schiff getSchiffVO() { - return schiffVO; - } - public void setSchiffVO(Schiff schiffVO) { - this.schiffVO = schiffVO; - } - public void setRouteName(String routeName) { + public void setTourName(String routeName) { this.routeName = routeName; } public int getPlaetze() { @@ -52,12 +31,6 @@ public int getPlaetze() { public void setPlaetze(int plaetze) { this.plaetze = plaetze; } - public int getRouteId() { - return routeId; - } - public void setRouteId(int routeId) { - this.routeId = routeId; - } public String getDatum() { return datum; } @@ -76,11 +49,23 @@ public int getSchiffId() { public void setSchiffId(int schiffId) { this.schiffId = schiffId; } - public String getSchiffName() { - return schiffName; + public int getTourId() { + return tourId; + } + public void setTourId(int tourId) { + this.tourId = tourId; + } + public int getAgentNr() { + return AgentNr; + } + public void setAgentNr(int agentNr) { + AgentNr = agentNr; + } + public int getExistingCount() { + return existingCount; } - public void setSchiffName(String schiffName) { - this.schiffName = schiffName; + public void setExistingCount(int existingCount) { + this.existingCount = existingCount; } diff --git a/Client/src/main/java/buchungenMVC/BuchungenView.java b/Client/src/main/java/buchungenMVC/BuchungenView.java index 6af47a5..edd67c7 100755 --- a/Client/src/main/java/buchungenMVC/BuchungenView.java +++ b/Client/src/main/java/buchungenMVC/BuchungenView.java @@ -20,31 +20,30 @@ public class BuchungenView extends JFrame{ private static final long serialVersionUID = 6038622921625628983L; // Textfelder + private UTextField textNameAgent; private UTextField textBenoetigtePlaetze; private UTextField textName; - private UTextField textVorname; - private UTextField textMail; - private UTextField textTelefon; private UTextField textPlaetzeBestaetigung; private UTextField textRouteBestaetigung; private UTextField textSchiffBestaetigung; private UTextField textUhrzeitBestaetigung; private UTextField textDatumBestaetigung; - + private UTextField textExistingCount; + // Button private UButton buttonBuchungBestaetigung; private UButton buttonBuchungAbbrechen; + private UButton buttonDownload; + private UButton buttonUpload; // Listen - private JList listRoute; + private JList listTour; private JList listUhrzeiten; private JList listDatum; - private JList listDauer; - + private JScrollPane scrollListRoute; private JScrollPane scrollListUhrzeiten; private JScrollPane scrollListDatum; - private JScrollPane scrollListDauer; // Panel private UPanel rootPanel; @@ -56,12 +55,11 @@ public class BuchungenView extends JFrame{ // Label private ULabel labelUeberschrift; + private ULabel labelNameAgent; private ULabel labelBenoetigtePlaete; private ULabel labelName; - private ULabel labelVorname; - private ULabel labelMail; - private ULabel labelTelefon; private ULabel labelRoute; + private ULabel labelExistingCount; private ULabel labelUhrzeiten; private ULabel labelDatum; private ULabel labelPlaetzeBestaetigung; @@ -69,23 +67,22 @@ public class BuchungenView extends JFrame{ private ULabel labelSchiffBestaetigung; private ULabel labelUhrzeitBestaetigung; private ULabel labelDatumBestaetigung; - private ULabel labelDauer; public BuchungenView() { // Definition des Frames - this.setTitle("PricatBayTours-Buchungen"); + this.setTitle("PirateBayTours-Buchungen"); this.setExtendedState(MAXIMIZED_BOTH); this.setDefaultCloseOperation(EXIT_ON_CLOSE); - // Root Panel, welches am Ende �bergeben wird. Alles auf der Oberfl�che - // muss am Ende dem rootPanel �bergeben werden. + // Root Panel, welches am Ende übergeben wird. Alles auf der Oberfläche + // muss am Ende dem rootPanel übergeben werden. { rootPanel = new UPanel(); rootPanel.setTitledBorder("Buchungsauswahl"); this.add(rootPanel); } - // Panel f�r die �berschrift + // Panel für die Überschrift { panelUeberschrift = new UPanel(); rootPanel.add(panelUeberschrift, new UConstraints(0, 0)); @@ -102,20 +99,17 @@ public BuchungenView() { panelKundenInfo.setTitledBorder("Kundeninformationen"); rootPanel.add(panelKundenInfo, new UConstraints(0, 1)); - labelBenoetigtePlaete = new ULabel("Ben�tigte Pl�tze *"); + labelBenoetigtePlaete = new ULabel("Benötigte Plätze *"); panelKundenInfo.add(labelBenoetigtePlaete, new UConstraints(0, 0)); labelName = new ULabel("Name"); panelKundenInfo.add(labelName, new UConstraints(0, 1)); - labelVorname = new ULabel("Vorname"); - panelKundenInfo.add(labelVorname, new UConstraints(0, 2)); - - labelMail = new ULabel("Mail-Adresse"); - panelKundenInfo.add(labelMail, new UConstraints(0, 3)); + labelNameAgent = new ULabel("Agent"); + panelKundenInfo.add(labelNameAgent, new UConstraints(2, 0)); - labelTelefon = new ULabel("Telefon-Nr."); - panelKundenInfo.add(labelTelefon, new UConstraints(0, 4)); + labelExistingCount = new ULabel("Verbleibende Plätze"); + panelKundenInfo.add(labelExistingCount, new UConstraints(2, 1)); textBenoetigtePlaetze = new UTextField(20); textBenoetigtePlaetze.setActionCommand(GlobaleVariablen.EVENT_ENTER_PLAETZE); @@ -125,52 +119,37 @@ public BuchungenView() { textName.setActionCommand(GlobaleVariablen.EVENT_ENTER_NAME); panelKundenInfo.add(textName, new UConstraints(1, 1)); - textVorname = new UTextField(20); - textVorname.setActionCommand(GlobaleVariablen.EVENT_ENTER_VORNAME); - panelKundenInfo.add(textVorname, new UConstraints(1, 2)); + textNameAgent = new UTextField(20); + panelKundenInfo.add(textNameAgent, new UConstraints(3, 0)); - textMail = new UTextField(20); - textMail.setActionCommand(GlobaleVariablen.EVENT_ENTER_MAIL); - panelKundenInfo.add(textMail, new UConstraints(1, 3)); + textExistingCount = new UTextField(20); + textExistingCount.setEditable(false); + panelKundenInfo.add(textExistingCount, new UConstraints(3, 1)); - textTelefon = new UTextField(20); - textTelefon.setActionCommand(GlobaleVariablen.EVENT_ENTER_TELEFON); - panelKundenInfo.add(textTelefon, new UConstraints(1, 4)); } - // Panel f�r die Buchungen + // Panel für die Buchungen { panelBuchungsauswahl = new UPanel(); panelBuchungsauswahl.setTitledBorder("Buchungsauswahl"); rootPanel.add(panelBuchungsauswahl, new UConstraints(0, 2)); - labelRoute = new ULabel("Routen"); + labelRoute = new ULabel("Touren"); panelBuchungsauswahl.add(labelRoute, new UConstraints(0, 0)); - labelDauer = new ULabel("Dauer"); - panelBuchungsauswahl.add(labelDauer, new UConstraints(1, 0)); - labelDatum = new ULabel("Datum"); panelBuchungsauswahl.add(labelDatum, new UConstraints(2, 0)); labelUhrzeiten = new ULabel("Uhrzeiten"); panelBuchungsauswahl.add(labelUhrzeiten, new UConstraints(3, 0)); - listRoute = new JList(); - listRoute.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + listTour = new JList(); + listTour.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); scrollListRoute = new JScrollPane(); scrollListRoute.setPreferredSize(new Dimension(200, 200)); - scrollListRoute.setViewportView(listRoute); + scrollListRoute.setViewportView(listTour); panelBuchungsauswahl.add(scrollListRoute, new UConstraints(0, 1)); - - listDauer = new JList(); - listDauer.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - scrollListDauer = new JScrollPane(); - scrollListDauer.setPreferredSize(new Dimension(30, 200)); - scrollListDauer.setViewportView(listDauer); - panelBuchungsauswahl.add(scrollListDauer, new UConstraints(1, 1)); listDatum = new JList(); listDatum.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); @@ -190,13 +169,13 @@ public BuchungenView() { } - // Panel f�r die Buchungsbest�tigung + // Panel für die Buchungsbestätigung { panelBuchungsbestaetigung = new UPanel(); - panelBuchungsbestaetigung.setTitledBorder("Buchungsbest�tigung"); + panelBuchungsbestaetigung.setTitledBorder("Buchungsbestätigung"); rootPanel.add(panelBuchungsbestaetigung, new UConstraints(0, 3)); - labelPlaetzeBestaetigung = new ULabel("Pl�tze"); + labelPlaetzeBestaetigung = new ULabel("Plätze"); panelBuchungsbestaetigung.add(labelPlaetzeBestaetigung, new UConstraints(0, 0)); labelRouteBestaetigung = new ULabel("Route"); @@ -215,7 +194,7 @@ public BuchungenView() { textPlaetzeBestaetigung.setEditable(false); panelBuchungsbestaetigung.add(textPlaetzeBestaetigung, new UConstraints(0, 1, GridBagConstraints.BOTH)); - textRouteBestaetigung = new UTextField(20); + textRouteBestaetigung = new UTextField(15); textRouteBestaetigung.setEditable(false); panelBuchungsbestaetigung.add(textRouteBestaetigung, new UConstraints(1, 1)); @@ -227,14 +206,14 @@ public BuchungenView() { textUhrzeitBestaetigung.setEditable(false); panelBuchungsbestaetigung.add(textUhrzeitBestaetigung, new UConstraints(3, 1)); - textSchiffBestaetigung = new UTextField(20); + textSchiffBestaetigung = new UTextField(15); textSchiffBestaetigung.setEditable(false); panelBuchungsbestaetigung.add(textSchiffBestaetigung, new UConstraints(4, 1)); - //Panel f�r die Button + //Panel für die Button { panelButtonBestaetigung = new UPanel(); - panelBuchungsbestaetigung.add(panelButtonBestaetigung, new UConstraints(4, 2, 0, 2)); + panelBuchungsbestaetigung.add(panelButtonBestaetigung, new UConstraints(2, 2, 0, 4)); buttonBuchungBestaetigung = new UButton(); buttonBuchungBestaetigung.setText("Kaufen"); @@ -247,6 +226,20 @@ public BuchungenView() { buttonBuchungAbbrechen.setActionCommand(GlobaleVariablen.EVENT_BUTTONBUCHUNGABBRECHEN); buttonBuchungAbbrechen.setBackground(Color.RED); panelButtonBestaetigung.add(buttonBuchungAbbrechen, new UConstraints(1, 2)); + + buttonDownload = new UButton(); + buttonDownload.setText("Download"); + buttonDownload.setActionCommand(GlobaleVariablen.EVENT_BUTTONDOWNLOAD); + buttonDownload.setBackground(Color.darkGray); + buttonDownload.setForeground(Color.white); + panelButtonBestaetigung.add(buttonDownload, new UConstraints(2, 2)); + + buttonUpload = new UButton(); + buttonUpload.setText("Upload"); + buttonUpload.setActionCommand(GlobaleVariablen.EVENT_BUTTONUPLOAD); + buttonUpload.setBackground(Color.darkGray); + buttonUpload.setForeground(Color.white); + panelButtonBestaetigung.add(buttonUpload, new UConstraints(3, 2)); } } @@ -254,15 +247,11 @@ public BuchungenView() { this.pack(); } - // Getter f�r die Wertebelegung - public JList getListRoute() { - return listRoute; + // Getter für die Wertebelegung + public JList getListTour() { + return listTour; } - public JList getListDauer() { - return listDauer; - } - public JList getListUhrzeiten() { return listUhrzeiten; } @@ -285,6 +274,13 @@ public UButton getButtonBuchungAbbrechen() { return buttonBuchungAbbrechen; } + public UButton getButtonDownload() { + return buttonDownload; + } + public UButton getButtonUpload() { + return buttonUpload; + } + public UTextField getTextRouteBestaetigung() { return textRouteBestaetigung; } @@ -300,20 +296,16 @@ public UTextField getTextUhrzeitBestaetigung() { public UTextField getTextDatumBestaetigung() { return textDatumBestaetigung; } - + public UTextField getTextName() { return textName; } - public UTextField getTextVorname() { - return textVorname; + public UTextField getTextNameAgent() { + return textNameAgent; } - - public UTextField getTextMail() { - return textMail; + public UTextField getTextExistingCount() { + return textExistingCount; } - public UTextField getTextTelefon() { - return textTelefon; - } } diff --git a/Client/src/main/java/datenbank/Create.java b/Client/src/main/java/datenbank/Create.java new file mode 100644 index 0000000..d6d072d --- /dev/null +++ b/Client/src/main/java/datenbank/Create.java @@ -0,0 +1,107 @@ +package datenbank; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; + + +/** + * Hier werden die Datensätze in die Datenbanken hinzugefügt. + * + * @author Jonas Droste + * + */ +public class Create { + private Boolean debug = true; + private Connection con = null; + private PreparedStatement pst = null; + + private String url = "jdbc:sqlite:db.sqlite3"; + + public Create() { + } + + public void CreatePlainDB() { + + try { + con = DriverManager.getConnection(url); + + //Create offline cache tables + String stm_agents = "CREATE TABLE IF NOT EXISTS agents(id int,name varchar(255));"; + String stm_customers = "CREATE TABLE IF NOT EXISTS customers(id int,name varchar(255));"; + String stm_ships = "CREATE TABLE IF NOT EXISTS ships(id int,name varchar(255), seats int);"; + String stm_tours = "CREATE TABLE IF NOT EXISTS tours(id int,name varchar(255), date varchar(255), time varchar(255), ship int,FOREIGN KEY(ship) REFERENCES ships(id));"; + String stm_quotas = "CREATE TABLE IF NOT EXISTS quotas(count int,tour int, agent int, FOREIGN KEY(tour) REFERENCES tours(id), FOREIGN KEY(agent) REFERENCES agents(id));"; + String stm_reservations = "CREATE TABLE IF NOT EXISTS reservations(id int,count int, tour int, customer int , FOREIGN KEY(tour) REFERENCES tours(id), FOREIGN KEY(customer) REFERENCES customers(id));"; + String stm_lookButton = "CREATE TABLE IF NOT EXISTS lookButton(id int);"; + String stm_insertValue = "INSERT INTO lookButton VALUES(0);"; + + //Create Tables for temporary storage + String stm_offline_bookings = "CREATE TABLE IF NOT EXISTS offline_bookings(count int, tour int, customer int, FOREIGN KEY(tour) REFERENCES tours(id), FOREIGN KEY(customer) REFERENCES offline_customers(id));"; + String stm_offline_customers = "CREATE TABLE IF NOT EXISTS offline_customers(id INTEGER PRIMARY KEY AUTOINCREMENT, name varchar(255), remote_id int);"; + + + pst = con.prepareStatement(stm_agents); + pst.executeUpdate(); + if (debug) System.out.println(stm_agents); + + pst = con.prepareStatement(stm_customers); + pst.executeUpdate(); + if (debug) System.out.println(stm_customers); + + pst = con.prepareStatement(stm_ships); + pst.executeUpdate(); + if (debug) System.out.println(stm_ships); + + pst = con.prepareStatement(stm_tours); + pst.executeUpdate(); + if (debug) System.out.println(stm_tours); + + pst = con.prepareStatement(stm_quotas); + pst.executeUpdate(); + if (debug) System.out.println(stm_quotas); + + pst = con.prepareStatement(stm_lookButton); + pst.executeUpdate(); + if (debug) System.out.println(stm_lookButton); + + pst = con.prepareStatement(stm_insertValue); + pst.executeUpdate(); + if (debug) System.out.println(stm_insertValue); + + pst = con.prepareStatement(stm_offline_bookings); + pst.executeUpdate(); + if (debug) System.out.println(stm_offline_bookings); + + pst = con.prepareStatement(stm_offline_customers); + pst.executeUpdate(); + if (debug) System.out.println(stm_offline_customers); + + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + +} \ No newline at end of file diff --git a/Client/src/main/java/datenbank/Drop.java b/Client/src/main/java/datenbank/Drop.java new file mode 100644 index 0000000..bd01c49 --- /dev/null +++ b/Client/src/main/java/datenbank/Drop.java @@ -0,0 +1,150 @@ +package datenbank; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; + + +/** + * Hier werden die Datensätze in die Datenbanken hinzugefügt. + * + * @author Jonas Droste + * + */ +public class Drop { + private Boolean debug = true; + private Connection con = null; + private PreparedStatement pst = null; + + private String url = "jdbc:sqlite:db.sqlite3"; + + public Drop() { + } + + public void DropDB() { + + try { + con = DriverManager.getConnection(url); + + String stm_agents = "DROP TABLE IF EXISTS agents;"; + String stm_customers = "DROP TABLE IF EXISTS customers;"; + String stm_ships = "DROP TABLE IF EXISTS ships;"; + String stm_tours = "DROP TABLE IF EXISTS tours;"; + String stm_quotas = "DROP TABLE IF EXISTS quotas;"; + String stm_lookButton = "DROP TABLE IF EXISTS lookButton"; + String stm_reservations = "DROP TABLE IF EXISTS reservations;"; + + String stm_offline_bookings = "DROP TABLE IF EXISTS offline_bookings;"; + String stm_offline_customers = "DROP TABLE IF EXISTS offline_customers;"; + + + + + pst = con.prepareStatement(stm_agents); + pst.executeUpdate(); + if (debug) System.out.println(stm_agents); + + pst = con.prepareStatement(stm_customers); + pst.executeUpdate(); + if (debug) System.out.println(stm_customers); + + pst = con.prepareStatement(stm_ships); + pst.executeUpdate(); + if (debug) System.out.println(stm_ships); + + pst = con.prepareStatement(stm_tours); + pst.executeUpdate(); + if (debug) System.out.println(stm_tours); + + pst = con.prepareStatement(stm_quotas); + pst.executeUpdate(); + if (debug) System.out.println(stm_quotas); + + pst = con.prepareStatement(stm_lookButton); + pst.executeUpdate(); + if (debug) System.out.println(stm_lookButton); + + pst = con.prepareStatement(stm_offline_bookings); + pst.executeUpdate(); + if (debug) System.out.println(stm_offline_bookings); + + pst = con.prepareStatement(stm_offline_customers); + pst.executeUpdate(); + if (debug) System.out.println(stm_offline_customers); + + + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + public void dropRecreateLocalTables() { + + try { + con = DriverManager.getConnection(url); + + String dropstm_offline_bookings = "DROP TABLE IF EXISTS offline_bookings;"; + String dropstm_offline_customers = "DROP TABLE IF EXISTS offline_customers;"; + String recreatestm_offline_bookings = "CREATE TABLE IF NOT EXISTS offline_bookings(count int, tour int, customer int, FOREIGN KEY(tour) REFERENCES tours(id), FOREIGN KEY(customer) REFERENCES offline_customers(id));"; + String recreatestm_offline_customers = "CREATE TABLE IF NOT EXISTS offline_customers(id INTEGER PRIMARY KEY AUTOINCREMENT, name varchar(255), remote_id int);"; + + pst = con.prepareStatement(dropstm_offline_bookings); + pst.executeUpdate(); + if (debug) System.out.println(dropstm_offline_bookings); + + pst = con.prepareStatement(dropstm_offline_customers); + pst.executeUpdate(); + if (debug) System.out.println(dropstm_offline_customers); + + pst = con.prepareStatement(recreatestm_offline_bookings); + pst.executeUpdate(); + if (debug) System.out.println(recreatestm_offline_bookings); + + pst = con.prepareStatement(recreatestm_offline_customers); + pst.executeUpdate(); + if (debug) System.out.println(recreatestm_offline_customers); + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + +} diff --git a/Client/src/main/java/datenbank/Insert.java b/Client/src/main/java/datenbank/Insert.java index 54b45c1..af5e7d7 100755 --- a/Client/src/main/java/datenbank/Insert.java +++ b/Client/src/main/java/datenbank/Insert.java @@ -8,10 +8,18 @@ import java.util.logging.Level; import java.util.logging.Logger; +import api_client.agent; +import api_client.customer; +import api_client.quota; +import api_client.reservation; +import api_client.ship; +import api_client.tour; + + /** - * Hier werden die Datens�tze in die Datenbanken hinzugef�gt. + * Hier werden die Datensätze in die Datenbanken hinzugefügt. * - * @author AgentFriz + * @author AgentFriz, Jonas Droste * */ public class Insert { @@ -19,23 +27,66 @@ public class Insert { private Connection con = null; private PreparedStatement pst = null; - private String url = "jdbc:postgresql://localhost:5432/piratebaytours"; - private String user = "postgres"; - private String password = "1q1q1q1q"; + private String url = "jdbc:sqlite:db.sqlite3"; + private ResultSet rs = null; public Insert() { } + + public void insertOfflineBooking(int count, int tour, String customer_name){ + + try { + con = DriverManager.getConnection(url); + + String stm = "INSERT INTO offline_customers(name) VALUES( '"+ customer_name + "');"; + System.out.println(stm); + pst = con.prepareStatement(stm); + pst.executeUpdate(); + + + pst = con.prepareStatement("SELECT id FROM offline_customers ORDER BY id DESC LIMIT 1;"); + rs = pst.executeQuery(); + int generatedKey = 0; + if (rs.next()) { + generatedKey = rs.getInt(1); + } + + + stm = "INSERT INTO offline_bookings(count, tour, customer) VALUES( "+ count + "," + tour + "," + generatedKey + ");"; + System.out.println(stm); + pst = con.prepareStatement(stm); + pst.executeUpdate(); + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + - public void insertIntoBuchungen(int plaetze, int route_id, String tour_datum, String tour_startzeit, - int schiff_id) { + public void insertAgent(agent tmp){ try { - con = DriverManager.getConnection(url, user, password); + con = DriverManager.getConnection(url); - String stm = "INSERT INTO buchungen(plaetze, route_id, tour_datum, tour_startzeit, schiff_id) VALUES( " - + plaetze + ", " + route_id + ", '" + tour_datum + "', '" + tour_startzeit + "', " + schiff_id - + ")"; + String stm = "INSERT INTO agents(id, name) VALUES( "+ tmp.id + ", '" + tmp.name + "')"; + System.out.println(stm); pst = con.prepareStatement(stm); pst.executeUpdate(); @@ -59,4 +110,133 @@ public void insertIntoBuchungen(int plaetze, int route_id, String tour_datum, St } } } + + public void insertCustomer(customer tmp){ + + try { + con = DriverManager.getConnection(url); + + String stm = "INSERT INTO customers(id, name) VALUES( "+ tmp.id + ", '" + tmp.name + "')"; + System.out.println(stm); + pst = con.prepareStatement(stm); + pst.executeUpdate(); + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + + public void insertQuota(quota tmp){ + + try { + con = DriverManager.getConnection(url); + + String stm = "INSERT INTO quotas(count, tour, agent) VALUES( "+ tmp.count + ", " + tmp.tour + ", " + tmp.agent + ")"; + System.out.println(stm); + pst = con.prepareStatement(stm); + pst.executeUpdate(); + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + public void insertShip(ship tmp){ + + try { + con = DriverManager.getConnection(url); + + String stm = "INSERT INTO ships(id, name, seats) VALUES( "+ tmp.id + ", '" + tmp.name + "', " + tmp.seats + ")"; + System.out.println(stm); + pst = con.prepareStatement(stm); + pst.executeUpdate(); + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + + public void insertTour(tour tmp){ + + try { + con = DriverManager.getConnection(url); + + String stm = "INSERT INTO tours(id, name, date, time, ship) VALUES( "+ tmp.id + ", '" + tmp.name + "', '" + tmp.date+"', '" + tmp.time+"', " + tmp.ship_id + ")"; + System.out.println(stm); + pst = con.prepareStatement(stm); + pst.executeUpdate(); + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Insert.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + } + } + } + + + } diff --git a/Client/src/main/java/datenbank/Select.java b/Client/src/main/java/datenbank/Select.java index 77ce00c..99b5d76 100755 --- a/Client/src/main/java/datenbank/Select.java +++ b/Client/src/main/java/datenbank/Select.java @@ -5,542 +5,52 @@ import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Timestamp; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Date; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.List; + +import api_client.*; public class Select { private Connection con = null; private PreparedStatement pst = null; private ResultSet rs = null; + private String url = "jdbc:sqlite:db.sqlite3"; - private String url = "jdbc:postgresql://localhost:5432/piratebaytours"; - private String user = "postgres"; - private String password = "1q1q1q1q"; public Select() { } - public String[] selectRoutenNameFromRouten(int[] idRoute) { - - try { - - ArrayList routenNamen = new ArrayList(); - - for (int idRouteSchleife : idRoute) { - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_name FROM routen WHERE route_id = " + idRouteSchleife, - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - rs.next(); - routenNamen.add(rs.getString(1)); - } - - return routenNamen.toArray(new String[0]); - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public Float[] selectFloatFromRouten(int[] idRoute) { - - try { - - ArrayList routenNamen = new ArrayList(); - - for (int idRouteSchleife : idRoute) { - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_dauer FROM routen WHERE route_id = " + idRouteSchleife, - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - rs.next(); - routenNamen.add(rs.getFloat(1)); - } - - return routenNamen.toArray(new Float[0]); - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public int selectSchiffIdFromTourWHERE(int routenId, String tourDatum, String tourStartzeit) { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement( - "Select schiff_id FROM tour WHERE route_id = " + routenId + " and tour_datum = '" + tourDatum - + "' and tour_startzeit = '" + tourStartzeit + "'", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - int ausgabe = 0; - - rs.beforeFirst(); - - while (rs.next()) { - ausgabe = rs.getInt(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return 0; - } - - public String selectSchiffNameFromSchiffWHERE(int schiffId) { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("Select schiff_name FROM schiff WHERE schiff_id = " + schiffId, - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - String ausgabe = ""; - - rs.beforeFirst(); - - while (rs.next()) { - ausgabe = rs.getString(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public int selectSumPlaetzeFromBuchungenWHERE(int routenId, String tourDatum, String tourStartzeit) { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement( - "Select SUM(plaetze) FROM buchungen WHERE route_id = " + routenId + " and tour_datum = '" - + tourDatum + "' and tour_startzeit = '" + tourStartzeit + "'", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - int ausgabe = 0; - - rs.beforeFirst(); - - while (rs.next()) { - ausgabe = rs.getInt(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return 0; - } - - public int[] selectRouteIdFromTour(int plaetze_vorhanden) { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_id FROM tour WHERE plaetze_vorhanden > " + (plaetze_vorhanden - 1) - + " GROUP BY route_id", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - int[] ausgabe = new int[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; - while (rs.next()) { - ausgabe[i++] = rs.getInt(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public String[] selectRouteDatumFromTour(int plaetze_vorhanden, int routenId) { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement( - "SELECT tour_datum FROM tour WHERE plaetze_vorhanden > " + (plaetze_vorhanden - 1) - + " and route_id = " + routenId + " GROUP BY tour_datum", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - String[] ausgabe = new String[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; - while (rs.next()) { - ausgabe[i++] = rs.getString(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public String[] selectRoutenStartzeitFromTour(int plaetze_vorhanden, int routen_id, String tour_datum) { + public String[] selectRouteNameFromTour(int plaetze_vorhanden, int agentNr) { try { - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement( - "SELECT tour_startzeit FROM tour WHERE plaetze_vorhanden > " + (plaetze_vorhanden - 1) - + " and route_id = " + routen_id + " and tour_datum = '" + tour_datum - + "' GROUP BY tour_startzeit", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + con = DriverManager.getConnection(url); + pst = con.prepareStatement("SELECT tours.name " + + "FROM tours " + + "JOIN quotas on tours.id = quotas.tour " + + "WHERE Agent = " + agentNr + + " AND count > " + (plaetze_vorhanden-1) + + " GROUP BY name" // WHERE reservations > " + (plaetze_vorhanden - 1) + ); rs = pst.executeQuery(); - rs.last(); - String[] ausgabe = new String[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; - while (rs.next()) { - ausgabe[i++] = rs.getString(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public int selectPlaetzeFromTour(int routenId, String tourDatum, String tourStartzeit) { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement( - "SELECT plaetze_vorhanden FROM tour WHERE route_id = " + routenId + " and tour_datum = '" - + tourDatum + "' and tour_startzeit = '" + tourStartzeit + "'", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - int ausgabe = 0; - - rs.beforeFirst(); - - while (rs.next()) { - ausgabe = rs.getInt(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return 0; - } - - public String[] selectRoutenNameFromRoute() { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_name FROM routen", ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - String[] ausgabe = new String[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; - while (rs.next()) { - ausgabe[i++] = rs.getString(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public int[] selectRoutenIdFromRoute() { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_id FROM routen", ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - int[] ausgabe = new int[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; + ArrayList select = new ArrayList(); + while (rs.next()) { - ausgabe[i++] = rs.getInt(1); + select.add(rs.getString(1)); } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } - return null; - } - - public Timestamp[] selectRoutenDauerFromRoute() { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_dauer FROM routen", ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - - rs.last(); - Timestamp[] ausgabe = new Timestamp[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; - while (rs.next()) { - ausgabe[i++] = rs.getTimestamp(1); + + String[] ausgabe = new String[select.size()+1]; + + for(int i=0; i " + (plaetze_vorhanden-1) + + " AND Agent = " + agentNr + + " GROUP BY date"); rs = pst.executeQuery(); - - rs.last(); - String[] ausgabe = new String[rs.getRow()]; - - rs.beforeFirst(); - - int i = 0; + + ArrayList select = new ArrayList(); + while (rs.next()) { - ausgabe[i++] = rs.getString(1); - } - return ausgabe; - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (rs != null) { - rs.close(); - } - if (pst != null) { - pst.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - Logger lgr = Logger.getLogger(Select.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); + select.add(rs.getString(1)); } - } - return null; - } - - public String[][] selectAllesFromTour() { - - try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement( - "Select route_name, schiff_name, tour_datum, tour_startzeit, plaetze_vorhanden from tour " - + "JOIN routen ON tour.route_id = routen.route_id " - + "JOIN schiff ON tour.schiff_id = schiff.schiff_id" - + " ORDER BY tour_datum, tour_startzeit", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - rs = pst.executeQuery(); - SimpleDateFormat sdfDatum = new SimpleDateFormat("d.MM.yyyy"); - SimpleDateFormat sdfZeit = new SimpleDateFormat("H:m"); - - rs.last(); - String[][] ausgabe = new String[rs.getRow()][5]; - - rs.beforeFirst(); - - int i = 0; - while (rs.next()) { - ausgabe[i] [0] = rs.getString(1); - ausgabe[i] [2] = rs.getString(2); - ausgabe[i] [1] = sdfDatum.format(rs.getDate(3)); - ausgabe[i] [3] = sdfZeit.format(rs.getTimestamp(4)); - ausgabe[i] [4] = "" + rs.getInt(5); - - i++; + String[] ausgabe = new String[select.size()+1]; + + for(int i=0; i selectSchiffIdFromTour() { + public String[] selectRouteZeitFromTour(int plaetze_vorhanden, String routenName, String datum, int agentNr) { try { - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("Select schiff_id FROM tour", - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + con = DriverManager.getConnection(url); + pst = con.prepareStatement("SELECT time " + + "FROM tours " + + "JOIN quotas on tours.id = quotas.tour " + + "WHERE name = '" + routenName + "'" + + " AND date = '" + datum + "'" + + " AND Agent = " + agentNr + + " AND count > " + (plaetze_vorhanden-1) + + " GROUP BY time"); rs = pst.executeQuery(); - rs.last(); - ArrayList ausgabe = new ArrayList(); - - rs.beforeFirst(); - + ArrayList select = new ArrayList(); + while (rs.next()) { - ausgabe.add(rs.getInt(1)); + select.add(rs.getString(1)); } + + String[] ausgabe = new String[select.size()+1]; + + for(int i=0; i selectSchiffIdFromTour() { return null; } - public int selectSchiffIDFromSchiff(String schiffName) { + public String[] selectRouteSchiffFromShip(int plaetze_vorhanden, String routenName, String datum, String time, int agentNr) { try { - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT schiff_id FROM schiff WHERE schiff_name = '" + schiffName + "'" - , ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); + con = DriverManager.getConnection(url); + pst = con.prepareStatement("Select ships.name, ships.id " + + "FROM tours " + + "JOIN quotas on tours.id = quotas.tour " + + "JOIN ships ON tours.ship = ships.id " + + "WHERE tours.name = '" + routenName + "' " + + " AND tours.date = '" + datum + "'" + + " AND count > " + (plaetze_vorhanden-1) + + " AND Agent = " + agentNr + + " AND tours.time = '" + time + "'"); + rs = pst.executeQuery(); - - rs.last(); - int ausgabe = 0; - - rs.beforeFirst(); - + + String ausgabe[] = new String[2]; + while (rs.next()) { - ausgabe = rs.getInt(1); + ausgabe[0] = rs.getString(1); + ausgabe[1] = "" + rs.getObject(2); } + return ausgabe; } catch (SQLException ex) { @@ -757,32 +236,21 @@ public int selectSchiffIDFromSchiff(String schiffName) { lgr.log(Level.WARNING, ex.getMessage(), ex); } } - return 0; + return null; } - /** - * Liefert eine Stringliste, die alle Datums enth�lt, in denen die �bergebenne - * schiff_id enthalten ist. - * @param schiff_id - * @return - */ - public ArrayList selectTourDatumFromTour(int schiff_id) { + public int selectIdFromLookButtton() { try { - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("Select tour_datum FROM tour WHERE schiff_id = " + schiff_id, - ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + con = DriverManager.getConnection(url); + pst = con.prepareStatement("Select id from lookButton"); rs = pst.executeQuery(); - - ArrayList ausgabe = new ArrayList(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-d" ); + int ausgabe = -1; while (rs.next()) { - ausgabe.add(sdf.format(rs.getDate(1))); - System.out.println(rs.getDate(1)); - + ausgabe = rs.getInt(1); } return ausgabe; @@ -809,23 +277,26 @@ public ArrayList selectTourDatumFromTour(int schiff_id) { lgr.log(Level.WARNING, ex.getMessage(), ex); } } - return null; + return (-1); } - public Timestamp selectRoutenDauer() { + public int selectTourIDfromTour(String tourName, String date, String time, int shipId) { + + try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("SELECT route_dauer FROM routen", ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); + con = DriverManager.getConnection(url); + pst = con.prepareStatement("Select id from tours " + + "WHERE name = '" + tourName + "' " + + "AND date = '" + date + "' " + + "AND time = '" + time + "' " + + "AND ship = " + shipId); rs = pst.executeQuery(); - - Timestamp ausgabe = new Timestamp(0); - - + + int ausgabe = -1; + while (rs.next()) { - ausgabe = rs.getTimestamp(1); + ausgabe = rs.getInt(1); } return ausgabe; @@ -851,28 +322,144 @@ public Timestamp selectRoutenDauer() { lgr.log(Level.WARNING, ex.getMessage(), ex); } } - return null; + return (-1); } - public Timestamp selectRouteStartzeit(int schiff_id, String tour_datum) { + public ArrayList selectOfflineCustomersWOReservations() { + try { + con = DriverManager.getConnection(url); + pst = con.prepareStatement("Select name,id from offline_customers"); + rs = pst.executeQuery(); + + ArrayList tmp_customer_list = new ArrayList(); + while(rs.next()){ + customer tmp_customer = new customer(); + + tmp_customer.id = rs.getInt(2); + tmp_customer.name = rs.getString(1); + tmp_customer_list.add(tmp_customer); + + } + return tmp_customer_list; + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Select.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (rs != null) { + rs.close(); + } + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Select.class.getName()); + lgr.log(Level.WARNING, ex.getMessage(), ex); + } + } + return null; + } + + public int selectRemoteCustomerIDForReservation(int offline_id){ + try { + con = DriverManager.getConnection(url); + pst = con.prepareStatement("SELECT remote_id FROM offline_customers WHERE id = " + offline_id); + rs = pst.executeQuery(); + + int remote_id = 0; + while(rs.next()){ + remote_id = rs.getInt(1); + + } + return remote_id; + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Select.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (rs != null) { + rs.close(); + } + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Select.class.getName()); + lgr.log(Level.WARNING, ex.getMessage(), ex); + } + } + return 0; + } + + public ArrayList getAllReservations(){ + try { + con = DriverManager.getConnection(url); + pst = con.prepareStatement("Select * from offline_bookings"); + rs = pst.executeQuery(); + + ArrayList tmp_reserv_list = new ArrayList(); + while(rs.next()){ + reservation tmp_reserv = new reservation(); + + tmp_reserv.count = rs.getInt(1); + tmp_reserv.tour = rs.getInt(2); + tmp_reserv.customer = rs.getInt(3); + + tmp_reserv_list.add(tmp_reserv); + } + return tmp_reserv_list; + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Select.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (rs != null) { + rs.close(); + } + if (pst != null) { + pst.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + Logger lgr = Logger.getLogger(Select.class.getName()); + lgr.log(Level.WARNING, ex.getMessage(), ex); + } + } + return null; + } + + public int selectCountfromQuotas(int tourID, int agent) { + + try { - - con = DriverManager.getConnection(url, user, password); - pst = con.prepareStatement("select tour_startzeit, routen.route_dauer FROM tour " - + "JOIN routen ON tour.route_id = routen.route_id " - + "WHERE schiff_id = " + schiff_id + " and tour_datum = '" + tour_datum + "'", - ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); + con = DriverManager.getConnection(url); + pst = con.prepareStatement("Select count from quotas " + + "WHERE tour = " + tourID + + " AND agent = " + agent); rs = pst.executeQuery(); - - Timestamp ausgabe = new Timestamp(0); - - + + int ausgabe = -1; + while (rs.next()) { - ausgabe = rs.getTimestamp(1); - - System.out.println(rs.getTimestamp(1)); + ausgabe = rs.getInt(1); } return ausgabe; @@ -898,9 +485,7 @@ public Timestamp selectRouteStartzeit(int schiff_id, String tour_datum) { lgr.log(Level.WARNING, ex.getMessage(), ex); } } - return null; + return (-1); } - - -} \ No newline at end of file +} diff --git a/Client/src/main/java/datenbank/Update.java b/Client/src/main/java/datenbank/Update.java index e0ac181..ebcd5a0 100755 --- a/Client/src/main/java/datenbank/Update.java +++ b/Client/src/main/java/datenbank/Update.java @@ -12,57 +12,149 @@ public class Update { Connection con = null; Statement st = null; - private String url = "jdbc:postgresql://localhost:5432/piratebaytours"; - private String user = "postgres"; - private String password = "1q1q1q1q"; + private String url = "jdbc:sqlite:db.sqlite3"; public Update() { // TODO Auto-generated constructor stub } - public void UpdateTourSetplaetze(int plaetze, int routen_Id, String tour_datum, String tour_startzeit) { + public void UpdatelookButton(int look) { try { + + con = DriverManager.getConnection(url); + st = con.createStatement(); + + con.setAutoCommit(false); + + st.executeUpdate("Update lookButton SET id = " + look); + + con.commit(); + + } catch (SQLException ex) { + + if (con != null) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.WARNING, ex1.getMessage(), ex1); + } + } + + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (st != null) { + st.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.WARNING, ex.getMessage(), ex); + } + } + } - con = DriverManager.getConnection(url, user, password); - st = con.createStatement(); - - con.setAutoCommit(false); - - st.executeUpdate("Update tour SET plaetze_vorhanden = " + plaetze + - " WHERE route_id = " + routen_Id + " and tour_datum = '" + tour_datum + - "' and tour_startzeit = '" + tour_startzeit + "'"); - - con.commit(); - - } catch (SQLException ex) { - - if (con != null) { - try { - con.rollback(); - } catch (SQLException ex1) { - Logger lgr = Logger.getLogger(Update.class.getName()); - lgr.log(Level.WARNING, ex1.getMessage(), ex1); - } - } - - Logger lgr = Logger.getLogger(Update.class.getName()); - lgr.log(Level.SEVERE, ex.getMessage(), ex); - - } finally { - - try { - if (st != null) { - st.close(); - } - if (con != null) { - con.close(); - } - - } catch (SQLException ex) { - - Logger lgr = Logger.getLogger(Update.class.getName()); - lgr.log(Level.WARNING, ex.getMessage(), ex); - } - } + public void UpdateQuotas(int plaetze, int tourID, int agentNr) { + try { + + con = DriverManager.getConnection(url); + st = con.createStatement(); + + con.setAutoCommit(false); + + st.executeUpdate( + "Update quotas " + + " SET count = count - " + plaetze + + " WHERE tour = " + tourID + + " AND agent = " + agentNr + ); + + con.commit(); + + } catch (SQLException ex) { + + if (con != null) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.WARNING, ex1.getMessage(), ex1); + } + } + + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (st != null) { + st.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.WARNING, ex.getMessage(), ex); + } + } } + + public void updateOfflineCustomer(int offline_id, int remote_id){ + try { + + con = DriverManager.getConnection(url); + st = con.createStatement(); + + con.setAutoCommit(false); + + String update_stm = "UPDATE offline_customers " + " SET remote_id = " + remote_id + " WHERE id = " + offline_id; + System.out.println(update_stm); + st.executeUpdate(update_stm); + + con.commit(); + + } catch (SQLException ex) { + + if (con != null) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.WARNING, ex1.getMessage(), ex1); + } + } + + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.SEVERE, ex.getMessage(), ex); + + } finally { + + try { + if (st != null) { + st.close(); + } + if (con != null) { + con.close(); + } + + } catch (SQLException ex) { + + Logger lgr = Logger.getLogger(Update.class.getName()); + lgr.log(Level.WARNING, ex.getMessage(), ex); + } + } + + } } diff --git a/Client/src/main/java/gui/GlobaleVariablen.java b/Client/src/main/java/gui/GlobaleVariablen.java index bc8f3ce..2e88c63 100755 --- a/Client/src/main/java/gui/GlobaleVariablen.java +++ b/Client/src/main/java/gui/GlobaleVariablen.java @@ -15,6 +15,8 @@ public class GlobaleVariablen { public static final String EVENT_BUTTONABBRECHENTOUR = "buttonAbbrechenTour"; public static final String EVENT_BUTTONERSTELLENTOUR= "buttonErstellenTour"; public static final String EVENT_ENTERUHRZEIT = "Enter_Uhrzeit"; + public static final String EVENT_BUTTONDOWNLOAD = "buttonDownload"; + public static final String EVENT_BUTTONUPLOAD = "buttonUpload"; } diff --git a/Client/src/main/java/gui/UFrame.java b/Client/src/main/java/gui/UFrame.java index 778fcaa..63d1e3d 100755 --- a/Client/src/main/java/gui/UFrame.java +++ b/Client/src/main/java/gui/UFrame.java @@ -1,12 +1,12 @@ package gui; -import java.awt.Panel; import javax.swing.JFrame; public class UFrame extends JFrame { - - + private static final long serialVersionUID = 5224521595166131056L; + + public UFrame() { super(); setVisible(true); diff --git a/Client/src/main/java/valueObjecte/Routen.java b/Client/src/main/java/valueObjecte/Routen.java index f71a02c..baa9bb0 100755 --- a/Client/src/main/java/valueObjecte/Routen.java +++ b/Client/src/main/java/valueObjecte/Routen.java @@ -16,9 +16,7 @@ public int[] getRouten_id() { return routen_id; } - public void setRouten_id(int[] routen_id) { - this.routen_id = routen_id; - } + public String[] getRouten_name() { return routen_name; diff --git a/docs/expose.pdf b/docs/expose.pdf deleted file mode 100644 index b230c89..0000000 Binary files a/docs/expose.pdf and /dev/null differ diff --git a/docs/expose.txt b/docs/expose.txt deleted file mode 100644 index 1129ed1..0000000 --- a/docs/expose.txt +++ /dev/null @@ -1,34 +0,0 @@ - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - EXPOSE: PROJEKT VERTEILTE INFORMATIONSSYSTEME - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - - - - -1 Gruppenmitglieder: -════════════════════ - - • Jonas Droste - • Frederik Broer - • Robin Naundorf - • Jesko Appelfeller - - -2 Tools -═══════ - - • PostgreSQL - • RESTful Interface mit PostgREST - • Cluster Postgres-XC - • Interface: Browserbasiert - - -3 Schema -════════ - - • Schiffe -> ID, Namen, Plätze - • Touren -> ID, Name, Beschreibung - • Agenten -> ID, Name, Score - • Kunde -> ID, Name, Telefonnummer, eMail, #Mitreisender - • Buchung -> ID, Kunde, Tour, Schiff, Agent