Source Code Cross Referenced for AppArguments.java in  » Database-Client » SQL-Workbench » workbench » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » SQL Workbench » workbench 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * AppArguments.java
003:         *
004:         * This file is part of SQL Workbench/J, http://www.sql-workbench.net
005:         *
006:         * Copyright 2002-2007, Thomas Kellerer
007:         * No part of this code maybe reused without the permission of the author
008:         *
009:         * To contact the author please send an email to: support@sql-workbench.net
010:         *
011:         */
012:        package workbench;
013:
014:        import java.util.List;
015:        import workbench.util.ArgumentParser;
016:        import workbench.util.ArgumentType;
017:
018:        /**
019:         * @author support@sql-workbench.net
020:         */
021:        public class AppArguments extends ArgumentParser {
022:            // Parameters for batch execution used by BatchRunner
023:            public static final String ARG_SCRIPT = "script";
024:            public static final String ARG_SCRIPT_ENCODING = "encoding";
025:            public static final String ARG_ABORT = "abortOnError";
026:
027:            // Connection related parameters
028:            public static final String ARG_PROFILE = "profile";
029:            public static final String ARG_PROFILE_GROUP = "profilegroup";
030:            public static final String ARG_CONN_URL = "url";
031:            public static final String ARG_CONN_DRIVER = "driver";
032:            public static final String ARG_CONN_JAR = "driverjar";
033:            public static final String ARG_CONN_USER = "username";
034:            public static final String ARG_CONN_PWD = "password";
035:            public static final String ARG_CONN_AUTOCOMMIT = "autocommit";
036:            public static final String ARG_CONN_ROLLBACK = "rollbackOnDisconnect";
037:            public static final String ARG_CONN_TRIM_CHAR = "trimCharData";
038:            public static final String ARG_IGNORE_DROP = "ignoreDropErrors";
039:
040:            public static final String ARG_DISPLAY_RESULT = "displayResult";
041:            public static final String ARG_SUCCESS_SCRIPT = "cleanupSuccess";
042:            public static final String ARG_ERROR_SCRIPT = "cleanupError";
043:            public static final String ARG_SHOW_TIMING = "showTiming";
044:            public static final String ARG_FEEDBACK = "feedback";
045:            public static final String ARG_WORKSPACE = "workspace";
046:            public static final String ARG_ALT_DELIMITER = "altDelimiter";
047:            public static final String ARG_DELIMITER = "delimiter";
048:            public static final String ARG_CONSOLIDATE_LOG = "consolidateMessages";
049:
050:            // Other parameters
051:            public static final String ARG_SHOWPROGRESS = "showProgress";
052:            public static final String ARG_QUIET = "quiet";
053:            public static final String ARG_PROFILE_STORAGE = "profileStorage";
054:            public static final String ARG_CONFIGDIR = "configDir";
055:            public static final String ARG_LIBDIR = "libdir";
056:            public static final String ARG_LOGFILE = "logfile";
057:            public static final String ARG_VARDEF = "varDef";
058:            public static final String ARG_SHOW_PUMPER = "dataPumper";
059:            public static final String ARG_SHOW_DBEXP = "dbExplorer";
060:            public static final String ARG_LANG = "languaqe";
061:            public static final String ARG_NOSETTNGS = "noSettings";
062:            public static final String ARG_NOTEMPLATES = "noTemplates";
063:
064:            public AppArguments() {
065:                addArgument(ARG_PROFILE, ArgumentType.ProfileArgument);
066:                addArgument(ARG_FEEDBACK);
067:                addArgument(ARG_PROFILE_GROUP);
068:                addArgument(ARG_PROFILE_STORAGE);
069:                addArgument(ARG_CONFIGDIR);
070:                addArgument(ARG_LIBDIR);
071:                addArgument(ARG_SCRIPT);
072:                addArgument(ARG_SCRIPT_ENCODING);
073:                addArgument(ARG_LOGFILE);
074:                addArgument(ARG_ABORT, ArgumentType.BoolArgument);
075:                addArgument(ARG_SUCCESS_SCRIPT);
076:                addArgument(ARG_ERROR_SCRIPT);
077:                addArgument(ARG_VARDEF);
078:                addArgument(ARG_CONN_URL);
079:                addArgument(ARG_CONN_DRIVER);
080:                addArgument(ARG_CONN_JAR);
081:                addArgument(ARG_CONN_USER);
082:                addArgument(ARG_CONN_PWD);
083:                addArgument(ARG_CONN_AUTOCOMMIT, ArgumentType.BoolArgument);
084:                addArgument(ARG_CONN_ROLLBACK, ArgumentType.BoolArgument);
085:                addArgument(ARG_SHOW_PUMPER, ArgumentType.BoolArgument);
086:                addArgument(ARG_IGNORE_DROP, ArgumentType.BoolArgument);
087:                addArgument(ARG_DISPLAY_RESULT, ArgumentType.BoolArgument);
088:                addArgument(ARG_SHOW_DBEXP, ArgumentType.BoolArgument);
089:                addArgument(ARG_SHOW_TIMING, ArgumentType.BoolArgument);
090:                addArgument(ARG_SHOWPROGRESS, ArgumentType.BoolArgument);
091:                addArgument(ARG_WORKSPACE);
092:                addArgument(ARG_NOSETTNGS, ArgumentType.BoolArgument);
093:                addArgument(ARG_NOTEMPLATES, ArgumentType.BoolArgument);
094:                addArgument(ARG_ALT_DELIMITER);
095:                addArgument(ARG_DELIMITER);
096:                addArgument(ARG_QUIET, ArgumentType.BoolArgument);
097:                addArgument(ARG_CONN_TRIM_CHAR, ArgumentType.BoolArgument);
098:                addArgument(ARG_LANG);
099:                addArgument(ARG_CONSOLIDATE_LOG, ArgumentType.BoolArgument);
100:                addArgument("help");
101:            }
102:
103:            public String getHelp() {
104:                StringBuilder msg = new StringBuilder(100);
105:                List<String> args = getRegisteredArguments();
106:                msg.append("Available parameters:\n");
107:                for (String arg : args) {
108:                    ArgumentType type = getArgumentType(arg);
109:                    msg.append("-" + arg);
110:                    if (type == ArgumentType.BoolArgument) {
111:                        msg.append(" (true/false)");
112:                    }
113:                    msg.append("\n");
114:                }
115:                return msg.toString();
116:            }
117:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.