├── .classpath
├── .gitignore
├── .project
├── .settings
└── org.eclipse.jdt.core.prefs
├── MANIFEST.MF
├── README.md
├── build.xml
├── config
├── config.xml
└── defaultNodeVeiwers.cfg
├── icons
├── edtsrclkup_co.gif
├── export.gif
├── file_obj.gif
├── fldr_obj.gif
├── import.gif
├── info_obj.gif
├── jspdecl.gif
├── launch_run.gif
├── launch_stop.gif
├── new_con.gif
├── refresh.gif
├── save_edit.gif
├── search.gif
├── search_next.gif
├── search_prev.gif
└── trash.gif
├── ivy.xml
├── licences
├── Apache Software Licence v2.0.txt
├── TableLayoutLicense.txt
└── epl-v10.html
└── src
├── java
└── org
│ └── apache
│ └── zookeeper
│ ├── inspector
│ ├── ZooInspector.java
│ ├── encryption
│ │ ├── BasicDataEncryptionManager.java
│ │ └── DataEncryptionManager.java
│ ├── gui
│ │ ├── NodeViewersChangeListener.java
│ │ ├── ZooInspectorAboutDialog.java
│ │ ├── ZooInspectorConnectionPropertiesDialog.java
│ │ ├── ZooInspectorIconResources.java
│ │ ├── ZooInspectorNodeViewersDialog.java
│ │ ├── ZooInspectorNodeViewersPanel.java
│ │ ├── ZooInspectorPanel.java
│ │ ├── ZooInspectorSearchDialog.java
│ │ ├── ZooInspectorTreeViewer.java
│ │ ├── about.html
│ │ └── nodeviewer
│ │ │ ├── NodeViewerACL.java
│ │ │ ├── NodeViewerData.java
│ │ │ ├── NodeViewerMetaData.java
│ │ │ └── ZooInspectorNodeViewer.java
│ ├── logger
│ │ └── LoggerFactory.java
│ └── manager
│ │ ├── NodeListener.java
│ │ ├── Pair.java
│ │ ├── Server.java
│ │ ├── User.java
│ │ ├── ZooInspectorCompetence.java
│ │ ├── ZooInspectorManager.java
│ │ ├── ZooInspectorManagerImpl.java
│ │ ├── ZooInspectorNodeManager.java
│ │ ├── ZooInspectorNodeTreeManager.java
│ │ ├── ZooInspectorReadOnlyManager.java
│ │ └── Zookeeper.java
│ └── retry
│ └── ZooKeeperRetry.java
└── resources
├── commons-logging.properties
├── log4j.dtd
└── log4j.xml
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Package Files #
4 | *.jar
5 | *.war
6 | *.ear
7 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ZooInspector
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Wed Oct 17 15:16:54 CST 2012
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.6
13 |
--------------------------------------------------------------------------------
/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Ant-Version: Apache Ant 1.7.1
3 | Created-By: 14.2-b01 (Sun Microsystems Inc.)
4 | Main-Class: org.apache.zookeeper.inspector.ZooInspector
5 | Built-By: Colin
6 | Built-At: ${build.time}
7 | Built-On: ${host.name}
8 | Implementation-Title: org.apache.zookeeper
9 | Implementation-Version: ${revision}
10 | Implementation-Vendor: The Apache Software Foundation
11 | Class-Path: lib/asm-3.3.1.jar lib/cglib-2.2.2.jar lib/commons-beanutils-1.8.3.jar lib/commons-digester3-3.2.jar lib/commons-logging-1.1.1.jar lib/jtoaster-1.0.4.jar lib/log4j-1.2.15.jar lib/slf4j-api-1.6.4.jar lib/slf4j-log4j12-1.6.4.jar lib/TableLayout-20050920.jar lib/zookeeper-3.3.0.jar
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ZooInspector
2 | ============
3 |
4 | ZooInspector工具改造,添加了权限控制功能。
5 |
6 | 用户权限在config目录下面的config.xml文件里配置。
7 |
8 | 目前只支持只读权限和全部控制权限两种权限。
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | Tests failed!
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/config/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/config/defaultNodeVeiwers.cfg:
--------------------------------------------------------------------------------
1 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerData
2 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerMetaData
3 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerACL
4 |
--------------------------------------------------------------------------------
/icons/edtsrclkup_co.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/edtsrclkup_co.gif
--------------------------------------------------------------------------------
/icons/export.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/export.gif
--------------------------------------------------------------------------------
/icons/file_obj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/file_obj.gif
--------------------------------------------------------------------------------
/icons/fldr_obj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/fldr_obj.gif
--------------------------------------------------------------------------------
/icons/import.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/import.gif
--------------------------------------------------------------------------------
/icons/info_obj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/info_obj.gif
--------------------------------------------------------------------------------
/icons/jspdecl.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/jspdecl.gif
--------------------------------------------------------------------------------
/icons/launch_run.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/launch_run.gif
--------------------------------------------------------------------------------
/icons/launch_stop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/launch_stop.gif
--------------------------------------------------------------------------------
/icons/new_con.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/new_con.gif
--------------------------------------------------------------------------------
/icons/refresh.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/refresh.gif
--------------------------------------------------------------------------------
/icons/save_edit.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/save_edit.gif
--------------------------------------------------------------------------------
/icons/search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/search.gif
--------------------------------------------------------------------------------
/icons/search_next.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/search_next.gif
--------------------------------------------------------------------------------
/icons/search_prev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/search_prev.gif
--------------------------------------------------------------------------------
/icons/trash.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nettm/ZooInspector/675e4bf57bdf29020c75264b8bf16433dea98f3b/icons/trash.gif
--------------------------------------------------------------------------------
/ivy.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
20 |
21 |
23 |
24 |
25 | ZooInspector
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/licences/Apache Software Licence v2.0.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/licences/TableLayoutLicense.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | *
4 | * The Clearthought Software License, Version 2.0
5 | *
6 | * Copyright (c) 2001 Daniel Barbalace. All rights reserved.
7 | *
8 | * Project maintained at https://tablelayout.dev.java.net
9 | *
10 | * I. Terms for redistribution of original source and binaries
11 | *
12 | * Redistribution and use of unmodified source and/or binaries are
13 | * permitted provided that the following condition is met:
14 | *
15 | * 1. Redistributions of original source code must retain the above
16 | * copyright notice and license. You are not required to redistribute
17 | * the original source; you may choose to redistribute only the
18 | * binaries.
19 | *
20 | * Basically, if you distribute unmodified source, you meet
21 | * automatically comply with the license with no additional effort on
22 | * your part.
23 | *
24 | * II. Terms for distribution of derived works via subclassing and/or
25 | * composition.
26 | *
27 | * You may generate derived works by means of subclassing and/or
28 | * composition (e.g., the Adaptor Pattern), provided that the following
29 | * conditions are met:
30 | *
31 | * 1. Redistributions of original source code must retain the above
32 | * copyright notice and license. You are not required to redistribute
33 | * the original source; you may choose to redistribute only the
34 | * binaries.
35 | *
36 | * 2. The original software is not altered.
37 | *
38 | * 3. Derived works are not contained in the info.clearthought
39 | * namespace/package or any subpackage of info.clearthought.
40 | *
41 | * 4. Derived works do not use the class or interface names from the
42 | * info.clearthought... packages
43 | *
44 | * For example, you may define a class with the following full name:
45 | * org.nameOfMyOrganization.layouts.RowMajorTableLayout
46 | *
47 | * However, you may not define a class with the either of the
48 | * following full names:
49 | * info.clearthought.layout.RowMajorTableLayout
50 | * org.nameOfMyOrganization.layouts.TableLayout
51 | *
52 | * III. Terms for redistribution of source modified via patch files.
53 | *
54 | * You may generate derived works by means of patch files provided
55 | * that the following conditions are met:
56 | *
57 | * 1. Redistributions of original source code must retain the above
58 | * copyright notice and license. You are not required to
59 | * redistribute the original source; you may choose to redistribute
60 | * only the binaries resulting from the patch files.
61 | *
62 | * 2. The original source files are not altered. All alteration is
63 | * done in patch files.
64 | *
65 | * 3. Derived works are not contained in the info.clearthought
66 | * namespace/package or any subpackage of info.clearthought. This
67 | * means that your patch files must change the namespace/package
68 | * for the derived work. See section II for examples.
69 | *
70 | * 4. Derived works do not use the class or interface names from the
71 | * info.clearthought... packages. This means your patch files
72 | * must change the names of the interfaces and classes they alter.
73 | * See section II for examples.
74 | *
75 | * 5. Derived works must include the following disclaimer.
76 | * "This work is derived from Clearthought's TableLayout,
77 | * https://tablelayout.dev.java.net, by means of patch files
78 | * rather than subclassing or composition. Therefore, this work
79 | * might not contain the latest fixes and features of TableLayout."
80 | *
81 | * IV. Terms for repackaging, transcoding, and compiling of binaries.
82 | *
83 | * You may do any of the following with the binaries of the
84 | * original software.
85 | *
86 | * 1. You may move binaries (.class files) from the original .jar file
87 | * to your own .jar file.
88 | *
89 | * 2. You may move binaries from the original .jar file to other
90 | * resource containing files, including but not limited to .zip,
91 | * .gz, .tar, .dll, .exe files.
92 | *
93 | * 3. You may backend compile the binaries to any platform, including
94 | * but not limited to Win32, Win64, MAC OS, Linux, Palm OS, any
95 | * handheld or embedded platform.
96 | *
97 | * 4. You may transcribe the binaries to other virtual machine byte
98 | * code protocols, including but not limited to .NET.
99 | *
100 | * V. License Disclaimer.
101 | *
102 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
103 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
104 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
105 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR, AFFILATED BUSINESSES,
106 | * OR ANYONE ELSE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
107 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
108 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
109 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
110 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
111 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
112 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
113 | * SUCH DAMAGE.
114 | * ====================================================================
115 | */
116 |
--------------------------------------------------------------------------------
/licences/epl-v10.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Eclipse Public License - Version 1.0
8 |
25 |
26 |
27 |
28 |
29 |
30 | Eclipse Public License - v 1.0
31 |
32 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
33 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
34 | DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
35 | AGREEMENT.
36 |
37 | 1. DEFINITIONS
38 |
39 | "Contribution" means:
40 |
41 | a) in the case of the initial Contributor, the initial
42 | code and documentation distributed under this Agreement, and
43 | b) in the case of each subsequent Contributor:
44 | i) changes to the Program, and
45 | ii) additions to the Program;
46 | where such changes and/or additions to the Program
47 | originate from and are distributed by that particular Contributor. A
48 | Contribution 'originates' from a Contributor if it was added to the
49 | Program by such Contributor itself or anyone acting on such
50 | Contributor's behalf. Contributions do not include additions to the
51 | Program which: (i) are separate modules of software distributed in
52 | conjunction with the Program under their own license agreement, and (ii)
53 | are not derivative works of the Program.
54 |
55 | "Contributor" means any person or entity that distributes
56 | the Program.
57 |
58 | "Licensed Patents" mean patent claims licensable by a
59 | Contributor which are necessarily infringed by the use or sale of its
60 | Contribution alone or when combined with the Program.
61 |
62 | "Program" means the Contributions distributed in accordance
63 | with this Agreement.
64 |
65 | "Recipient" means anyone who receives the Program under
66 | this Agreement, including all Contributors.
67 |
68 | 2. GRANT OF RIGHTS
69 |
70 | a) Subject to the terms of this Agreement, each
71 | Contributor hereby grants Recipient a non-exclusive, worldwide,
72 | royalty-free copyright license to reproduce, prepare derivative works
73 | of, publicly display, publicly perform, distribute and sublicense the
74 | Contribution of such Contributor, if any, and such derivative works, in
75 | source code and object code form.
76 |
77 | b) Subject to the terms of this Agreement, each
78 | Contributor hereby grants Recipient a non-exclusive, worldwide,
79 | royalty-free patent license under Licensed Patents to make, use, sell,
80 | offer to sell, import and otherwise transfer the Contribution of such
81 | Contributor, if any, in source code and object code form. This patent
82 | license shall apply to the combination of the Contribution and the
83 | Program if, at the time the Contribution is added by the Contributor,
84 | such addition of the Contribution causes such combination to be covered
85 | by the Licensed Patents. The patent license shall not apply to any other
86 | combinations which include the Contribution. No hardware per se is
87 | licensed hereunder.
88 |
89 | c) Recipient understands that although each Contributor
90 | grants the licenses to its Contributions set forth herein, no assurances
91 | are provided by any Contributor that the Program does not infringe the
92 | patent or other intellectual property rights of any other entity. Each
93 | Contributor disclaims any liability to Recipient for claims brought by
94 | any other entity based on infringement of intellectual property rights
95 | or otherwise. As a condition to exercising the rights and licenses
96 | granted hereunder, each Recipient hereby assumes sole responsibility to
97 | secure any other intellectual property rights needed, if any. For
98 | example, if a third party patent license is required to allow Recipient
99 | to distribute the Program, it is Recipient's responsibility to acquire
100 | that license before distributing the Program.
101 |
102 | d) Each Contributor represents that to its knowledge it
103 | has sufficient copyright rights in its Contribution, if any, to grant
104 | the copyright license set forth in this Agreement.
105 |
106 | 3. REQUIREMENTS
107 |
108 | A Contributor may choose to distribute the Program in object code
109 | form under its own license agreement, provided that:
110 |
111 | a) it complies with the terms and conditions of this
112 | Agreement; and
113 |
114 | b) its license agreement:
115 |
116 | i) effectively disclaims on behalf of all Contributors
117 | all warranties and conditions, express and implied, including warranties
118 | or conditions of title and non-infringement, and implied warranties or
119 | conditions of merchantability and fitness for a particular purpose;
120 |
121 | ii) effectively excludes on behalf of all Contributors
122 | all liability for damages, including direct, indirect, special,
123 | incidental and consequential damages, such as lost profits;
124 |
125 | iii) states that any provisions which differ from this
126 | Agreement are offered by that Contributor alone and not by any other
127 | party; and
128 |
129 | iv) states that source code for the Program is available
130 | from such Contributor, and informs licensees how to obtain it in a
131 | reasonable manner on or through a medium customarily used for software
132 | exchange.
133 |
134 | When the Program is made available in source code form:
135 |
136 | a) it must be made available under this Agreement; and
137 |
138 | b) a copy of this Agreement must be included with each
139 | copy of the Program.
140 |
141 | Contributors may not remove or alter any copyright notices contained
142 | within the Program.
143 |
144 | Each Contributor must identify itself as the originator of its
145 | Contribution, if any, in a manner that reasonably allows subsequent
146 | Recipients to identify the originator of the Contribution.
147 |
148 | 4. COMMERCIAL DISTRIBUTION
149 |
150 | Commercial distributors of software may accept certain
151 | responsibilities with respect to end users, business partners and the
152 | like. While this license is intended to facilitate the commercial use of
153 | the Program, the Contributor who includes the Program in a commercial
154 | product offering should do so in a manner which does not create
155 | potential liability for other Contributors. Therefore, if a Contributor
156 | includes the Program in a commercial product offering, such Contributor
157 | ("Commercial Contributor") hereby agrees to defend and
158 | indemnify every other Contributor ("Indemnified Contributor")
159 | against any losses, damages and costs (collectively "Losses")
160 | arising from claims, lawsuits and other legal actions brought by a third
161 | party against the Indemnified Contributor to the extent caused by the
162 | acts or omissions of such Commercial Contributor in connection with its
163 | distribution of the Program in a commercial product offering. The
164 | obligations in this section do not apply to any claims or Losses
165 | relating to any actual or alleged intellectual property infringement. In
166 | order to qualify, an Indemnified Contributor must: a) promptly notify
167 | the Commercial Contributor in writing of such claim, and b) allow the
168 | Commercial Contributor to control, and cooperate with the Commercial
169 | Contributor in, the defense and any related settlement negotiations. The
170 | Indemnified Contributor may participate in any such claim at its own
171 | expense.
172 |
173 | For example, a Contributor might include the Program in a commercial
174 | product offering, Product X. That Contributor is then a Commercial
175 | Contributor. If that Commercial Contributor then makes performance
176 | claims, or offers warranties related to Product X, those performance
177 | claims and warranties are such Commercial Contributor's responsibility
178 | alone. Under this section, the Commercial Contributor would have to
179 | defend claims against the other Contributors related to those
180 | performance claims and warranties, and if a court requires any other
181 | Contributor to pay any damages as a result, the Commercial Contributor
182 | must pay those damages.
183 |
184 | 5. NO WARRANTY
185 |
186 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
187 | PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
188 | OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
189 | ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
190 | OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
191 | responsible for determining the appropriateness of using and
192 | distributing the Program and assumes all risks associated with its
193 | exercise of rights under this Agreement , including but not limited to
194 | the risks and costs of program errors, compliance with applicable laws,
195 | damage to or loss of data, programs or equipment, and unavailability or
196 | interruption of operations.
197 |
198 | 6. DISCLAIMER OF LIABILITY
199 |
200 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
201 | NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
202 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
203 | WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
204 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
205 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
206 | DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
207 | HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
208 |
209 | 7. GENERAL
210 |
211 | If any provision of this Agreement is invalid or unenforceable under
212 | applicable law, it shall not affect the validity or enforceability of
213 | the remainder of the terms of this Agreement, and without further action
214 | by the parties hereto, such provision shall be reformed to the minimum
215 | extent necessary to make such provision valid and enforceable.
216 |
217 | If Recipient institutes patent litigation against any entity
218 | (including a cross-claim or counterclaim in a lawsuit) alleging that the
219 | Program itself (excluding combinations of the Program with other
220 | software or hardware) infringes such Recipient's patent(s), then such
221 | Recipient's rights granted under Section 2(b) shall terminate as of the
222 | date such litigation is filed.
223 |
224 | All Recipient's rights under this Agreement shall terminate if it
225 | fails to comply with any of the material terms or conditions of this
226 | Agreement and does not cure such failure in a reasonable period of time
227 | after becoming aware of such noncompliance. If all Recipient's rights
228 | under this Agreement terminate, Recipient agrees to cease use and
229 | distribution of the Program as soon as reasonably practicable. However,
230 | Recipient's obligations under this Agreement and any licenses granted by
231 | Recipient relating to the Program shall continue and survive.
232 |
233 | Everyone is permitted to copy and distribute copies of this
234 | Agreement, but in order to avoid inconsistency the Agreement is
235 | copyrighted and may only be modified in the following manner. The
236 | Agreement Steward reserves the right to publish new versions (including
237 | revisions) of this Agreement from time to time. No one other than the
238 | Agreement Steward has the right to modify this Agreement. The Eclipse
239 | Foundation is the initial Agreement Steward. The Eclipse Foundation may
240 | assign the responsibility to serve as the Agreement Steward to a
241 | suitable separate entity. Each new version of the Agreement will be
242 | given a distinguishing version number. The Program (including
243 | Contributions) may always be distributed subject to the version of the
244 | Agreement under which it was received. In addition, after a new version
245 | of the Agreement is published, Contributor may elect to distribute the
246 | Program (including its Contributions) under the new version. Except as
247 | expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
248 | rights or licenses to the intellectual property of any Contributor under
249 | this Agreement, whether expressly, by implication, estoppel or
250 | otherwise. All rights in the Program not expressly granted under this
251 | Agreement are reserved.
252 |
253 | This Agreement is governed by the laws of the State of New York and
254 | the intellectual property laws of the United States of America. No party
255 | to this Agreement will bring a legal action under this Agreement more
256 | than one year after the cause of action arose. Each party waives its
257 | rights to a jury trial in any resulting litigation.
258 |
259 |
260 |
261 |
262 |
--------------------------------------------------------------------------------
/src/java/org/apache/zookeeper/inspector/ZooInspector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ZooInspector
3 | *
4 | * Copyright 2010 Colin Goodheart-Smithe
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 | package org.apache.zookeeper.inspector;
19 |
20 | import java.awt.event.WindowAdapter;
21 | import java.awt.event.WindowEvent;
22 |
23 | import javax.swing.JFrame;
24 | import javax.swing.JOptionPane;
25 | import javax.swing.UIManager;
26 |
27 | import org.apache.zookeeper.inspector.gui.ZooInspectorPanel;
28 | import org.apache.zookeeper.inspector.logger.LoggerFactory;
29 | import org.apache.zookeeper.inspector.manager.ZooInspectorCompetence;
30 | import org.apache.zookeeper.inspector.manager.ZooInspectorManagerImpl;
31 |
32 | /**
33 | * @author CGSmithe
34 | *
35 | */
36 | public class ZooInspector
37 | {
38 | /**
39 | * @param args
40 | */
41 | public static void main(String[] args)
42 | {
43 | try
44 | {
45 | // 初始化配置
46 | ZooInspectorCompetence.init();
47 |
48 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
49 | JFrame frame = new JFrame("ZooInspector");
50 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
51 | final ZooInspectorPanel zooInspectorPanel = new ZooInspectorPanel(
52 | new ZooInspectorManagerImpl());
53 | frame.addWindowListener(new WindowAdapter()
54 | {
55 | @Override
56 | public void windowClosed(WindowEvent e)
57 | {
58 | super.windowClosed(e);
59 | zooInspectorPanel.disconnect(true);
60 | }
61 | });
62 |
63 | frame.setContentPane(zooInspectorPanel);
64 | frame.setSize(1024, 768);
65 | frame.setVisible(true);
66 | }
67 | catch (Exception e)
68 | {
69 | LoggerFactory.getLogger().error("Error occurred loading ZooInspector", e);
70 | JOptionPane.showMessageDialog(null, "ZooInspector failed to start: " + e.getMessage(),
71 | "Error", JOptionPane.ERROR_MESSAGE);
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ZooInspector
3 | *
4 | * Copyright 2010 Colin Goodheart-Smithe
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 | package org.apache.zookeeper.inspector.encryption;
19 |
20 | /**
21 | * @author CGSmithe
22 | *
23 | */
24 | public class BasicDataEncryptionManager implements DataEncryptionManager
25 | {
26 |
27 | /*
28 | * (non-Javadoc)
29 | *
30 | * @see
31 | * org.apache.zookeeper.inspector.encryption.DataEncryptionManager#decryptData
32 | * (byte[])
33 | */
34 | public String decryptData(byte[] encrypted) throws Exception
35 | {
36 | return new String(encrypted);
37 | }
38 |
39 | /*
40 | * (non-Javadoc)
41 | *
42 | * @see
43 | * org.apache.zookeeper.inspector.encryption.DataEncryptionManager#encryptData
44 | * (java.lang.String)
45 | */
46 | public byte[] encryptData(String data) throws Exception
47 | {
48 | if (data == null)
49 | {
50 | return new byte[0];
51 | }
52 | return data.getBytes();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/java/org/apache/zookeeper/inspector/encryption/DataEncryptionManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ZooInspector
3 | *
4 | * Copyright 2010 Colin Goodheart-Smithe
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 | package org.apache.zookeeper.inspector.encryption;
19 |
20 | /**
21 | * A class which describes how data should be encrypted and decrypted
22 | *
23 | * @author CGSmithe
24 | *
25 | */
26 | public interface DataEncryptionManager
27 | {
28 | /**
29 | * @param data
30 | * - the data to be encrypted
31 | * @return the encrypted data
32 | * @throws Exception
33 | */
34 | public byte[] encryptData(String data) throws Exception;
35 |
36 | /**
37 | * @param encrypted
38 | * - the data to be decrypted
39 | * @return the decrypted data
40 | * @throws Exception
41 | */
42 | public String decryptData(byte[] encrypted) throws Exception;
43 | }
44 |
--------------------------------------------------------------------------------
/src/java/org/apache/zookeeper/inspector/gui/NodeViewersChangeListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package org.apache.zookeeper.inspector.gui;
5 |
6 | import java.util.List;
7 |
8 | import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer;
9 |
10 | /**
11 | * @author CGSmithe
12 | *
13 | */
14 | public interface NodeViewersChangeListener
15 | {
16 | /**
17 | * @param newViewers
18 | */
19 | public void nodeViewersChanged(List newViewers);
20 | }
21 |
--------------------------------------------------------------------------------
/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorAboutDialog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ZooInspector
3 | *
4 | * Copyright 2010 Colin Goodheart-Smithe
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 | package org.apache.zookeeper.inspector.gui;
19 |
20 | import info.clearthought.layout.TableLayout;
21 |
22 | import java.awt.BorderLayout;
23 | import java.awt.Frame;
24 | import java.awt.event.ActionEvent;
25 | import java.awt.event.ActionListener;
26 | import java.io.IOException;
27 |
28 | import javax.swing.JButton;
29 | import javax.swing.JDialog;
30 | import javax.swing.JEditorPane;
31 | import javax.swing.JPanel;
32 |
33 | import org.apache.zookeeper.inspector.logger.LoggerFactory;
34 |
35 | /**
36 | * @author CGSmithe
37 | *
38 | */
39 | public class ZooInspectorAboutDialog extends JDialog
40 | {
41 | /**
42 | * {该处请说明该field的含义和作用}
43 | */
44 | private static final long serialVersionUID = -1913799936703444696L;
45 |
46 | /**
47 | * @param frame
48 | *
49 | */
50 | public ZooInspectorAboutDialog(Frame frame)
51 | {
52 | super(frame);
53 | this.setLayout(new BorderLayout());
54 | this.setIconImage(ZooInspectorIconResources.getInformationIcon().getImage());
55 | this.setTitle("About ZooInspector");
56 | this.setModal(true);
57 | this.setAlwaysOnTop(true);
58 | this.setResizable(false);
59 | JPanel panel = new JPanel();
60 | panel.setLayout(new TableLayout(new double[] { 5, 800, 5 }, new double[] { 5, 170, 5 }));
61 | JEditorPane aboutPane = new JEditorPane();
62 | aboutPane.setEditable(false);
63 | aboutPane.setOpaque(false);
64 | java.net.URL aboutURL = ZooInspectorAboutDialog.class.getResource("about.html");
65 | try
66 | {
67 | aboutPane.setPage(aboutURL);
68 | }
69 | catch (IOException e)
70 | {
71 | LoggerFactory.getLogger().error("Error loading about.html, file may be corrupt", e);
72 | }
73 | panel.add(aboutPane, "1,1");
74 | JPanel buttonsPanel = new JPanel();
75 | buttonsPanel.setLayout(new TableLayout(new double[] { TableLayout.FILL,
76 | TableLayout.PREFERRED, TableLayout.FILL }, new double[] { TableLayout.PREFERRED }));
77 | JButton okButton = new JButton("OK");
78 | okButton.addActionListener(new ActionListener()
79 | {
80 | public void actionPerformed(ActionEvent e)
81 | {
82 | ZooInspectorAboutDialog.this.dispose();
83 | }
84 | });
85 | buttonsPanel.add(okButton, "1,0");
86 | this.add(panel, BorderLayout.CENTER);
87 | this.add(buttonsPanel, BorderLayout.SOUTH);
88 | this.pack();
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ZooInspector
3 | *
4 | * Copyright 2010 Colin Goodheart-Smithe
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 | package org.apache.zookeeper.inspector.gui;
19 |
20 | import info.clearthought.layout.TableLayout;
21 |
22 | import java.awt.BorderLayout;
23 | import java.awt.event.ActionEvent;
24 | import java.awt.event.ActionListener;
25 | import java.io.File;
26 | import java.io.FileReader;
27 | import java.io.IOException;
28 | import java.util.HashMap;
29 | import java.util.List;
30 | import java.util.Map;
31 | import java.util.Properties;
32 | import java.util.Map.Entry;
33 |
34 | import javax.swing.JButton;
35 | import javax.swing.JComboBox;
36 | import javax.swing.JComponent;
37 | import javax.swing.JDialog;
38 | import javax.swing.JFileChooser;
39 | import javax.swing.JLabel;
40 | import javax.swing.JOptionPane;
41 | import javax.swing.JPanel;
42 | import javax.swing.JTextField;
43 |
44 | import org.apache.zookeeper.inspector.logger.LoggerFactory;
45 | import org.apache.zookeeper.inspector.manager.Pair;
46 |
47 | /**
48 | * @author CGSmithe
49 | *
50 | */
51 | public class ZooInspectorConnectionPropertiesDialog extends JDialog
52 | {
53 |
54 | /**
55 | * {该处请说明该field的含义和作用}
56 | */
57 | private static final long serialVersionUID = -3971298099354054219L;
58 |
59 | /**
60 | * @param connectionPropertiesTemplateAndLabels
61 | * @param zooInspectorPanel
62 | */
63 | public ZooInspectorConnectionPropertiesDialog(
64 | Pair